Hello all, Below is a harvest of gems I cobbled together all in one place that I'd like to share with anyone trying to install OSX on either VMWare or a Hackintosh.
VMware Workstation 5.5 Examples Using the VMware Virtual Disk Manager The following examples illustrate how to use the virtual disk manager. You run the virtual disk manager from a command prompt.
Creating a Virtual Disk To create a new virtual disk, use a command like the following: vmware-vdiskmanager -c -t 0 -s 40GB -a ide myDisk.vmdk This creates a 40GB IDE virtual disk named myDisk.vmdk. The virtual disk is contained in a single.vmdk file.
The disk space is not preallocated. Converting a Virtual Disk To convert a virtual disk from preallocated to growable, use a command like the following: vmware-vdiskmanager -r sourceDisk.vmdk -t 0 targetDisk.vmdk This converts the disk from its original preallocated type to a growable virtual disk consisting of a single virtual disk file.
The virtual disk space is no longer preallocated, and the virtual disk manager reclaims some disk space in the virtual disk so it is only as large as the data contained within it. Expand the Size of an Existing Virtual Disk To expand the size of a virtual disk, use a command like the following: vmware-vdiskmanager -x 40GB myDisk.vmdk This increases the maximum capacity of the virtual disk to 40GB. Renaming a Virtual Disk To rename a virtual disk, first remove it from any virtual machine that contains the disk (choose VM Settings , then click Remove).
Then use the following: vmware-vdiskmanager -n myDisk.vmdk myNewDisk.vmdk To rename the disk and locate it in a different directory, use: vmware-vdiskmanager -n myDisk.vmdk. MyNewDisk.vmdk Note: The paths used in these examples assume a Windows host. To locate the disk in a different directory but keep the same name, use: vmware-vdiskmanager -n myDisk.vmdk. MyDisk.vmdk After you rename or relocate the virtual disk, add it back to any virtual machines that use it. Choose VM Settings, click Add, then follow the wizard to add this existing virtual disk. Defragmenting a Virtual Disk To defragment a virtual disk, use a command like the following: vmware-vdiskmanager -d myDisk.vmdk Remember, you cannot defragment a virtual disk if you allocated all the disk space when you created the virtual disk.
You cannot defragment a physical disk. See for a discussion of the performance impact of defragmenting drives. Preparing a Virtual Disk for Shrinking Before you can shrink a virtual disk, you must prepare each volume on the disk (C: or D:, for example) for shrinking. To prepare a volume, it must be located on a Windows host. First you must mount the volume. To mount the volume, use the VMware DiskMount Utility, available as a free download from the VMware Web site. For information about downloading and using VMware DiskMount, see the VMware DiskMount user's manual, available from the VMware Web site at.
The is available as a free download. VMware DiskMount mounts individual volumes of a virtual disk.
For the best results when you shrink a virtual disk, you should mount all the volumes and shrink them. After you mount a virtual disk volume, use the virtual disk manager to prepare the disk for shrinking. To prepare the volume mounted as the M: drive for shrinking, use the following command: vmware-vdiskmanager -p M: Once the preparations are complete, unmount the volume. Repeat this process for each volume of the virtual disk. After you prepare all the volumes for shrinking, you can shrink the virtual disk. Shrinking a Virtual Disk To shrink a virtual disk, it must be located on a Windows host. Before you can shrink the virtual disk, make sure you prepare all the volumes of the virtual disk for shrinking.
Then use a command like the following: vmware-vdiskmanager -k myDisk.vmdk Remember, you cannot shrink a virtual disk if you allocated all the disk space when you created the virtual disk. You cannot shrink a physical disk. If the virtual disk has any snapshots, you cannot shrink the virtual disk. You must delete all snapshots before you shrink the virtual disk.
As part of the, I run several virtual machines as build slaves. I started with because it is free software and I prefer to support free software, but it’s still a bit too fragile and it still lacks x8664 guest support. When I discovered that is now available for free–well, free as in beer, anyway–I happily installed it and set up some new VMs on it. Best of all, it supports x8664 guests! Of course, now I have the problem of migrating those VirtualBox guest VMs over to VMware. VMware uses its own format for storing virtual disk images, while VirtualBox uses its own VDI format.
The first step is getting a copy of vditool, VirtualBox’s command line program for manipulating VDI files. The host OS I used to run VirtualBox is ‘s 8.04 Hardy Heron on AMD64. The VirtualBox 1.6.0.deb package didn’t include vditool, for some reason.
Fortunately, includes it, so lets just grab it from there. $ wget $ dpkg -x virtualbox-ose1.5.6-dfsg-6amd64.deb vbox-1.5.6 $ sudo cp vbox-1.5.6/usr/lib/virtualbox/vditool /usr/lib/virtualbox/vditool $ sudo ln -sf /usr/lib/virtualbox/vditool /usr/bin/vditool There, now we have vditool installed. Next, we use it to export our old VirtualBox VDI back to raw disk data. However, if you used VirtualBox’s “Snapshots” with differencing VDI’s, you need to discard all snapshots before the one you want to write out as the raw disk: only the “base” data gets written out, not the “Current State”. $ cd /.VirtualBox/VDI $ vditool copydd win2000-i386-32gb.vdi win2000-i386-32gb.dd vditool Copyright (c) 2004-2008 innotek GmbH.
Copying VDI image file='win2000-i386-32gb.vdi' to DD file='win2000-i386-32gb.dd'. The operation completed successfully! Be careful, this could consume a lot of disk space, if you were using compacted VDI’s instead of fixed size as the raw image will be the full size of the disk image, which in my case was 32 GB even though the VDI only took 6.5 GB on disk. Once we have the raw data, we can create the VMDK metadata for our DD image.
We compute the size of the raw data in sectors by dividing its size in bytes by 512: $ stat -printf='%s 512/p' win2000-i386-32gb.dd dc 67108864 We also need to compute the CHS geometry of the virtual disk. I used the assumption of 255 heads and 63 sectors: $ stat -printf='%s 512/255/63/p' win2000-i386-32gb.dd dc 4177 Once we have that information, we go ahead and create the VMDK metadata. Change the elements highlighted in blue as appropriate for your system: $ cat win2000-i386-32gb-flat.vmdk. I am using virtualbox and I am trying to backup my virtual machines. I have a ubuntu host and a windows xp guest. I had 5 snapshots of this guest. I want to keep the current state as my new base state and get rid of all the snapshots.
I deleted snapshots 1 through 4. Took forever I now have snapshot 5 and current state below it. Do I delete snapshot 5 will that keep me at current state or will that revert me to the initial pre snapshot 1 state. I havent found a straight answer yet and thought you might know. Thanks in advance for anybody to really spell it out for me.
Found your blog helpful and well thought out – so I figured I should share. I might be missing something – as I’m only a VirtualBox user and not an expert: Although I could install XP64 on VirtualBox 2.1.4, I’m limited to only running one 64bit VirtualBox at a time Once I launch a 64bit VirtualBox any additional attempts to run ANY VirtualBox results in a dialog box that ‘VT-x’ is already in use and stops the second instance – even regular 32-bit VirtualBox’s cannot run if 64 is running. I have VT-x disabled in the 32-bit boxes – and can run several of those at a time.
And 64 wont run if a 32 is running. I’m now in the process of installing VMWare yet again.
Hi, I was trying to do the same migration from VBox 2.1.6 to VMServer 2.0. Vditool is no longer included into VBox distro, BUT! There is even easier way now: 1. Convert VDI to VMDK using: VBoxManage clonehd -formal VMDK 2. Create a VM in VMServer similar to the the settings of your VirtualBox one, but without HDD Unfortunately in may case the VMDK disk created by VBox did not work, BUT! Convert VBox VMDK file to VMSeerver VMDK file: vmware-vdiskmanager -r -t 0 4. Put the into the VMWare directory and add HDD to your newly created VM using existing image.
Worked like charm for both Ubuntu and Win XP images. Win XP started without repair install, found a sload of new hardware and works after a reboot! Dont’ forget to install VMware tools, of course! Happy Virtualization! And now without lees-than and more-than brackets: 1. Convert VDI to VMDK using: VBoxManage clonehd vdifile vmdkfile -formal VMDK 2.
Create a VM in VMServer similar to the the settings of your VirtualBox one, but without HDD Unfortunately in may case the VMDK disk created by VBox did not work, BUT! Convert VBox VMDK file to VMSeerver VMDK file: vmware-vdiskmanager -r vboxvmdkfile -t 0 newvmdkfile 4. Put the newvmdkfile into the VMWare directory and add HDD to your newly created VM using existing image. For converting VirtualBox Windows machines to VMware, VMware’s Converter ( ) has worked seamlessly for me. I have used it to convert both physical PCs and VirtualBox PCs to VMware VMDK.
By default it also makes all the changes needed to boot right up in a new VMware guest machine. Only additional work was to install VMware tools, and reboot. No need for a Windows reinstall or update. Current version of VMware Converter Standalone is 4.0.0. I am using VMware Fusion 2.0 on Mac OS X 10.5.6.
My converted guests were all WinXP, SP3. They were converted from VirtualBox 2.1.4 on Mac OS X 10.5.6. Note that the converter only works on Windows OS, though, so if you’re converting a Linux or other OS, it won’t help. Thanks for the great instructions – worked like a champ for me. I was migrating a WIndows XP Pro guest OS and made one small change – disk adaptor type of ide instead of buslogic.
As a result I was able to boot the OS under VMWare immediately; albeit it went through several boot cycles installing drivers for the new hardware and also required re-activation at M$ due to significant hardware change. I booted the new OS using the free VMWare Player. Having created an empty VMWare image I edited the.vmx definition file to point to my freshly minted copy of the VirtualBox image and away we went.