You can attach the physical hard disk to the Mac and create a virtual machine that uses the partitions on the disk. Create a Hard Disk that uses the Boot Camp option.
If you want to convert the disk to a virtual hard disk .hdd instead then there's a couple options:
Parallels Desktop 6 has a new feature to import from Boot Camp. I haven't tried it so I don't know how well it works.
You can convert a physical hard disk to an .hdd manually but it's not easy (I haven't tested this fully and only on Parallels Desktop 6):
- First create an .hdd in a new virtual machine. Make it uncompressed and at least the size of your hard disk.
- Attach your hard disk and make sure all the partitions are unmounted (use Disk Utility to unmount the partitions).
- Use diskutil to list all your disks, then use fdisk to examine your hard disk:
diskutil list
sudo fdisk /dev/disk#
- You should see something like Disk: /dev/disk# geometry: cylinders/heads/sectors [total sectors]
- Open the DiskDescriptor.xml file that is located in the .hdd (~/Documents/Parallels/YourNewVM.pvm/YourNewVM-0.hdd/DiskDescriptor.xml)
- In the .xml file, set the Disk_size to total sectors. Make sure that this number + 1 is smaller than the Storage/End number in the same file. If it isn't then you made the .hdd too small.
- Set Heads to heads
- Set Sectors to sectors
- Note the value of Padding (probably 1).
- Make sure the DiskDescripter.xml.Backup has the same changes.
- Use the dd command to copy all the contents of your hard disk to the .hdd like this:
sudo dd bs=512 oseek=1 conv=notrunc if=/dev/disk# of=~/Documents/Parallels/YourNewVM.pvm/YourNewVM-0.hdd/YourNewVM-0.hdd.0.\{########-####-####-####-############\}.hds
The oseek number should match the Padding number.
- The dd command should return with the number of sectors copied which should equal the total sectors that fdisk displayed.
My DiskDescriptor.xml looks like this (after copying a Windows 95 .img to an .hdd and making the changes to the geometry fields):
Code:
<Parallels_disk_image Version="1.0">
<Disk_Parameters>
<Disk_size>526176</Disk_size>
<Cylinders>522</Cylinders>
<Heads>16</Heads>
<Sectors>63</Sectors>
<Padding>1</Padding>
<Encryption>
<Engine>{00000000-0000-0000-0000-000000000000}</Engine>
<Data></Data>
</Encryption>
<Miscellaneous>
<CompatLevel>level2</CompatLevel>
<Bootable>1</Bootable>
</Miscellaneous>
</Disk_Parameters>
<StorageData>
<Storage>
<Start>0</Start>
<End>629248</End>
<Blocksize>512</Blocksize>
<Image>
<GUID>{5fbaabe3-6958-40ff-92a7-860e329aab41}</GUID>
<Type>Plain</Type>
<File>Windows 95-0.hdd.0.{5fbaabe3-6958-40ff-92a7-860e329aab41}.hds</File>
</Image>
</Storage>
</StorageData>
<Snapshots>
<Shot>
<GUID>{5fbaabe3-6958-40ff-92a7-860e329aab41}</GUID>
<ParentGUID>{00000000-0000-0000-0000-000000000000}</ParentGUID>
</Shot>
</Snapshots>
</Parallels_disk_image>
You should be able to right click the .hdd and use Open with... Parallels Mounter to view the contents of the .hdd in the Finder. I think it should be possible to change the .hdd to a compressed disk image.
The same technique could be used to convert an .hdd to an .img which can be converted by Disk Utility to a compressed disk image .dmg. Disk Utility can mount .img and .dmg files directly so it could be used to examine Linux disks since Parallels Mounter only supported FAT and NTFS disks.