Discuss: HOWTO: Windows 7: In both VM and native

Discussions about using Windows guests in VirtualBox.
cumthsc
Posts: 12
Joined: 11. Feb 2011, 22:47
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: Windows 7, RHEL 6

Re: Discuss: HOWTO: Windows 7: In both VM and native

Post by cumthsc »

Anybody still following this thread? Or is it just that nobody has any suggestions for me? :?:
cumthsc
Posts: 12
Joined: 11. Feb 2011, 22:47
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: Windows 7, RHEL 6

Re: Discuss: HOWTO: Windows 7: In both VM and native

Post by cumthsc »

The problem with failure to boot after writing the MBR was due to the fact that the Windows partition was not flagged as bootable. Doing this inside of Vbox does not affect the setting on the physical drive. After changing that setting, the system does attempt to boot into Windows. Unfortunately, now the system goes through an endless cycle of bluescreens and reboots. Attempting to repair the system from the installation disk fails as well. The system does self-repair when booted natively into Safe Mode.

Anyone else experience this? Any suggestions?

TIA.
cheshirekow
Posts: 2
Joined: 19. Apr 2011, 21:00
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7

Re: Discuss: HOWTO: Windows 7: In both VM and native

Post by cheshirekow »

mrmylanman wrote:I got to the point where the VMDK file is created (which it did successfully), however as I am creating the VM, I get the following error:
"Failed to open the hard disk /home/mylan/Virtualbox VMs/Windows7/raw7.vmdk

The medium '/home/mylan/VirtualBox VMs/Windows7/raw7.vmdk' can't be used as the requested device type.

Details:

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: Medium
Interface: IMedium {9edda847-1279-4b0a-9af7-9d66251ccc18}
Callee: IVirtualBox {d2de270c-1d4b-4c9e-843f-bbb9b47269ff}
I had the exact same problem. For me, I forgot to change the ownership of the .vmdk file, it was owned by root. I changed that to my user and it worked.
cheshirekow
Posts: 2
Joined: 19. Apr 2011, 21:00
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7

Re: Discuss: HOWTO: Windows 7: In both VM and native

Post by cheshirekow »

cumthsc wrote:Unfortunately, now the system goes through an endless cycle of bluescreens and reboots.
I have the same problem, and I have no idea what it is :/.
varungulshan
Posts: 2
Joined: 7. Dec 2009, 18:30
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows XP

Re: Discuss: HOWTO: Windows 7: In both VM and native

Post by varungulshan »

Everything worked fine, except I had to make one change on my system to make it work. Instead of creating the MBR using the instructions in c.2, I used the instructions from [2] (i.e http://www.rajatarya.com/website/taming ... tualbox-vm).

The problem I was facing was that when I went to repair my windows installation, it was not able to see my existing installation, hence was not repairing anything (I did try doing some repairs and would end up with Missing Operating system error). When I used the MBR as in [2], I was able to repair my windows installation successfully.
fcore
Posts: 1
Joined: 27. Apr 2011, 17:06
Primary OS: Mac OS X Leopard
VBox Version: OSE other
Guest OSses: linux, windows

Re: Discuss: HOWTO: Windows 7: In both VM and native

Post by fcore »

Hi, just one question: after all is done, how do I manage snapshots for my Win7 "VM/RM"?
pedrogfrancisco
Posts: 10
Joined: 6. Jun 2010, 12:23
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: Windows

Re: Discuss: HOWTO: Windows 7: In both VM and native

Post by pedrogfrancisco »

Hello!
As the author of the How-to, I'd like to thank you all for your input and tell you this thread was not completely forgotten ;). I'll update the guide if/when I've the time with the info you provided here. In the meantime, I'm glad my guide was of use to you :)

P.S.: feel free to 'fork' the guide if you wish :)
pedrogfrancisco
Posts: 10
Joined: 6. Jun 2010, 12:23
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: Windows

Re: Discuss: HOWTO: Windows 7: In both VM and native

Post by pedrogfrancisco »

I've officially given up updating the guide. I've just updated the bare minimum so people understand that
a) it is for VirtualBox 3.x
b) that they're free to fork it
c) that updated scripts are available on this thread written by PDP8User.

The main reason is I've given up virtualizing Windows 7 since I haven't hardware virtualization and thus it's boringly slow.

Good luck to your virtualization efforts :)
gstanden
Posts: 8
Joined: 12. May 2009, 05:01
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Centos 5.x

Re: Discuss: HOWTO: Windows 7: In both VM and native

Post by gstanden »

Had alot of trouble with windows 7 activation when running in virtual. My windows 7 is the OEM Windows 7 that came with the laptop (with its partition shrunk by the ubuntu installer). The OEM Windows 7 activation tool doesn't give the usual "activate by phone" option. Finally after several days I finally got an activation key from some website - any activation key - and input it. It failed (as expected) but it had the effect of displaying the usualy "activate by phone" panel, complete with the long activation code. So I dialed in and when asked said my distro was currently installed on how many machines? "1" which was the true answer, and the automated validation gave me a new activation code, and it worked. So if you get stuck and are legit, and are trying to virtualize a physical OEM windows 7 that came with your computer and open it using rawdisk, you can try that to actually activate it.

