Booting into a Virtual Machine from a physical installation

11

6

In Mac OSX, you can create a Boot Camp partition, install Windows on it, and then later by using Parallels you can boot into that OS virtually in OS X! Its awesome, I've been using it on my macbook.

So, what I want to do now is, on my desktop running Windows 7 and Ubuntu 9.04, I want to virtualize my Windows 7 OS in Ubuntu. I have a copy of VMware Workstation, but I can't figure out how to do it that way. The only thing I've figured out is to convert a physical installation into a virtual, and boot from that. However, that doesn't mean I'm booting from that physical drive, meaning no changes are retained. Once I convert the installation to a virtual machine, it becomes a separate entity.

What I want to do is be able to dual boot and also have Ubuntu boot my physical Windows installation virtually when I want to. Can this be done through VMware Workstation? If not, how can I do this?

GiH

Posted 2009-11-13T07:09:06.190

Reputation: 3 667

Since I've already got VMware Workstation I'm going to try using that. I've found this pdf (http://www.vmware.com/pdf/dualboot%5Ftech%5Fnote.pdf) via the vmware community forums. I'm going to try and follow that and post back my results.

Thanks for your answers!

– GiH – 2012-11-16T21:24:24.893

Answers

1

On Windows 8, I was able to to it quite easily. Instead of using VMWare or Virtual box, I used the default Hyper-V program to do it.

Go to Disk Management, and make the second HDD as offline(Right-Click on the HDD and from the context menu, select "Offline".

Install Hyper-V manager, if you don't already have that. You can probably Run "Programs and Features" to install this.

Once you do this, fire up Hyper-V manager, create a new virtual machine, and choose the disk as the second HDD on your system which you had just made offline.

That should initiate the boot from the second HDD.

When an HDD is offline, you cannot access it from Windows partition. So, after you are done working with the VM, and shutdown, go to Disk Management, and make the HDD online again, and then you can access it from your Windows partition.

Here's a link to help you with installing Hyper-V manager on Windows 7.

http://blogs.technet.com/b/schadinio/archive/2010/07/09/installing-hyper-v-manager-on-windows-7.aspx

Kumar Bibek

Posted 2009-11-13T07:09:06.190

Reputation: 384

1

I know that VMWare Server can do this when you create the virtual machine.

I'd guess that Workstation is similar. If you create a new VM, when creating the virtual disk, choose instead to use a physical disk. Note: You have to run this process as an administrator, so launch VMWare with sudo or gksudo.

If Workstation doesn't help you, then VMWare server will do this, and it's free.

Caveats:

  1. VMWare server, I THINK, doesn't support USB 2.0.
  2. Now, you should also note that when you start the system as a VM, it's going to start looking all over the place for drivers, and every time you switch it back between guest OS and native OS, you'll confuse it. MIGHT even cause some "Activation" issues.

Jono

Posted 2009-11-13T07:09:06.190

Reputation: 235

VMWare Server is no longer supported - are there other options available? – Anderson Green – 2012-11-10T17:04:04.553

I thought VMW server doesn't allow for interaction with the virtual machines locally, but rather serves them up over the network. So that would be dissimilar to the macbook setup – dlamblin – 2009-11-14T02:27:34.843

1

See Configuring a Dual-Boot Computer for Use with a Virtual Machine:

Many users install VMware Workstation on a dual-boot or multiple-boot computer so they can run one or more of the existing operating systems in a virtual machine. If you are doing this, you may want to use the existing installation of an operating system rather than reinstall it in a virtual machine.

To support such installations, VMware Workstation makes it possible for you to use a physical IDE disk or partition, also known as a physical disk, inside a virtual machine.

harrymc

Posted 2009-11-13T07:09:06.190

Reputation: 306 093

0

kvm/qemu can do that pretty easily (and Windows 7 tolerates hw changes pretty well... not like xp..)

sudo kvm -hda /dev/sda -m 1024

This IS dangerous if you don't know what you are doing. You will see GRUB first and make sure you never start Ubuntu from Ubuntu. I actually suggest that you change the boot order in GRUB. Also never have the same partition mounted from both OSs. And backup! :D

Tarnay Kálmán

Posted 2009-11-13T07:09:06.190

Reputation: 3 457

I'll look into this thanks! I have a question though, when you say never have the same partition mounted from both OS's, does that include external drives? External drives automatically mount themselves, so I might run into problems there right? – GiH – 2009-11-14T06:20:10.600

No, that shouldn't be a problem. The virtualized machine only sees the HDDs(/any other device) you specify on the command line. – Tarnay Kálmán – 2009-11-14T18:25:54.797