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

Discussions about using Windows guests in VirtualBox.
RushPL
Posts: 5
Joined: 26. Feb 2012, 19:55

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

Post by RushPL »

Honestly I do not know which version of VirtualBox I upgraded from ... the problem is that there is some hardware change that Windows 7 does not want to accept. However, it worked for quite some time thanks to this HOWTO. :-) Any guidance on how to fix the issue? There seems to be a tool analysing this whole "genuine advantage" but I am quite clueless about its content. Also, as soon as I boot natively - everything works properly and when I boot from VBox, it immediately says that I am not genuine. I have a right to run this Windows from VM damn it. :p It is original machine.
Lauscher
Posts: 47
Joined: 14. Mar 2012, 14:19
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 7.04+10.04, Xubuntu 11.10
Location: Germany

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

Post by Lauscher »

Hello,

I'm writing a german guide to use physical installed Win XP/Vista/7 in VirtualBox within Ubuntu, and I need a bit help.
My questions:
1. if I use creatrawvmdk with -mbr option, and I run Windows repair options, does it overwrite the physical mbr or the virtual mbr stored in the .vmdk?
2. about Win7: using dualboot, in the physical mbr-section is there a Windows- or an Ubuntu/Linux mbr?

Tomorrow I'll write a bit more, at now the forum forbids me to set links because it's my first post and it's the first day I'm in here.
Sorry about no good english, I'm a native german.

cu
Lauscher
Last edited by Lauscher on 15. Mar 2012, 14:52, edited 1 time in total.
Lauscher
Posts: 47
Joined: 14. Mar 2012, 14:19
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 7.04+10.04, Xubuntu 11.10
Location: Germany

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

Post by Lauscher »

I'm writing a german guide to use physical installed Win XP/Vista/7 in VirtualBox within Ubuntu.

Some hints:
1. Some problems booting Windows XP/Vista/7 can be solved using MergeIDE.reg: https://www.virtualbox.org/attachment/w ... rgeIDE.zip. You also need the driver files atapi.sys, intelide.sys, pciide.sys, pciidex.sys in the folder C:\WINDOWS\system32\drivers. A bit more specfied is this solution for some booting problems:http://support.microsoft.com/kb/922976.
2. To get access on Windows partitions, there are two ways to give VirtualBox/VBoxManage access, so you don't need the complicated way with another user.
a) permanent: the actual user gets part of the group disk (not perfectly sure, but a possible way), i.e. with the command

Code: Select all

sudo usermod -aG disk $USER
b) temporable access: very sure way: only the applications run in the next minutes get only access to the explicit given partitions.

Code: Select all

sudo chown $USER:disk /dev/sda1 [/dev/sda2 ...]
3. if you have problems starting windows with the mbr built using

Code: Select all

install-mbr --force ~/.VirtualBox/WindowsRAW.mbr
you can use a start-cd.iso, for example this one: Super Grub2 CD

Maybe this will help someone.
Last edited by Lauscher on 23. Apr 2012, 22:09, edited 1 time in total.
UnPOUcoDe
Posts: 2
Joined: 18. Apr 2012, 17:11

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

Post by UnPOUcoDe »

What if I have 2 disks, /dev/sda with Ubuntu and /dev/sdb with native Windows. Do I need to create the mbr for the windows system? It already has an MBR as when I installed it it was in /dev/sda, then I bought a new HDD and put the new disk as /dev/sda and old Windows disk as /dev/sdb. Grub is installed in /dev/sda. Also /dev/sdb is bootable.
Lauscher
Posts: 47
Joined: 14. Mar 2012, 14:19
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 7.04+10.04, Xubuntu 11.10
Location: Germany

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

Post by Lauscher »

You get your win7-mbr from sdb using

Code: Select all

sudo dd if=/dev/sdb of=~/Windows7_sdb.mbr count=1 bs=512 
Last edited by Lauscher on 19. Apr 2012, 17:12, edited 1 time in total.
UnPOUcoDe
Posts: 2
Joined: 18. Apr 2012, 17:11

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

Post by UnPOUcoDe »

I really wanted to ask, do I need to add the mbr to the rawdisk, if there is already a working MBR for windows without grub?

Could I just do these?

Code: Select all

sudo VBoxManage internalcommands createrawvmdk -filename raw7.vmdk -rawdisk /dev/sdb -partitions 1
Lauscher
Posts: 47
Joined: 14. Mar 2012, 14:19
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 7.04+10.04, Xubuntu 11.10
Location: Germany

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

Post by Lauscher »

If you don't want to get the mbr using dd (why?), just try to start Win7 without it and you will see whether it works. It should do, I think.

Edit:
Maybe you have to use -relative because of -partitions:

Code: Select all

sudo VBoxManage internalcommands createrawvmdk -filename raw7.vmdk -rawdisk /dev/sdb -partitions 1 -relative
sonicfrequency
Posts: 15
Joined: 8. Jun 2012, 03:19

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

Post by sonicfrequency »

I have followed http://wiki.ubuntuusers.de/Dualboot-Win ... ualisieren almost exactly. I have even installed MERGEIDE and the Advanced Token Manager. Lausher, you have been a great help.

