Page 1 of 1

Windows 7 triggers reactivation on reboot

Posted: 27. Jul 2016, 09:18
by Tux2442
I run a VB in headlessmode. The host is a VlizedLab (Debian) and I want to make a Windows Image for different Computers. The Problem is they have different hardware.

So I set a MAC-Address with VBoxManage but I'm unable to change the CPUid for the Guest. I tried to emulate one but it doesn't get recognized by the guest and if i turn off the hwvirtex Windows gets a Bluescreen.

On the old Network the host where all the same and only the NIC differs with the Mac. Windows wanted every reboot a activation. This was fix with the Mac Address.

But in the new Network there are a couple of different Machines and I am not able to set an Key for ervery one for every new rollout.

Maby sombody know how to setup a Windows Guest wich keeps the licens regardless of the Hardware from the Host.

Script which is used to setup the VM

Code: Select all

 
#!/bin/bash -x

VERSION=2

echo "starting MACHINE >$MACHINE< in >$MACHINEDIR<"

VBoxManage --nologo createvm --name $MACHINE --register --basefolder $MACHINEDIR

# VBoxManage --nologo modifyvm $MACHINE         --ostype linux26
VBoxManage --nologo modifyvm $MACHINE --ostype windows7_64 \
        --memory 2700 \
        --vram 256 \
        --cpus 2 \
        --acpi on \
        --ioapic on \
        --hwvirtex on \
        --bioslogofadein off \
        --bioslogofadeout off \
        --bioslogodisplaytime 1 \
        --nic1 nat \
	--macaddress1 0800274066FF \
        --audio alsa \
        --accelerate2dvideo on \
        --accelerate3d on \
        --nictype1 "82540EM" \
        --audiocontroller hda

#CPU ID
#VBoxManage modifyvm $MACHINE --cpuid 00000000  00000014 756e6547 6c65746e 49656e69
#VBoxManage modifyvm $MACHINE --cpuid 00000001  000306d4 01100800 7ffafbbf bfebfbff
#VBoxManage modifyvm $MACHINE --cpuid 00000002  76036301 00f0b5ff 00000000 00c30000
#VBoxManage modifyvm $MACHINE --cpuid 00000003  00000000 00000000 00000000 00000000
#VBoxManage modifyvm $MACHINE --cpuid 00000004  1c004121 01c0003f 0000003f 00000000
#VBoxManage modifyvm $MACHINE --cpuid 00000005  00000040 00000040 00000003 11142120
#VBoxManage modifyvm $MACHINE --cpuid 00000006  00000077 00000002 00000009 00000000
#VBoxManage modifyvm $MACHINE --cpuid 00000007  00000000 021c27ab 00000000 00000000
#VBoxManage modifyvm $MACHINE --cpuid 00000008  00000000 00000000 00000000 00000000
#VBoxManage modifyvm $MACHINE --cpuid 00000009  00000000 00000000 00000000 00000000
#VBoxManage modifyvm $MACHINE --cpuid 0000000a  07300403 00000000 00000000 00000603
#VBoxManage modifyvm $MACHINE --cpuid 0000000b  00000001 00000002 00000100 00000002
#VBoxManage modifyvm $MACHINE --cpuid 0000000c  00000000 00000001 00000001 00000000
#VBoxManage modifyvm $MACHINE --cpuid 0000000d  00000007 00000340 00000340 00000000
#VBoxManage modifyvm $MACHINE --cpuid 0000000e  00000000 00000000 00000000 00000000
#VBoxManage modifyvm $MACHINE --cpuid 0000000f  00000000 00000000 00000000 00000000
#VBoxManage modifyvm $MACHINE --cpuid 00000010  00000000 00000000 00000000 00000000
#VBoxManage modifyvm $MACHINE --cpuid 00000011  00000000 00000000 00000000 00000000
#VBoxManage modifyvm $MACHINE --cpuid 00000012  00000000 00000000 00000000 00000000
#VBoxManage modifyvm $MACHINE --cpuid 00000013  00000000 00000000 00000000 00000000
#VBoxManage modifyvm $MACHINE --cpuid 00000014  00000000 00000001 00000001 00000000
#VBoxManage modifyvm $MACHINE --cpuid 00000015  00000000 00000001 00000001 00000000
#VBoxManage modifyvm $MACHINE --cpuid 80000000  80000008 00000000 00000000 00000000
#VBoxManage modifyvm $MACHINE --cpuid 80000001  00000000 00000000 00000121 2c100800
#VBoxManage modifyvm $MACHINE --cpuid 80000002  65746e49 2952286c 726f4320 4d542865
#VBoxManage modifyvm $MACHINE --cpuid 80000003  35692029 3032352d 43205530 40205550
#VBoxManage modifyvm $MACHINE --cpuid 80000004  322e3220 7a484730 00000000 00000000
#VBoxManage modifyvm $MACHINE --cpuid 80000005  00000000 00000000 00000000 00000000
#VBoxManage modifyvm $MACHINE --cpuid 80000006  00000000 00000000 01006040 00000000
#VBoxManage modifyvm $MACHINE --cpuid 80000007  00000000 00000000 00000000 00000100
#VBoxManage modifyvm $MACHINE --cpuid 80000008  00003027 00000000 00000000 00000000
#VBoxManage modifyvm $MACHINE --cpuid 80000009  00000000 00000001 00000001 00000000



