windowslinuxvirtual-machine

Boot a native OS on a hard disk as a virtual machine


I'm searching for a solution to boot a native OS on a hard disk as a virtual machine.

It's like what VMware Fusion did on a Mac which boots Windows in Boot Camp as a virtual machine.

In detail, I have Windows installed on /dev/sda2 and Ubuntu 11.10 on /dev/sda5.

Is there anyway to use a virtual machine software to boot the Windows on /dev/sda2 as a virtual machine while I'm using Ubuntu?


Solution

  • Yes, I did this long ago following this guide: Use VMWare to boot a physical Windows XP HD (Ubuntu-US-NM mailing list)

    of course, always backup and be careful!

    Essentially:

    1. Used a USB 3.5 HD enclosure and connect the XP drive to it.

      If the drive was shutdown uncleanly, you may need to manually mount it with the following command.

      sudo mount ntfs-3g /dev/whereyourdriveis /mount/somemountpoint -o force
      

      Once the drive is mounted under linux, continue to step 2.

    2. Launch VMWare.

    3. Go to File -> New -> New Virtual Machine.

    4. Select "Custom"

    5. Select Next

    6. Select your operating system (i.e. Win XP)

    7. Select Next

    8. Give it a name like "WindowsXP"

    9. Select Next

    10. Specify processor One or Two

    11. Select Next

    12. Choose public or private (on a single-user machine this doesn't matter)

    13. Select Next

    14. Select the memory to devote to the virtual machine. 512 MB is a pretty useful number.

    15. Select your network connection

    16. Select Next.

    17. Leave SCSI set to BusLogic

    18. Select Next

    19. Select Use Physical Disk

    20. Select Next

    21. Select Use Entire Drive

    22. Select Next

    23. Specify the place to save the VM

    24. At this point you're done. Select Power On to boot the Physical drive in VMWare!

    More Info: I should add, I have successfully done this, but I also had success using this method years even years before. So there are at least two known and tested ways for accomplishing this that I can tell you.