Commandes utiles
L’outil nécessaire à cette conversion se nomme QEMU disk image utility et est fourni :
- Sous Windows 32 bits et Windows 64 bits avec les binaires de QEMU
- Sous Linux avec le paquet qemu-utils, à installer via les dépôts officiels Debian
VDI vers VMDK
qemu-img convert -f vdi -O vmdk inputfilename.vdi outputfilename.vmdk
ex :
Sous Windows :
# qemu-img.exe convert -f vdi -O vmdk C:\VMs\debiantest.vdi C:\VMs\debiantest.vmdk
Sous Linux :
# qemu-img convert -f vdi -O vmdk VMs/debiantest.vdi VMs/debiantest.vmdk
VMDK vers VDI
qemu-img convert -f vmdk -O vdi inputfilename.vmdk outputfilename.vdi
ex :
Sous Windows :
# qemu-img.exe convert -f vmdk -O vdi C:\VMs\debiantest.vmdk C:\VMs\debiantest.vdi
Sous Linux :
# qemu-img convert -f vmdk -O vdi VMs/debiantest.vmdk VMs/debiantest.vdi
La procédure suivante est donnée à titre indicatif, les choix devant être adaptés en fonction des besoins.
















A la suite de cette procédure, les fichiers propres à VMware et associés au disque image VMDK utilisé sont créés :
Et la machine virtuelle est maintenant disponible dans la liste des hôtes :
Lors de l’ajout d’une nouvelle machine virtuelle, un assistant apparait en bas de l’écran et nous propose d’installer les VMware Tools :
Il faut donc cliquer sur Install Tools, ce qui aura pour effet de monter le disque d’installation des outils VMware dans /media/cdrom0/.
Ceci est équivalent à cliquer sur VM > Install VMware Tools…
Une fenêtre apparait pour nous proposer de visualiser les fichiers du disque ainsi monté :
Toutefois nous n’utiliserons pas l’explorateur de fichiers. Il faut maintenant ouvrir un terminal et exécuter la procédure suivante :
# cd /media/cdrom0/ # ls manifest.txt VMwareTools-10.0.10-4301679.tar.gz vmware-tools-upgrader-64 run_upgrader.sh vmware-tools-upgrader-32 # tar -zxvf VMwareTools-10.0.10-4301679.tar.gz -C /home/adminsys/ # cd /home/adminsys/vmware-tools-distrib/ # ls bin doc FILES installer vgauth vmware-install.real.pl caf etc INSTALL lib vmware-install.pl # ./vmware-install.pl(logs d'installation ▼)
open-vm-tools are available from the OS vendor and VMware recommends using open-vm-tools. See http://kb.vmware.com/kb/2073803 for more information. Do you still want to proceed with this legacy installer? [no] yes Creating a new VMware Tools installer database using the tar4 format. Installing VMware Tools. In which directory do you want to install the binary files? [/usr/bin] What is the directory that contains the init directories (rc0.d/ to rc6.d/)? [/etc] What is the directory that contains the init scripts? [/etc/init.d] In which directory do you want to install the daemon files? [/usr/sbin] In which directory do you want to install the library files? [/usr/lib/vmware-tools] The path "/usr/lib/vmware-tools" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] In which directory do you want to install the common agent library files? [/usr/lib] In which directory do you want to install the common agent transient files? [/var/lib] In which directory do you want to install the documentation files? [/usr/share/doc/vmware-tools] The path "/usr/share/doc/vmware-tools" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] The installation of VMware Tools 10.0.10 build-4301679 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl". Before running VMware Tools for the first time, you need to configure it by invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want this program to invoke the command for you now? [yes] Initializing... Making sure services for VMware Tools are stopped. Stopping VMware Tools services in the virtual machine: Guest operating system daemon: done VMware User Agent (vmware-user): done Unmounting HGFS shares: done Guest filesystem driver: done Stopping Thinprint services in the virtual machine: Stopping Virtual Printing daemon: done update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults insserv: Service cups has to be enabled to start service vmware-tools-thinprint insserv: exiting now! update-rc.d: error: insserv rejected the script header WARNING: The installer initially used the 'udpate-rc.d' to setup the vmware-tools service. That command cannot be found. Please re-install the 'sysv-rc' package. This script will now attempt to manually setup the vmware-tools service.The module vmci has already been installed on this system by another installer or package and will not be modified by this installer. The module vsock has already been installed on this system by another installer or package and will not be modified by this installer. The module vmxnet3 has already been installed on this system by another installer or package and will not be modified by this installer. The module pvscsi has already been installed on this system by another installer or package and will not be modified by this installer. The module vmmemctl has already been installed on this system by another installer or package and will not be modified by this installer. The VMware Host-Guest Filesystem allows for shared folders between the host OS and the guest OS in a Fusion or Workstation virtual environment. Do you wish to enable this feature? [yes] Before you can compile modules, you need to have the following installed... make gcc kernel headers of the running kernel Searching for GCC... Detected GCC binary at "/usr/bin/gcc". The path "/usr/bin/gcc" appears to be a valid path to the gcc binary. Would you like to change it? [no] Searching for a valid kernel header path... Detected the kernel headers at "/lib/modules/3.16.0-4-586/build/include". The path "/lib/modules/3.16.0-4-586/build/include" appears to be a valid path to the 3.16.0-4-586 kernel headers. Would you like to change it? [no] make: Entering directory '/tmp/modconfig-gwlVqK/vmhgfs-only' Using kernel build system. /usr/bin/make -C /lib/modules/3.16.0-4-586/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \ MODULEBUILDDIR= modules make[1]: Entering directory '/usr/src/linux-headers-3.16.0-4-586' make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-586' CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/message.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/dir.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/request.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/hgfsUtil.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/cpName.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/link.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/rpcout.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/stubs.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/hgfsEscape.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/file.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/transport.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/module.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/backdoorGcc32.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/super.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/bdhandler.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/fsutil.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/cpNameLinux.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/hgfsBd.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/filesystem.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/page.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/backdoor.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/inode.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/dentry.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/cpNameLite.o CC [M] /tmp/modconfig-gwlVqK/vmhgfs-only/kernelStubsLinux.o LD [M] /tmp/modconfig-gwlVqK/vmhgfs-only/vmhgfs.o Building modules, stage 2. MODPOST 1 modules CC /tmp/modconfig-gwlVqK/vmhgfs-only/vmhgfs.mod.o LD [M] /tmp/modconfig-gwlVqK/vmhgfs-only/vmhgfs.ko make[1]: Leaving directory '/usr/src/linux-headers-3.16.0-4-586' /usr/bin/make -C $PWD SRCROOT=$PWD/. \ MODULEBUILDDIR= postbuild make[1]: Entering directory '/tmp/modconfig-gwlVqK/vmhgfs-only' make[1]: 'postbuild' is up to date. make[1]: Leaving directory '/tmp/modconfig-gwlVqK/vmhgfs-only' cp -f vmhgfs.ko ./../vmhgfs.o make: Leaving directory '/tmp/modconfig-gwlVqK/vmhgfs-only' The vmxnet driver is no longer supported on kernels 3.3 and greater. Please upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e) The vmblock enables dragging or copying files between host and guest in a Fusion or Workstation virtual environment. Do you wish to enable this feature? [yes] VMware automatic kernel modules enables automatic building and installation of VMware kernel modules at boot that are not already present. This feature can be enabled/disabled by re-running vmware-config-tools.pl. Would you like to enable VMware automatic kernel modules? [no] Disabling timer-based audio scheduling in pulseaudio. Do you want to enable Guest Authentication (vgauth)? Enabling vgauth is needed if you want to enable Common Agent (caf). [yes] Detected X server version 1.16.4 Distribution provided drivers for Xorg X server are used. Skipping X configuration because X drivers are not included. Creating a new initrd boot image for the kernel. update-initramfs: Generating /boot/initrd.img-3.16.0-4-586 Generating the key and certificate files. Successfully generated the key and certificate files. Checking acpi hot plug done Starting VMware Tools services in the virtual machine: Switching to guest configuration: done Guest filesystem driver: done Mounting HGFS shares: failed Blocking file system: done Guest operating system daemon: done VGAuthService: done Starting Virtual Printing daemon: done The configuration of VMware Tools 10.0.10 build-4301679 for Linux for this running kernel completed successfully. You must restart your X session before any mouse or graphics changes take effect. You can now run VMware Tools by invoking "/usr/bin/vmware-toolbox-cmd" from the command line. To enable advanced X features (e.g., guest resolution fit, drag and drop, and file and text copy/paste), you will need to do one (or more) of the following: 1. Manually start /usr/bin/vmware-user 2. Log out and log back into your desktop session; and, 3. Restart your X session. Enjoy, --the VMware team Found VMware Tools CDROM mounted at /media/cdrom0. Ejecting device /dev/sr0 ...
# reboot