# Turn this off by default:
# VBoxManage --nologo modifyvm $MACHINE         --accelerate3d on

#Start Virtal Machine in Fullscreen
#VBoxManage --nologo setextradata $MACHINE GUI/Fullscreen on

#Hide Manubar and Statusbar
VBoxManage --nologo setextradata $MACHINE GUI/Customizations noMenuBar,noStatusBar
# VBoxManage --nologo setextradata $MACHINE GUI/Customizations noStatusBar

#Hide MiniToolBar
VBoxManage --nologo setextradata $MACHINE GUI/ShowMiniToolBar no

#Set Alignment of MiniToolaBar
#VBoxManage --nologo setextradata $MACHINE GUI/MiniToolBarAlignment bottom

#Only allow Powerdown on "HOSTKEY+Q"
#VBoxManage --nologo setextradata $MACHINE GUI/RestrictedCloseActions SaveState,Shutdown,Restore
VBoxManage --nologo setextradata $MACHINE GUI/RestrictedCloseActions SaveState,Restore

if [ -f $MACHINEDIR/init.add.sh ]; then
    source $MACHINEDIR/init.add.sh
fi

VBoxManage --nologo sharedfolder add $MACHINE  --name media --hostpath /media --automount

VBoxManage --nologo storagectl    $MACHINE --name C$MACHINE --add sata --controller IntelAHCI --hostiocache on
VBoxManage --nologo storageattach $MACHINE --storagectl C$MACHINE --port 0 --device 0 \
      --type hdd --medium $MACHINEDIR/$MACHINE.vdi --mtype immutable

# Add empty dvd-drive
VBoxManage --nologo storageattach $MACHINE --storagectl C$MACHINE --port 1 --device 0 --type dvddrive --medium emptydrive
#vboxmanage --nologo storagectl $MACHINE --name I$MACHINE --add ide --controller PIIX4
#vboxmanage --nologo storageattach $MACHINE --storagectl I$MACHINE --port 0 --device 0 --type dvddrive --medium emptydrive

#      --type hdd --medium $MACHINEDIR/$MACHINE.vdi --mtype immutable

Re: Windows 7 triggers reactivation on reboot

Posted: 27. Jul 2016, 09:40
by socratis
Tux2442 wrote:I want to make a Windows Image for different Computers. The Problem is they have different hardware... Maybe somebody knows how to setup a Windows Guest which keeps the license regardless of the Hardware from the Host.
That's not something that is legally allowed by the Microsoft EULA. You have to have a valid Windows license for every PC that you run Windows on, either physical or virtual. We can't be seen helping your to circumvent the OS activation checks, so please refrain from such discussions in the VirtualBox forums.