At this point, I have a dual boot Dell Latitude work laptop: Windows 7 x64 (Partition 1) Linux Mint (Partition 2).

I never have a licensing problem when I boot into Windows natively.

I've installed Virtualbox with the custom SLIC patch following the thread at viewtopic.php?f=2&t=43678&p=227455#p227455. After extracting my SLIC.bin and modifying my .vbox file to use my SLIC table, I can virtualize Windows 7 with activated status only once.

I can then boot into Windows 7 natively, also with activated status.

The problem begins when I try to virtualize again. I cannot reactivate until I recreate the SLIC.bin using "dd if=/sys/firmware/acpi/tables/SLIC of=SLIC.bin" command. Once recreated I can activate the Windws 7 virtual machine once more, until I boot into native Windows again.

Even if I try to restore the Virtual machine license status with the Advanced Token Manager, I get an error.

Somehow Windows detects the faked SLIC.bin Dell OEM table and corrupts it so it cannot be used again in the virtual machine. The dmidecode screenshots in native boot vs virtual boot can be found at: viewtopic.php?f=2&t=43678&p=227455#p227455.

I'm not expecting much support for this. This seems like an incredibly complex activation problem. I'm throwing a hail mary here...Thank you for any help you can provide.
Lauscher
Posts: 47
Joined: 14. Mar 2012, 14:19
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 7.04+10.04, Xubuntu 11.10
Location: Germany

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

Post by Lauscher »

Somehow Windows detects the faked SLIC.bin Dell OEM table and corrupts it so it cannot be used again in the virtual machine.
This cannot be. How should Windows be able to change the BIOS? The problem must be somewhere else.
The dmidecode screenshots in native boot vs virtual boot can be found at: viewtopic ... 55#p227455.
Do you still have these damaged output? You should get correct output of parameters you set with "setextradata". If not, the problem is here.
I can virtualize Windows 7 with activated status only once.

I can then boot into Windows 7 natively, also with activated status.

The problem begins when I try to virtualize again. I cannot reactivate until I recreate the SLIC.bin using "dd if=/sys/firmware/acpi/tables/SLIC of=SLIC.bin" command. Once recreated I can activate the Windws 7 virtual machine once more, until I boot into native Windows again.
Windows 7 is curious with its activation status. Even with changed hardware, it doesn't want to get reactivated immediately.
Edit: if you really think Windows changes the SLIC-table, you could compare an old and a new SLIC.bin, for example using checksum. If you really find a difference, it would be very interesting.
Even if I try to restore the Virtual machine license status with the Advanced Token Manager, I get an error.
ok, Advanced Tokens Manager is only successfull whether the hardware is not changed too much.

At first you should have a look to get the right dmidecode outputs. As long as you get the wrong output, Windows won't stay activated. Maybe something goes wrong because of manually editing the win7.vbox file.
I recommend: create a new virtual machine, don't edit the win7.vbox manually, set parameters only with "setextradata". If you want to delete a setextradata parameter, set it again with value ""; then it disappears in the vbox file. You can use the BIOS script in my guidance, so you don't need to set every parameter severally.
After that, look at harddisk parameters, CD/DVD parameters, and MAC-Adresses of network adapters.

