LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Using pre-installed copy of Windows Vista as a Virtualbox guest from Linux host (http://www.linuxquestions.org/questions/linux-software-2/using-pre-installed-copy-of-windows-vista-as-a-virtualbox-guest-from-linux-host-747690/)

jrtayloriv 08-15-2009 12:10 AM

Using pre-installed copy of Windows Vista as a Virtualbox guest from Linux host
 
I have an OEM copy of Windows Vista Home Premium (64-bit) that came with my laptop. The laptop did not come with a Windows CD. I cannot reinstall Windows for Virtualbox.

I would like to run this pre-installed copy of Windows Vista as a guest using Virtualbox 3.0.4-r1, from Gentoo (kernel 2.6.30 -- 64bit).

The laptop has a Core 2 T6400 processor, which is not VT capable.

How can I do this? All of the guides seem to be going over how to install a copy of Windows to use with Virtualbox. The only exception I've found so far is this, but that says that I might destroy my copy of Windows -- not an option.

Is the process laid out in that guide the only way to use a pre-existing install of Windows from a Linux host?

If so, are there other VM/Emulation options that would allow me to do what I want, without any risk of corrupting my Windows installation?

Thanks,
jrtayloriv

catkin 08-15-2009 05:27 AM

If you have enough disk space or can add more then you can try it without endangering your Vista installation but that may not be the best way and the probabilities of success are small.

Do you have the Vista licence key? If so then the easiest, and most likely to succeed is to get a copy of a Vista DVD, perhaps by torrenting an iso? I don't know Vista (Whoa! Yippee!) so run this advice past experts if you can.

As a side issue, how are you going to reinstall Vista if your HDD fails? Always a good idea to have a disk image, it's a very good idea if you don't have a Vista DVD. First step for trying to install Vista in a VM, too.

If you want to try, after creating a Vista disk image, define a VBox VM for Vista including a .vdi file for its disk image. Then you boot something in the VM that can do disk imaging and restore your Vista disk image to it. When you boot the VM from its .vdi file Vista will find that the hardware has changed dramatically. Older versions of Windows sometimes were able to sort themsleves out in that situation after one-or-more restarts but now licenses are keyed to hardware ... who knows?

An easier approach might be to install VBox on Vista and run Linux in a VM.

jrtayloriv 08-15-2009 04:59 PM

Quote:

Do you have the Vista licence key? If so then the easiest, and most likely to succeed is to get a copy of a Vista DVD, perhaps by torrenting an iso? I don't know Vista (Whoa! Yippee!) so run this advice past experts if you can.
I do have a Vista key, which is on the sticker on my laptop, but I don't want to download a pirated copy of Windows, because it will likely be infected with viruses and spyware, which could possibly damage my Linux installation.

If I were to use a virus infected copy and install within virtualbox, could I somehow sandbox it so that it could not affect the Linux installation?

Quote:

An easier approach might be to install VBox on Vista and run Linux in a VM.
The only way I would ever like to run Windows is inside a sandbox, so that it can't touch my Linux installation. I feel uncomfortable even booting into Windows currently, with Linux residing on the same disk, on an unencrypted partition.

Quote:

If you want to try, after creating a Vista disk image, define a VBox VM for Vista including a .vdi file for its disk image. Then you boot something in the VM that can do disk imaging and restore your Vista disk image to it. When you boot the VM from its .vdi file Vista will find that the hardware has changed dramatically. Older versions of Windows sometimes were able to sort themsleves out in that situation after one-or-more restarts but now licenses are keyed to hardware ... who knows?
As far as making an image of the current install, I've got plenty of disk space to make a full image of the Windows disk, as long as I can be sure that it is recoverable.

One problem is that, from what I've read, various Windows system files stupidly tie themselves to actual physical locations on the disk when they are installed. That is, the system files cannot be moved to a new physical location on the disk. This means that even if I do create an image, it would have to be restored to exactly the same physical location. Amongst other problems, this means that there is no way to test my backup without restoring it to where it currently resides on disk (which would corrupt it if the image is no good).

Is there any known workaround for this issue? That is, can I somehow test the backup image given these circumstances?

--jrtayloriv

jschiwal 08-15-2009 07:03 PM

Do you know which files those are, that depend on fixed locations? It would be worth a try. If you can boot from a clone partition, then you can uninstall software you don't need, and resize the partition to make it smaller. Now you can make an image copy of this partition. If it works in virtual box, you can get rid of the clone. It would be a good idea to make a backup of your MBR before starting.

jrtayloriv 08-15-2009 07:19 PM

Thank you both for your help so far.


Quote:

Originally Posted by jschiwal
Do you know which files those are, that depend on fixed locations?

No, and I don't even know if that is actually true -- I just read that here. It seems like it is part of the Windows activation scheme.

Quote:

Originally Posted by jschiwal
If you can boot from a clone partition, then you can uninstall software you don't need, and resize the partition to make it smaller. Now you can make an image copy of this partition. If it works in virtual box, you can get rid of the clone. It would be a good idea to make a backup of your MBR before starting.

What do you mean by this? Do you mean to clone my windows partition with dd, to a newly created partition, and then test it out with virtualbox? Why would I need to backup my MBR? That is, what is risking damage to it?


I have been searching around more, and I did find this, which looks promising. Apparently, I can download a free copy of VMWare's "vCenter Converter" program to image my Windows install, convert in to .bin format with qemu's conversion utility, and then convert the .bin file to a .vdi with Virtualbox. (That is, I could if the stupid Sun site would send me an activation email)

But honestly, I'm still trying to get a grasp of the virtualization/emulation terminology and am not sure this is going to accomplish what I am after.

Any comments on that guide, reasons why I do/do not want to do it, etc?

Thanks again.
--jrtayloriv

scheidel21 08-17-2009 09:28 AM

I have seen what you want to do done with vmware player, and I have done it with xen, but as your processor has no VT xen is out. My suggestion would to be to google "vmware player, use existing physical installation of windows". I use VirtualBox for almost all my Virtualization, but I am not aware of a capability for it to boot an existing windows install.

catkin 08-17-2009 09:42 AM

Quote:

Originally Posted by jrtayloriv (Post 3644816)
No, and I don't even know if that is actually true -- I just read that here

It is true; I fell afoul of it when re-creating a Windows disk by file copy. The problem is the Windows boot system can't read big partitions when looking for the boot files -- BOOTLDR etc. so they have to be within the first however-many cylinders/blocks. Not a problem when the partition is populated by restoring an image because it keeps files in exactly the same place.


All times are GMT -5. The time now is 09:55 AM.