Page 1 of 1

Converting "funny" VMWare Disk

Posted: 9. Nov 2010, 20:37
by agregory99
Hi, I am converting a disk image from VMWare that is tough to figure out. In VMWare Fusion it says the disk win2003e.c-000003.vmdk is the only disk attached to the image, and it shows no snapshots listed. However, there are 3 disks in the image folder, and all three are clearly referenced somehow. I checked the VMX config and there is only mention of the 1 disk. So I converted it to VDI successfully, but upon creating a VBox image and starting it, it says there is no bootable media. I knew this would be the case, since when the VM was working in Fusion, I saw 7G in use on C: out of 20, while the disk I converted was only 2.5G. I was hoping to see if the vmware log snippet below can you anyone tell me how to combine the disks into a single VDI, or at least make it so I can start the image using VBox.

Nov 09 11:44:19.968: vmx| VMXVmdb_LoadRawConfig: Loading raw config
Nov 09 11:44:19.971: vmx| DISK: OPEN scsi0:0 '/VMWare Images/BTM/BTMDemo_V3BASE/win2003e.c-000003.vmdk' persistent R[]
Nov 09 11:44:20.002: vmx| DISKLIB-DSCPTR: Opened [0]: "win2003e.c-000003.vmdk" (0x1a)
Nov 09 11:44:20.002: vmx| DISKLIB-LINK : Opened '/VMWare Images/BTM/BTMDemo_V3BASE/win2003e.c-000003.vmdk' (0x1a): monolithicSparse, 41943040 sectors / 20 GB.
Nov 09 11:44:20.019: vmx| DISKLIB-DSCPTR: Opened [0]: "win2003e.c-000001.vmdk" (0x1e)
Nov 09 11:44:20.019: vmx| DISKLIB-LINK : Opened '/VMWare Images/BTM/BTMDemo_V3BASE/win2003e.c-000001.vmdk' (0x1e): monolithicSparse, 41943040 sectors / 20 GB.
Nov 09 11:44:20.048: vmx| DISKLIB-DSCPTR: Opened [0]: "win2003e.c.vmdk" (0x1e)
Nov 09 11:44:20.048: vmx| DISKLIB-LINK : Opened '/VMWare Images/BTM/BTMDemo_V3BASE/win2003e.c.vmdk' (0x1e): monolithicSparse, 41943040 sectors / 20 GB.
Nov 09 11:44:20.048: vmx| DISKLIB-LIB : Opened "/VMWare Images/BTM/BTMDemo_V3BASE/win2003e.c-000003.vmdk" (flags 0x1a).
Nov 09 11:44:20.049: vmx| DiskGetGeometry: Reading of disk partition table
Nov 09 11:44:20.049: vmx| Setting thread 37 stack size to 1048576.
Nov 09 11:44:20.049: vmx| DISK: OPEN '/VMWare Images/BTM/BTMDemo_V3BASE/win2003e.c-000003.vmdk' Geo (2610/255/63) BIOS Geo (2610/255/63)

Re: Converting "funny" VMWare Disk

Posted: 9. Nov 2010, 20:45
by Perryg
Sounds like a split image. Is the HD that this is stored on FAT32?

Re: Converting "funny" VMWare Disk

Posted: 9. Nov 2010, 21:04
by agregory99
Nope, on my Mac disk. Just odd that I can't find any evidence in VMWare of 3 disks. When in the image, there is just a single C:. Also can't "clean up" or shrink the disk from VMWare tools.

Re: Converting "funny" VMWare Disk

Posted: 10. Nov 2010, 14:26
by mpack
agregory99 wrote:Nope, on my Mac disk. Just odd that I can't find any evidence in VMWare of 3 disks.
If it is a split VMDK then its not 3 disks, it's one disk split into multiple segments (called extents in the VMDK spec). Since it's logically all one disk there will only be one reference to it in VMWare.

In a split VMDK the references to the segment (extent) list is contained in a so-called "descriptor" stored in the main .vmdk file. That file is either a small text file containing nothing but that descriptor, or the text descriptor can be embedded in the binary header of the first segment. You can usually tell which it is by the size: if the first (main) VMDK file is tiny (it should seldom need to be more than a few hundred bytes) then its actually a readable ASCII text file. If its ~2GB then this file the first segment. The readable text is still in there, you can see it if you view the file with a hex editor.

And for registering a split VMDK in VirtualBox: you just add the main VMDK to the media registry. The distribution of the drives data onto host files is an internal implementation detail that you shouldn't need to worry much about.

Re: Converting "funny" VMWare Disk

Posted: 10. Nov 2010, 15:17
by ChipMcK
Personally I found Disk2vhd.exe the easiest way to get from VMware Fusion to VBox.
Disk2vhd is a p2v utility, running in the VMware vm, that will create a VirtualPC disk image of the VMware virtual Machine.
VBox can 'run' the image directly (no further conversion).

Link Disk2exe is http://technet.microsoft.com/en-us/sysi ... 56415.aspx

You will need to define a VBox vm (NEW) in order to run the VHD image.
Once satisfied, use CloneVDI.exe to convert the VHD file to a VDI one.

Best!

Re: Converting "funny" VMWare Disk

Posted: 10. Nov 2010, 22:32
by mpack
ChipMcK wrote:Personally I found Disk2vhd.exe the easiest way to get from VMware Fusion to VBox.
There should be no need for that - the VMDK should work fine in VirtualBox - better in fact than a VHD. Of course you do need to uninstall VMWare GAs and make sure your IO APIC setting is enabled (assuming you need to match the VMWare default for this), but you would have to do those steps regardless. And you want to convert to VDI, either CloneVDI or "VBoxManage clonehd" can convert from VMDK to VDI directly, so there is no need for an intermediate VHD step.

Re: Converting "funny" VMWare Disk

Posted: 10. Nov 2010, 22:50
by ChipMcK
But if you might of SnapShots along with Split image, ...

(the 000003 is indicative of VMware SnapShots - 3rd one)

refer to http://forums.virtualbox.org/viewtopic.php?f=1&t=34517

Edited to include "Split" other post

Re: Converting "funny" VMWare Disk

Posted: 11. Nov 2010, 14:17
by mpack
ChipMcK wrote:But if you might of SnapShots along with Split image, ...
Actually, looking back to the original message (which for some reason I didn't do before), I agree that it does look more like snapshots rather than split image. In particular I see mention of "monolithicSparse", which is VMDK-speak for a monolithic (i.e. not segmented) dynamically growing disk.