LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Running Windows 7 in a Virtual Machine on my new Laptop (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/running-windows-7-in-a-virtual-machine-on-my-new-laptop-860096/)

dwains 02-01-2011 05:46 PM

Running Windows 7 in a Virtual Machine on my new Laptop
 
Just before Christmas I purchased a new Toshiba (Satellite A665) laptop that is destined to become my main personal machine. It came pre-installed with Windows 7 (no surprise), but I want to use Ubuntu 10.10 on this system. However, there are 3-4 programs I really need to run under Windows (TaxCut, Quicken, etc). So what I would like to do is turn that preloaded Windows 7 installation into a virtual machine, and then have that available to run under Ubuntu when I need it. This does not sound like rocket science to me, but so far I have not made much progress.

1. I think I have settled on running VirtualBox 4 as my hypervisor of choice. It seems to be the most polished of the things I have tried so far. But I would take about any of the available solutions (Xen, KVM) that would work.

2. I tried to make a VM out of Windows 7 backup CDs, but I would get errors after the initial boot in several hypervisors. This may be due to Microsoft brain damaging the installation to prevent the OEM version of Windows 7 from being installed.

3. I also tried the disk2vhd utility, but I could never get it to produce both a vhd with both the system partition and the c: drive. I could get the c: drive to work by itself, but this vhd would not boot under any of the hypervisors. I get a disk error.

I am kinda running out of ideas. I understand I could buy a non-OEM copy of Windows 7 - but I really do not want to do that - I have already purchased Windows as far as I am concerned. I am not robbing MS of thing. And I want to run this copy of Windows on the same system it came with.

Any ideas for me to try?

rayfward 02-01-2011 06:10 PM

Well windows 7 works with Virtualbox I have even installed vista from the recovery CD on Virtualbox.
If you want to install from an image make an iso image or mount the cd/dvd rom under Virtualbox.
I have messed around with kvm on and off for a couple of years now and it's not as easy or fast as Virtualbox.

Regards

EDDY1 02-01-2011 06:13 PM

I have a few Virtual machines in virtual box and wanted to install my windows machine to virtualbox, but after looking at the info at Vb, I was discouraged because they say that you're not supposed to load a system that came preinstalled to VB.
But I was Googling different os'es and saw that you can download vdi's with preloaded os'es free, but they also take donations.

jefro 02-01-2011 07:31 PM

That is not the way to do it. Just keep the W7 and run either Virtualbox or VMplayer. They would run well on that and you could run both near to above native speeds. Then install all the linux you want. No need to fool with wireless drivers, sata controllers or audio or such.


You will not be able to use W7 restore disk that came with it normally. The disk is tied to hardware. It could be possible that one could use a P2V app to convert it or clone it off to a VM. I have used dd to a file and then converted it in qemu-image and then do a repair. The problem is that the repair may require a new key from MS so you would have wasted too much time.

I say just keep the W7 and run VM's if you want you can install guest additions to select installs to make it drag and drop and other goodies.

jfk 02-07-2011 03:44 AM

Quote:

Originally Posted by dwains (Post 4245125)
Just before Christmas I purchased a new Toshiba (Satellite A665) laptop that is destined to become my main personal machine. It came pre-installed with Windows 7 (no surprise), but I want to use Ubuntu 10.10 on this system. However, there are 3-4 programs I really need to run under Windows (TaxCut, Quicken, etc). So what I would like to do is turn that preloaded Windows 7 installation into a virtual machine, and then have that available to run under Ubuntu when I need it. This does not sound like rocket science to me, but so far I have not made much progress.

1. I think I have settled on running VirtualBox 4 as my hypervisor of choice. It seems to be the most polished of the things I have tried so far. But I would take about any of the available solutions (Xen, KVM) that would work.

2. I tried to make a VM out of Windows 7 backup CDs, but I would get errors after the initial boot in several hypervisors. This may be due to Microsoft brain damaging the installation to prevent the OEM version of Windows 7 from being installed.

3. I also tried the disk2vhd utility, but I could never get it to produce both a vhd with both the system partition and the c: drive. I could get the c: drive to work by itself, but this vhd would not boot under any of the hypervisors. I get a disk error.

I am kinda running out of ideas. I understand I could buy a non-OEM copy of Windows 7 - but I really do not want to do that - I have already purchased Windows as far as I am concerned. I am not robbing MS of thing. And I want to run this copy of Windows on the same system it came with.

Any ideas for me to try?

My suggestion: Invert it.

Download the VMWare convertor from vmware.com - run it on your existing W7 OS and create a VMDK file on an external USB or Network Drive. Back up *everything* using Clonezilla or similar. Now install the Linux of your choice, add Virtualbox (which will run native VMWare .vmdk files), put your converted .vmdk file someone on your newly installed Linux box, then run it with VirtualBox. I've done this successfully with XP and Vista, it should work with W7 but I've not bothered as I have no need to. If you happen to subscribe to Linux Format magazine you'll find my writeup of this in backissue 101 - http://www.linuxformat.com/archives?issue=101

dwains 02-15-2011 08:34 PM

Quote:

My suggestion: Invert it.

Download the VMWare convertor from vmware.com - run it on your existing W7 OS and create a VMDK file on an external USB or Network Drive. Back up *everything* using Clonezilla or similar. Now install the Linux of your choice, add Virtualbox (which will run native VMWare .vmdk files), put your converted .vmdk file someone on your newly installed Linux box, then run it with VirtualBox. I've done this successfully with XP and Vista, it should work with W7 but I've not bothered as I have no need to. If you happen to subscribe to Linux Format magazine you'll find my writeup of this in backissue 101 - http://www.linuxformat.com/archives?issue=101
Thank you so much for this great suggestion. And sorry it took me so long to reply. I will report that it almost worked. It certainly got me very close. The one remaining issue may not be fixable - but let me tell you what happened.

I took your suggestion and tried the VMware converter and got the vmdk moved over to my Linux installation. Luckily I am using two different disk drives that I have been swapping back and forth, so I did not have to wipe anything clean

Once I had the image on Ubuntu, to my great glee it booted right up in VirtualBox. I had never got that far before. Win 7 reports that Windows is "not genuine" but that may be fixable by re-activating - not positive on that, but that might work.

My show-stopping issue is that many of the virtual devices don't work. The drivers are there, but Windows - via Device Manager - reports that there are problems:
This device cannot find enough free resources that it can use. (Code 12)
If you want to use this device. you will need to disable one of the other devices on this system.
I could probably live with this but it includes the network device, which prevents me from moving any data to or from the VM - which is hard to get around. I even tried installing the VirtualBox tools, which gave me some brief hope, but that changed nothing.

From my net reading this is a common problem when folks have tried to virtualize the OEM version of Windows. MS may have just did all of these things as traps to keep folks like me from fully utilizing my purchase.

But oh so close!

EDDY1 02-15-2011 08:57 PM

That was what I was saying in previous post M$ doesn't approve of the OEM preinstalled wins to put in VM. I saw it at the end of P2V documentation. What you may have to do to get updates is download manually and install them. M$ only approves of fully licensed retail wins in VM.

rayfward 02-16-2011 12:56 AM

Quote:

Originally Posted by dwains (Post 4259717)
Thank you so much for this great suggestion. And sorry it took me so long to reply. I will report that it almost worked. It certainly got me very close. The one remaining issue may not be fixable - but let me tell you what happened.

I took your suggestion and tried the VMware converter and got the vmdk moved over to my Linux installation. Luckily I am using two different disk drives that I have been swapping back and forth, so I did not have to wipe anything clean

Once I had the image on Ubuntu, to my great glee it booted right up in VirtualBox. I had never got that far before. Win 7 reports that Windows is "not genuine" but that may be fixable by re-activating - not positive on that, but that might work.

My show-stopping issue is that many of the virtual devices don't work. The drivers are there, but Windows - via Device Manager - reports that there are problems:
This device cannot find enough free resources that it can use. (Code 12)
If you want to use this device. you will need to disable one of the other devices on this system.
I could probably live with this but it includes the network device, which prevents me from moving any data to or from the VM - which is hard to get around. I even tried installing the VirtualBox tools, which gave me some brief hope, but that changed nothing.

From my net reading this is a common problem when folks have tried to virtualize the OEM version of Windows. MS may have just did all of these things as traps to keep folks like me from fully utilizing my purchase.

But oh so close!

Yes Windows does that. The change in apparent hardware configuration causes windows to think you pirated the installation. Windows XP is the same. I was performing diabolical experiments on my XP Virtual box when Windows proclaimed my hardware changes were to significant and would have to re-register my copy of XP.

I'm not sure if this is still in force but you only get three tries at registering after that you have to call M$ help line (Premium rate of course) to get it unlocked.

dwains 02-16-2011 07:42 AM

Thanks for all the great suggestions and follow up.

I think I am about to punt this one for now.

It seems like it would be fair for MS to grant you the ability to run an OEM copy of Windows in a VM on the original hardware that you bought it with. I guess not.

Just another reason to scorn MS.

So my choices are down to two I think.

1. Run Win 7 natively and use VirtualBox to run Linux. This way will work but it leaves a bad taste in my mouth. I only need Windows for a couple of things - I hate to have the whole system running Windows.

2. Obtain a full copy of Windows and install in a VM. I will explore this and my go this route if I can get it cheaply enough. I really hate to pay for another copy of Windows though. That sure does not seem fair.

Thanks for all of the help and suggestions.

EDDY1 02-16-2011 12:31 PM

By the documentation in P2V, I'm not even sure if you can install OEM full version and obtain updates, I think they want you to pay for M$ full.

jefro 02-16-2011 07:05 PM

I might suggest that you consider using flash drive installs too. They seem to work fine for me most of the time and the speed is similar to real hard drive installs. That is if you don't want to use a dual boot or VM.

cshewmaker 04-07-2011 05:34 PM

Will Linux on a flash drive run on my Vista pc, running programs in Linux, but accessing files on the c drive?

jefro 04-07-2011 07:29 PM

You generally get linux to use other partitions in any way that a normal install does.

I'd consider making a linux partition if I were to do that. W7 can shrink it's drive a bit and use a small amount on that if needed.

MMlosh 08-14-2012 02:25 PM

Solution for This device cannot find enough free resources that it can use (code 12)
 
Search engines directed me here at first, so I'll link the solution here.

Solution for "This device cannot find enough free resources that it can use (code 12)" issue:
Found at https://forums.virtualbox.org/viewto...=33636#p191538

Get rid of the AMD PCI driver ("AMD pci express 3gio filter"), install a generic one "PCI Bus" which doesn't hog resources.
Click-by-click guide is provided at that virtualbox forum thread.

footnote: This is a copy of a message I put on another virtuabox thread using a bugmenot account.

guyonearth 08-14-2012 03:40 PM

I'm curious why you wouldn't just install Linux as dual boot, and not go to all this trouble.


All times are GMT -5. The time now is 09:10 PM.