VMware
4 Replies Last post: Jan 18, 2009 5:36 AM by icemanmelb  

Migrating Fusion VM to Boot Camp - partially there posted: Apr 10, 2007 10:59 PM

Click to view rcardona2k's profile Champion 5,197 posts since
Oct 20, 2005
Well my ambition was certainly in the right place but I haven't achieved success yet.

Without an easy GUI migration tool, there's significant precision required to migrate a Fusion VM to a Boot Camp partition. Although these steps don't work, it a good idea to document it so others can run in parallel with it.

What I have are identically sized source and destination partitions. First is my pre-allocated VMware Fusion Windows XP VM, the other is my Boot Camp partition -- each of which in my case are 10 GB. If you have a dynamically expanding VMDK you can convert it over to a pre-allocated one but it will balloon to its full disk capacity (assuming you have the space). If your VM's virtual disk capacity doesn't match your Boot Camp partition capacity, then you have a resizing exercise to go through first so that they match, otherwise you'll have no chance of this succeeding. The source volume resizing or the Boot Camp resize exercise is left to reader.

What I determined by inspecting my Boot Camp partition is it contains a clean NTFS volume at /dev/rdisk0s3. And my pre-allocated disk is a non-obfuscated container stored in the Disk-flat.vmdk file. By using a hex editor like 0xED, I found the NTFS marker offset in the pre-allocated file at offset 0x7E00 (32256). This is a typical location for a physical disk.

My idea for migration was simply to dd copy from offset 0x7E00 to /dev/rdisk0s3. As far as transferring the data that actually works. And the resultant Fusion to NTFS Boot Camp partition is mountable in the Finder! That was acid test #1. Unfortunately that's as far as I got, this partition is not bootable in either Fusion or native Boot Camp - so double-strike. The failure to boot is not a fatal flaw yet, I still believe it's possible to go down this route.

Some basic steps you can do are:
0. Find your Boot Camp partition, e.g. sudo fdisk /dev/rdisk0. Normally this will be the first non-HFS+ partition after your startup disk's HFS partition.

1. (Optional) Backup your existing Boot Camp partition with dd, e.g. I backed mine up to an external USB drive, e.g. dd if=/dev/rdisk0s3 of=/Volumes/ExternalUSB/BootCamp.partition. This will take some time. It may be possible to save the partition with Disk Utility too by choosing your partition and clicking New Image... but I'm not sure I could restore a BC partition from a .dmg without dd.

2. Migrate the data from a Fusion pre-allocated VMDK to an identically sized Boot Camp partition, with the VM turned off, issue this command, e.g.
[code]
sudo dd if=/path/to/your/FusionVM-flat.vmdk skip=63 of=/dev/rdisk0s3
[/code]
Note: 63 is a block-offset computed by taking 32256 (offset to NTFS) and dividing it by 512, the default block size.
Note2: This operation does not provide any feedback and takes quites a long time. You can monitor dd's progress with Activity Monitor or top. On my system it kept running marginally consuming 10% of the CPU.

Some of the challenges I'm sure I have yet to resolve are my Fusion VM is a SCSI disk and Boot Camp requires IDE, so that's an issue, the others have to do with boot.ini. I'm going to have to review my Boot Camp archive to see if I have to re-gen boot.ini to match the Boot Camp partitioning scheme. I have successfully tested changing the VMDK from SCSI to IDE so I'm not worried about that part of the conversion.

Warning: I hestitate to publish some of this for fear that someone will try this without backups of your entire OS X disk and/or Boot Camp. These steps are at a 0.1 stage and I'm providing them for those who can parse what I've written and are interested in trying their own ideas. If you're not sure of what you're reading do NOT try this at home. Or if you lose data, don't blame me :)

I'm still confident I can migrate my Fusion VM to a Boot Camp partition, so stay tuned for more updates.
Click to view macwiz's profile Novice 8 posts since
Feb 20, 2007
Have you progressed any further? I tried a less technical hack which just involved backing up the vm disk to a file and then restoring it within boot camp. I was then able to boot into Windows, and it certainly had all my software and settings from the vm disk, but unfortunately the XP activation thing popped up, which I am trying to avoid. This despite having previously installed the mac drivers into the vm disk (for bluetooth if I remember).

The only hassle I had was it claiming hal.dll was corrupt or missing. It wasn't, I just had to put in a few extra lines into boot.ini, running the possible permutations, and one of them happily was the one needed to boot XP.

May be I call that good enough and just buy another license.
Click to view rhcw's profile Lurker 3 posts since
Aug 21, 2007
What did you use to backup the VM file?
Click to view icemanmelb's profile Lurker 1 posts since
Jan 30, 2008

Thanks for the Info Rich,

You must be a rocket scientist as my simple brain can't / won't go to that level of technical difficulties. I intend to take the simple way out.

1. Install New Windows XP System on BootCamp

2. Use import Users & settings feature once i mount Fusion VM in boot camp to migrate all my settings.

3. Install the few programs that I have.

I'll let you guys know how i go. Might be easier... I hope

Ice

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities