Today, in response to the needs of other departments, the VMware window2008 virtual machine in a notebook is converted to the QCOW2 format and run on the corporate server.
It took a lot of time to do it for the first time
First of all:
The image of the virtual machine is divided into several vmdk files, so we should make these vmdk files into a vmdk file.
Use the Vmware-vdiskmanager.exe command under Windows, which is under the VMware installation directory.
"H:\Windows Server R2 x64 2\windows server R2 x64 2.vmdk" #我这里需要被合的源vmdk文件
"H:\TEMP\SINGLE.VMDK"#合一后的目标文件
Start to search Baidu after very tangled, there are many vmdk files, the source file should be which. After finding is a different from the others,
The rest is added in the following numbers, such as: Windows Server R2 x64 2-0-000001-s001.vmdk, and so on.
That is the shortest name in the vmdk file.
The complete command is as follows:
C:\Program Files (x86) \VMware\VMware workstation>. \vmware-vdiskmanager.exe-r "H:\Windows Server-R2 x64 2\windo
WS-Server R2 x64 2.vmdk "-T 0" H:\TEMP\SINGLE.VMDK "
And then
Copy it to the Linux system.
In Then,
Convert the vmdk file to the QCOW2 format using the qemu-img command.
command below, I changed the SINGLE.VMDK name above to WINDOWS2008.VMDK.
Qemu-img convert-f vmdk-o qcow2 windows2008.vmdk windows2008.qcow2
At last
Normal use of the virtual machine inside the KVM
VMware's VMDK format virtual machine converted to QCOW2 format