Wednesday, September 26, 2012

Clone VDI or Convert VDI (Virtualbox) to VMDK (VMware)

CLONE VDI
This is the case you want to move VDI to the other machine, Create VM and using existing VDI

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe clonevdi "C:\Users\HP\VirtualB
ox VMs\ubuntu1\ubuntu1.vdi" D:\ubuntu1_test.vdi
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: 9199a774-2d26-4a60-b186-63eb2d212
831

CONVERT VDI ->VMDSK
This is when you want to move from Virtual disk from VirtualBox to VMware because the new UUID in the VMware setup create the VMware and choose later option. Then delete the Hard drive and create a new Hard driver with the existing VMDK just converted and select option keep existing format. This way the new UUID of VMDK is created in VMX file. See Ref. 3


1. http://www.leonardoborda.com/blog/easily-convert-vdi-to-vmdk-images/
2. http://www.irongeek.com/i.php?page=videos/vmwareplayerlivecd
3. http://www.aztcs.org/meeting_notes/winhardsig/virtualmachines/vmware/Using_VMDK_File_to_Create_a_VM_in_VMwarePlayer--Windows.pdf

c:\Program Files\Oracle\VirtualBox>VBoxManage.exe clonehd J:\ubuntu1_test.vdi J:
\ubuntu1_test.vmdk --format vmdk
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'vmdk'. UUID: fd4474c9-199f-4a9e-880a-b312ff175e35

c:\Program Files\Oracle\VirtualBox>VBoxManage.exe showhdinfo "j:\ubuntu1_test.vdi"
UUID:                 9199a774-2d26-4a60-b186-63eb2d212831
Accessible:           yes
Logical size:         42756 MBytes
Current size on disk: 34306 MBytes
Type:                 normal (base)
Storage format:       VDI
Format variant:       dynamic default
Location:             j:\ubuntu1_test.vdi

c:\Program Files\Oracle\VirtualBox>VBoxManage.exe showhdinfo "j:\ubuntu1_test.vmdk"
UUID:                 fd4474c9-199f-4a9e-880a-b312ff175e35
Accessible:           yes
Logical size:         42756 MBytes
Current size on disk: 32899 MBytes
Type:                 normal (base)
Storage format:       vmdk
Format variant:       dynamic default
Location:             J:\ubuntu1_test.vmdk


Problem: If you are running into GRUB rescue> 

Then either the VMDK just converted is corrupted or UUID does not match with the new VMDK created.
If there is an error Syntax error line 1 of VMDK probably something to do with the setup as well.
In the VMX there are 
ide1:0.fileName = "\ubuntu1_test.vmdk"
uuid.location = " make sure it matches with uuid of ubuntu1_test.vmdk"
uuid.bios = "
make sure it matches with uuid of ubuntu1_test.vmdk"
make sure they are matching you can use VBoxManage.exe showhdinfo to get UUID.

VirtualBox vs. VMware
VMware performs better Virtualbox. VMware takes less CPU resources than VirtualBox however, for tools as mentioned above, VirtualBox offers more flexible than VMware. I am currently using both VirtualBox and VMware and because it is faster I feel comfortable to use VMware for my future development my trend toward VMware. I have been using VirtualBox everyday for the past 3 years when switch to VMware you definitely see the difference in the performance right away. It is very easy to setup: I have 2 identical virtual disks kubuntu_64.vdi and kubuntu_64.vmdk (using VBoxManage.exe to clonehd) with VirtualBox is running the CPU usage is 50% and with VMware is running the CPU usage is currently 20%. Same hardware and same win 7 is the host. This is how I test. I don't know but this is what I see on my 2 systems: I7@3.4 GHz with 8 GB of RAM and AMD Quad@2.4 GHz with 6 GB of RAM. When it takes less CPU resources you can do more work because you don't have to wait. In order to run VM CPU needs to have VT supported at least Dual Core. 
Even the size of Virtual disk, VMware takes less space for the same image, the difference is 2 GB.
Below is some vdi have been converted to vmdk
09/28/2012  09:59 PM    36,121,522,176 ubuntu1_test.vdi (VirtualBox)
09/28/2012  09:54 PM    34,666,905,600 ubuntu1_test.vmdk (VMware) 


09/27/2012  08:48 PM    30,775,869,952 Kubuntu-64bit.vdi (VirtualBox)
09/27/2012  10:31 PM    28,886,237,184 Kubuntu-64-bit.vmdk (VMware)
continue 

 

No comments: