Page 1 of 1

SOLVED-Moving VDI to a different host triggers CPU reinstall

Posted: 3. Sep 2014, 16:35
by paulg_ca
Hi All,

First a little background, I am tasked with recreating one of our VMs, it used to be WinXP but now it will be Win7 x64.
I build the Windows 7 VM on my desktop, a Dell Optiplex 980 Core i7 870, running Ubuntu 14.04.1. The resulting VDI
file in compacted and used with a script to build a full VM from scratch each time the user runs the script. When they exit
the VM, all changes are thrown away. They get a new VM every time they run our script. The core of the script is listed below.

---- snip from script ----
VMVDI="/vbox/win7x64.vdi"
VBoxManage createvm --name "VM" --register --ostype "Windows7_64"
VBoxManage modifyvm "VM" --memory "2018" --vram "64" --hwvirtex on \
--acpi on --ioapic on --nic1 nat --nictype1 82540EM --pae off \
--nestedpaging on --audio "pulse" --audiocontroller "hda" \
--bioslogodisplaytime 0 --biosbootmenu "disabled" --usb on \
--usbehci on --chipset piix3
VBoxManage storagectl "VM" --name "SATA Controller" --add sata --controller IntelAHCI --hostiocache on
VBoxManage storageattach "VM" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$VMVDI"
---- snip from script ----

Everything works, but if I run the script on a Core2Duo host I get a "Driver Software Installation" dialog box. Every devices is located and the drivers are successfully installed, but the CPU driver (??), in this case,
"Intel(r) Core(TM)2 Duo CPU E8400 @ 3.00Ghz" driver indicates that a restart is required to complete the installation of the driver. We don't want our users to reboot !

I am trying to find a way to avoid having to restart and just have Windows 7 behave like WinXP, I never had this issue with WinXP. Maybe WinXP was too brain dead :D .

Any Ideas or suggestions ??? If you need additional info please let me know.

VDI Build On: Dell Optiplex 980 Core i7 870, running Ubuntu 14.04.1, 16GB Ram
Deployed Host: CentOS 6.5, Core2Duo E8400, 3Ghz, 8 GB RAM, 64bit, VirtualBox 4.3.14
Guest: Win7 Enterprise 64bit, 2GB, Additions version 4.3.14 r95030

Cheers,
Paul

Re: Moving VDI to a different hosts triggers CPU reinstall

Posted: 3. Sep 2014, 16:48
by Perryg
This is a Windows requirement not one set by VirtualBox. I would think the best place to ask this is Microsoft.

That said you might be able to assign a virtual CPU using VBoxManage and work around it. (Explained in the users manual)

Re: Moving VDI to a different hosts triggers CPU reinstall

Posted: 3. Sep 2014, 17:55
by paulg_ca
Perryg wrote:This is a Windows requirement not one set by VirtualBox. I would think the best place to ask this is Microsoft.

That said you might be able to assign a virtual CPU using VBoxManage and work around it. (Explained in the users manual)

Thank you Perryg,

I guess --cpus and --synthcpu are my only options. I find anything to help other users I will update this post.

Paul

Re: Moving VDI to a different hosts triggers CPU reinstall

Posted: 4. Sep 2014, 16:08
by paulg_ca
paulg_ca wrote:
Perryg wrote:This is a Windows requirement not one set by VirtualBox. I would think the best place to ask this is Microsoft.

That said you might be able to assign a virtual CPU using VBoxManage and work around it. (Explained in the users manual)

Thank you Perryg,

I guess --cpus and --synthcpu are my only options. I find anything to help other users I will update this post.

Paul
I ended solving the problem by using VBoxManage list hostcpuids to get the list of cpu ids and by using --cpuidset to set the cpu ids.
For some reason VBoxManage complained that leaf 0xb and 0xc were out of range. Oddly (to me anyways) some of the ids would change each time
I ran VBoxManage list hostcpuids. I am not sure if this is expected.

I was able to run the VM created on a Core i7 on a Core2Duo without being prompted to reboot, see modified script below. Hopefully this will help some one in the future. I would expect the VM to handle these issues for me, but I guess that can lead to other issues.

---- snip from script ----
VMNAME=VM
VMVDI="/vbox/win7x64.vdi"
VBoxManage createvm --name "$VMNAME" --register --ostype "Windows7_64"
VBoxManage modifyvm "$VMNAME" --memory "2018" --vram "64" --hwvirtex on \
--acpi on --ioapic on --nic1 nat --nictype1 82540EM --pae off \
--nestedpaging on --audio "pulse" --audiocontroller "hda" \
--bioslogodisplaytime 0 --biosbootmenu "disabled" --usb on \
--usbehci on --chipset piix3

VBoxManage modifyvm "$VMNAME" --cpuidset 0x00000000 0x0000000b 0x756e6547 0x6c65746e 0x49656e69
VBoxManage modifyvm "$VMNAME" --cpuidset 0x00000001 0x000106e5 0x06100800 0x0098e3fd 0xbfebfbff
VBoxManage modifyvm "$VMNAME" --cpuidset 0x00000002 0x55035a01 0x00f0b2e4 0x00000000 0x09ca212c
VBoxManage modifyvm "$VMNAME" --cpuidset 0x00000003 0x00000000 0x00000000 0x00000000 0x00000000
VBoxManage modifyvm "$VMNAME" --cpuidset 0x00000004 0x1c004121 0x01c0003f 0x0000003f 0x00000000
VBoxManage modifyvm "$VMNAME" --cpuidset 0x00000005 0x00000040 0x00000040 0x00000003 0x00001120
VBoxManage modifyvm "$VMNAME" --cpuidset 0x00000006 0x00000003 0x00000002 0x00000001 0x00000000
VBoxManage modifyvm "$VMNAME" --cpuidset 0x00000007 0x00000000 0x00000000 0x00000000 0x00000000
VBoxManage modifyvm "$VMNAME" --cpuidset 0x00000008 0x00000000 0x00000000 0x00000000 0x00000000
VBoxManage modifyvm "$VMNAME" --cpuidset 0x00000009 0x00000000 0x00000000 0x00000000 0x00000000
VBoxManage modifyvm "$VMNAME" --cpuidset 0x0000000a 0x07300403 0x00000044 0x00000000 0x00000603
# VBoxManage modifyvm "$VMNAME" --cpuidset 0x0000000b 0x00000001 0x00000002 0x00000100 0x00000002
# VBoxManage modifyvm "$VMNAME" --cpuidset 0x0000000c 0x00000001 0x00000002 0x00000100 0x00000006
VBoxManage modifyvm "$VMNAME" --cpuidset 0x80000000 0x80000008 0x00000000 0x00000000 0x00000000
VBoxManage modifyvm "$VMNAME" --cpuidset 0x80000001 0x00000000 0x00000000 0x00000001 0x28100800
VBoxManage modifyvm "$VMNAME" --cpuidset 0x80000002 0x65746e49 0x2952286c 0x726f4320 0x4d542865
VBoxManage modifyvm "$VMNAME" --cpuidset 0x80000003 0x37692029 0x55504320 0x20202020 0x20202020
VBoxManage modifyvm "$VMNAME" --cpuidset 0x80000004 0x30373820 0x20402020 0x33392e32 0x007a4847
VBoxManage modifyvm "$VMNAME" --cpuidset 0x80000005 0x00000000 0x00000000 0x00000000 0x00000000
VBoxManage modifyvm "$VMNAME" --cpuidset 0x80000006 0x00000000 0x00000000 0x01006040 0x00000000
VBoxManage modifyvm "$VMNAME" --cpuidset 0x80000007 0x00000000 0x00000000 0x00000000 0x00000100
VBoxManage modifyvm "$VMNAME" --cpuidset 0x80000008 0x00003024 0x00000000 0x00000000 0x00000000
VBoxManage modifyvm "$VMNAME" --cpuidset 0x80000009 0x00000001 0x00000002 0x00000100 0x00000006


VBoxManage storagectl "$VMNAME" --name "SATA Controller" --add sata --controller IntelAHCI --hostiocache on
VBoxManage storageattach "$VMNAME" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$VMVDI"

---- snip from script ----