Booting your Dual-boot OS in a virtual machine

In my previous post I showed how to boot from a USB device in a virtual machine by directly connecting a physical disk from the host to the VM. Just to see how far you can go with that I tried to boot my dual-boot OS in the same way.

Note: directly accessing your boot-disk from a VM can seriously mess up things. You are warned :)

Note: simultaneously running your host OS in a virtual machine is most definitely going to result in disaster; I strongly advise not to do that.

The process is basically the same as for attaching your USB stick, but this time you have to select PhysicalDrive0 in QEMU or VMWare player.



In VMWare player you have the option to select the partions the VM is allowed to access. The bootsector/MBR is always accessible, so you can use this option to prevent the VM from accessing your host OS. On my disk I have Samurai WTF installed next to my windows OS. I have 2 NTFS partions, 1 FAT32 partition and 2 ext partitions. In this example I booted in windows and want to have the VM boot the dual-boot linux so I only selected the ext partitions in the VM properties:



Booting the VM first shows the bootloader



And after selecting the Linux option it will boot without problems.



Attempting to boot from a partion not selected in the VM properties will result in an error, so you can use this option to prevent accidentally selecting the wrong OS:

No comments:

Post a Comment