Gil
Last edited by gstanden on 2. Oct 2011, 06:53, edited 1 time in total.
gstanden
Posts: 8
Joined: 12. May 2009, 05:01
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Centos 5.x

Re: Discuss: HOWTO: Windows 7: In both VM and native

Post by gstanden »

Awesome post. Really helped me along alot, thank you. You mentioned you were looking for feedback on the guest addtions issues with rawdisk windows guests.

Ok, well here's my "workaround" for the guest additions issues when opening windows 7 as a guest in an Ubuntu 11.04 Natty Narwhal host:

I use Ubuntu and the main thing I use guest additions for are
(1) seamless mouse integration,
(2) shared folders, and
(3) correct sizing of vm window.

Just wanted to mention here that I found a "workaround" I guess you would call it, to get all of the above "features" without virtualbox guest additions when using my windows 7 with a rawdisk in vm in virtualbox. I get around it by going into the windows vm with the "Remmina Remote Desktop Client" which is a linux "RDP" client (you get it from the Ubuntu Software Center tool (in 11.04 anyway) search for "Remmina". I have an additional ethernet adapter configured in the windows 7 rawdisk vm which is a "host-only" adapter which is on the same subnet as my "local ubuntu lan" which is the lan all my virtual machines and the host share, so that way the windows 7 vm can also communicate with all my other vm's and the host.

The Remmina desktop is:

(a) perfectly sized to the laptop screen
(b) has a handy toolbar for toggling to/from fullscreen, and;
(c) because Remmina is a local application (in linux) you can cut and paste to/from your linux environment to/from your windows environment via Remmina; and
(d)mouse integration when in Remmina is seamless, because, again, it's a local application in linux so you get all those typical "guest additions" features.

For a "shared folders" workaround, I use WinSCP in my windows machine (for file transfer between guest (win) and host (ubuntu) - works great - again because of that additional host-only adapter that is on the "laptop lan"

and with these workarounds all the main things needed from guest additions are achieved fairly painlessly.

Gil
MidnightJava
Posts: 7
Joined: 9. Oct 2011, 05:01
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7

Re: Discuss: HOWTO: Windows 7: In both VM and native

Post by MidnightJava »

Will these instructions work if the host/guest relationship with respect to the installation of the Operating Systems is opposite to the host/guest relationship with respect to the VM installation? I plan to use VirtualBox with Ubuntu as the host and Windows 7 as the guest. But Ubuntu was installed as a guest OS in the Windows installation that came with the HP computer.

From Ubuntu I see my Windows 7 files at /host. Using gparted I see only WIndows partitions (the System, OS, and Recovery partitions at /dev/sda1, /dev/sda2, and /dev/sda3. respectively). Running df on the Ubuntu system, I see /host mounted on /dev/sda2, and / mounted on /dev/loop0, which I take it is a pseudo-device created by the Ubuntu installer, whose contents are physically within the Windows partition.

So can I follow the instructions here to install VB with Ubuntu as the host and Windows 7 as the guest? Or should I first re-install Ubuntu as an independent installation with its own device mounted separately from the Windows devices?
MidnightJava
Posts: 7
Joined: 9. Oct 2011, 05:01
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7

Re: Discuss: HOWTO: Windows 7: In both VM and native

Post by MidnightJava »

I don't know if anyone is still monitoring this thread, but if so, I'd appreciate some help getting this approach to work. I followed the instructions to the point of creating the vmdisk, setting it as a hard disk for my VM in VirtualBox, and running

Code: Select all

sudo chmod 666 /dev/sda*
But then when I run the startup script I get the following:

Code: Select all

s5610f:~/VBSetup$ ./startVM
xauth:  file /tmp/.Xauthority_virtualbox does not exist
xauth: (argv):1:  merge:  unable to open file /home/<user name>/cookieTmp
VBoxManage: error: Could not find a registered machine named 'Windows7Raw'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee nsISupports
Context: "FindMachine(Bstr(VMName).raw(), machine.asOutParam())" at line 354 of file VBoxManageMisc.cpp
Am I supposed to create an X server authorization file before I execute these streps? If so, what do I put in it? I'm running Ubuntu 11.04. The man page for xauth says that xdm or xstart may create the X Server auth file; but I don't have either of those on my system, but I started gdm, and that didn't help.
RushPL
Posts: 5
Joined: 26. Feb 2012, 19:55

Re: Discuss: HOWTO: Windows 7: In both VM and native

Post by RushPL »

After upgrade to VirtualBox 4.1 I am having an issue of my Windows 7 reporting as not genuine. It is similiar to the description I have encountered on Microsoft forums. I would post a link here if the forum would allow me. Anybody having same problems?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Discuss: HOWTO: Windows 7: In both VM and native

Post by mpack »

You don't mention which version of VBox you updated from: I'm guessing v4.x, since Win7 simply hasn't been around long. So, your update was minor. Unless you changed the hardware recipe of the VM in a significant way then I don't see how VBox could cause this. ISTM more likely to be caused by a Win7 update.
ssantosh1978
Posts: 3
Joined: 1. Mar 2012, 08:55

Re: Discuss: HOWTO: Windows 7: In both VM and native

Post by ssantosh1978 »

thanks buddy
Post Reply