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.
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.