Be happy :wink: ; you only have problems with activation. In this thread some people have problems with a BSOD 0xc000000e, we are searching for a solution since weeks with no success :cry: . Whenever it is solved in virtual boot, it appears in native boot. Whenever it is solved in native boot, it appears in virtual boot. :(
All activation problems we have solved, I don't know anyone with no success. :D
sonicfrequency
Posts: 15
Joined: 8. Jun 2012, 03:19

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

Post by sonicfrequency »

Lauscher wrote:
Somehow Windows detects the faked SLIC.bin Dell OEM table and corrupts it so it cannot be used again in the virtual machine.
This cannot be. How should Windows be able to change the BIOS? The problem must be somewhere else.
The dmidecode screenshots in native boot vs virtual boot can be found at: viewtopic ... 55#p227455.
Do you still have these damaged output? You should get correct output of parameters you set with "setextradata". If not, the problem is here.
I can virtualize Windows 7 with activated status only once.

I can then boot into Windows 7 natively, also with activated status.

The problem begins when I try to virtualize again. I cannot reactivate until I recreate the SLIC.bin using "dd if=/sys/firmware/acpi/tables/SLIC of=SLIC.bin" command. Once recreated I can activate the Windws 7 virtual machine once more, until I boot into native Windows again.
Windows 7 is curious with its activation status. Even with changed hardware, it doesn't want to get reactivated immediately.
Edit: if you really think Windows changes the SLIC-table, you could compare an old and a new SLIC.bin, for example using checksum. If you really find a difference, it would be very interesting.
Even if I try to restore the Virtual machine license status with the Advanced Token Manager, I get an error.
ok, Advanced Tokens Manager is only successfull whether the hardware is not changed too much.

At first you should have a look to get the right dmidecode outputs. As long as you get the wrong output, Windows won't stay activated. Maybe something goes wrong because of manually editing the win7.vbox file.
I recommend: create a new virtual machine, don't edit the win7.vbox manually, set parameters only with "setextradata". If you want to delete a setextradata parameter, set it again with value ""; then it disappears in the vbox file. You can use the BIOS script in my guidance, so you don't need to set every parameter severally.
After that, look at harddisk parameters, CD/DVD parameters, and MAC-Adresses of network adapters.

Be happy :wink: ; you only have problems with activation. In this thread some people have problems with a BSOD 0xc000000e, we are searching for a solution since weeks with no success :cry: . Whenever it is solved in virtual boot, it appears in native boot. Whenever it is solved in native boot, it appears in virtual boot. :(
All activation problems we have solved, I don't know anyone with no success. :D
I'm betting if you run dmidecode when you virtualize Windows you also receive the "Invalid entry length, DMI is broken. Stop!" message. Can you check?

Thanks!
Lauscher
Posts: 47
Joined: 14. Mar 2012, 14:19
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 7.04+10.04, Xubuntu 11.10
Location: Germany

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

Post by Lauscher »

I'm betting if you run dmidecode when you virtualize Windows you also receive the "Invalid entry length, DMI is broken. Stop!" message. Can you check?
I don't have this problem, i checked it. The BIOS parameters appear as they should, and there is no error message.
sonicfrequency
Posts: 15
Joined: 8. Jun 2012, 03:19

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

Post by sonicfrequency »

Lauscher wrote:
I'm betting if you run dmidecode when you virtualize Windows you also receive the "Invalid entry length, DMI is broken. Stop!" message. Can you check?
I don't have this problem, i checked it. The BIOS parameters appear as they should, and there is no error message.
The SLIC table I export as well as any other SLIC 2.1 ROM's I've tried throw this error in dmidecode inside the virtual machine. The ROM throws the dmidecode error even if I don't specify any other extradataitems. So I know it's not a problem with the extradataitem parameters I set.

Perhaps my Virtualbox patch is bugged or perhpas this leads back to the DMI memory addressing problem with Dell OEM:

"The DELL SLP string addresses are not in the valid range for DMI. The code in the example simulates DMI code. Dell is impossible to activate by simply adding SLP info to the DMI area. There address ranges are much tighter than HP, and are located in the mainbios.."

http://forums.mydigitallife.info/thread ... P-amp-SLIC

Thanks for all the responses. This is a (sort of) fun project!
sonicfrequency
Posts: 15
Joined: 8. Jun 2012, 03:19

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

Post by sonicfrequency »

dmidecode -t2 in VM holds one parameter I cant address:

Base Board Information

Type: <Out Of Spec>

dmidecode-t2 in Native boot reports this parameter as Type: "Motherboard"

I've tried to modify the vbox parameter with:
<ExtraDataItem name="VBoxInternal/Devices/pcbios/0/Config/DmiBoardType" value="Motherboard"/>

This parameter is unrecognized by the virtualbox patch / SLIC.bin or something and I receive and error in Vbox. I've also tried numberic values. It doesn't seem I can change it.

Another guess is that Windows checks the motherboard information and deactivates if a motherboard isn't reported.
Lauscher
Posts: 47
Joined: 14. Mar 2012, 14:19
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 7.04+10.04, Xubuntu 11.10
Location: Germany

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

Post by Lauscher »

I don't have this problem, i checked it. The BIOS parameters appear as they should, and there is no error message.
I checked again; Neither the table nor the DmiBoard parameters has been set on my VM. I tested it again with DmiBoard parameters and a DSDT table (because I don't have a SLIC table, I have XP). Now I get this error:
Wrong DMI structures length: 608 bytes announced, structures occupy 275 bytes
I posted it in the thread of the Patch some month ago, scp gave me this answer:
The "Wrong DMI structures length" can not be avoided currently, because it is a fixed value. But I don't think it harms the system.
It has been no problem to all who used my guidance and also the patch with Windows 7.
I recommend: create a new virtual machine, don't edit the win7.vbox manually, set parameters only with "setextradata". If you want to delete a setextradata parameter, set it again with value ""; then it disappears in the vbox file.
Did you do this?

I don't get the error "Invalid entry length, DMI is broken. Stop!"
<ExtraDataItem name="VBoxInternal/Devices/pcbios/0/Config/DmiBoardType" value="Motherboard"/>
Neither VirtualBox nor the patch support this value. You don't need it.
Another guess is that Windows checks the motherboard information and deactivates if a motherboard isn't reported
Windows checks some, but not all motherboard information. All adjustments of your VM you need to avoid a new activation I told you. For some people it's enough to make the adjustments given by the patch, some other need more.
sonicfrequency
Posts: 15
Joined: 8. Jun 2012, 03:19

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

Post by sonicfrequency »

Still messing around here.

By the way, I was getting a blue screen stop error when attempting to boot using the MBR method. I had to edit the system registry in Windows 7. MERGEIDE does not set the flag by default.

I simply navigated to regedit > Computer\HKLM\SYSTEM\ControlSet001\services\LSI_SAS\ and set start Dword to "0."

Hopefully the helps some people with the bluescreen error on your German forum!
Post Reply