Which changes trigger reactivation in a Windows guest?

Discussions about using Windows guests in VirtualBox.

Re: Which changes trigger reactivation in a Windows guest?

Postby abye180 » 17. Dec 2010, 00:46

JEGERT wrote:I was working on activation for Win7 this past weekend and found some helpful notes for anyone new to VBox
First off, if you change even one character in the machine UUID, reactivation occurs but the hard disk UUID did not matter (thanks Sasquatch and mpack)

If you want to save off a Win 7 activated environment, follow these steps (do not use the Export Appliances)
1) Backup the VDI file by just copying it or use CloneVDI and make sure to use "Keep old UUID" (you're the best mpack! This tool works great)
2) copy the machine's XML file and keep it with the VDI/VHD (C:\Users\Administrator\.VirtualBox\Machines\Win7\Win7.xml where Administrator is the user you are logged in with and Win7 is the VBox name)
You should have the VDI/VHD file and XML now (2 files)

Now to restore a Win 7 environment, here goes:
1) Create a new VBox machine entry from scratch including the HardDisk (does not matter what the settings are here since the XML file will overlay it anyway)
2) Copy the backed up XML file to the new VBox machine's directory (i.e. C:\Users\Administrator\.VirtualBox\Machines\NewWin7\NewWin7.xml) and overwrite the one already there (NOTE: You need to close VirtualBox as it will probably have this file opened)
3) Copy the VDI/VHD file and overlay the one you created in step 1. The reason I do this is because if you import the VDI, it WILL change the UUID on the hard disk
4) Edit the VBox XML file and change the Machine UUID and hard disk UUID to match the file in step 2 above (i.e. C:\Users\Administrator\.VirtualBox\VirtualBox.XML). Make sure there are no duplicates or VBox will crash on COM registration!

Now run the VBox machine and you should not be asked to reactivate the OS

Thanks everyone!


Thanks Jegert. I have tried this approach and it worked. But what interests me is that why not also simply repalce the VirtualBox.XML? What information in the VirtualBox.XML triggers the activation? It seems to me that NewWin7.xml contains much more information than VirtualBox.XML does.
abye180
 
Posts: 14
Joined: 29. Nov 2010, 21:40
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows 7

Re: Which changes trigger reactivation in a Windows guest?

Postby abye180 » 17. Dec 2010, 01:02

Sasquatch wrote:First off, the disk UUID does NOT change when you import it. It's written in the VDI file and only a "VBoxManage internalcommands sethduuid <vdi file>" will change it (or using the cloneVDI tool from mpack).
Second, the HD UUID does NOT trigger an activation, only the VM UUID. So all you have to do, is keep that UUID near the W7 VDI. You can even give a different machine UUID than it's own UUID to the VM OS. See the manual for more information on that (VBoxManage modifyvm [--hardwareuuid <uuid>]). This means that you can still clone your W7 VM, get a new VM UUID, but let it send the original UUID to the OS.


Hello Sasquatch,
I can totally understand the first point, however not the second.
1. When you say "VM UUID", you are refering to the <MachineEntry uuid> in the VirtualBox.xml, right?
2. What does modifyvm do? I tried it. It simply adds the modified uuid after <Hardware version="2"> node in the machine.xml . I don't see how it helps with preventing reactivation.
3. By the method privided by Jegert, I am able to copy a guest machine and migrate it to another host without causing activation issue. Are we able to do it on the same host? I.e., to have two identical guest on a same host. I think the answer is no, because I can't register the VM UUID twice in the VirtualBox.xml.
Last edited by abye180 on 17. Dec 2010, 17:41, edited 1 time in total.
abye180
 
Posts: 14
Joined: 29. Nov 2010, 21:40
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows 7

Re: Which changes trigger reactivation in a Windows guest?

Postby mpack » 17. Dec 2010, 13:32

abye180 wrote:2. What does modifyvm do? I tried it. It simply adds the modified uuid after <Hardware version="2"> node in the machine.xml.

Answering that requires that you understand the background. The UUID (whether a hard disk or a VM UUID) serves two purposes.

The primary purpose is to allow VirtualBox itself to identify its own hard disk objects, virtual machine objects, and so forth.

A secondary purpose is that VBox uses these UUIDs as defaults when a modern OS interrogates the hardware for signatures of various sorts. These UUIDs are already being used as identifiers and hence are naturals to use as default signatures. However, if you don't like the default you can usually change it, using commands such as "VBoxManage modifyvm". Doing so does not change any UUID (as already mentioned, VBox needs these to ID its own objects), but it does add additional strings to the VM xml which if present is what VBox sends to the guest OS on demand.

I hope that's somewhat clearer.
mpack
Site Moderator
 
Posts: 27696
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Which changes trigger reactivation in a Windows guest?

Postby abye180 » 17. Dec 2010, 17:55

mpack wrote:
abye180 wrote:2. What does modifyvm do? I tried it. It simply adds the modified uuid after <Hardware version="2"> node in the machine.xml.


A secondary purpose is that VBox uses these UUIDs as defaults when a modern OS interrogates the hardware for signatures of various sorts.

I hope that's somewhat clearer.


Hi mpack, thanks for getting back.

If I understand your explanation correctly, by default the VM UUID serves such interrogating purpose, so changing the VM UUID triggers the guest OS to reactivate. That is to say, by the modifyvm command, we can intentionaly give the cloned guest machine an "alias" UUID that is identical with the original VM UUID, so that the cloned guest use this alias to interrogate the hardware and thus don't triggers any activation.

Sorry that I made a typo in my original question, what I mean is I don't see how the modifyvm command helps with preventing reactivation of a cloned guest.
abye180
 
Posts: 14
Joined: 29. Nov 2010, 21:40
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows 7

Re: Which changes trigger reactivation in a Windows guest?

Postby mpack » 17. Dec 2010, 18:09

Re your second para, you seem to understand my explanation ok.

Re your third para, I don't know if you still don't understand something.
mpack
Site Moderator
 
Posts: 27696
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Which changes trigger reactivation in a Windows guest?

Postby Sasquatch » 18. Dec 2010, 17:10

abye180 wrote:2. What does modifyvm do? I tried it. It simply adds the modified uuid after <Hardware version="2"> node in the machine.xml . I don't see how it helps with preventing reactivation.

abye180 wrote:Sorry that I made a typo in my original question, what I mean is I don't see how the modifyvm command helps with preventing reactivation of a cloned guest.

Odd, you seam to understand the UUID thing, that it has to do with the activation, yet you don't understand what it has to do with reactivation. You're contradicting yourself. Stating you understand something, but actually you don't.
It's explained by Mpack and myself a couple of times here already, it's of little use to explain it again. Read Mpacks last explanation (the one you seem to understand) and think about reactivation. What is reactivation and what does it mean? Why does it happen? When you answer that, you will probably get a "oh, that's how it works" moment.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Which changes trigger reactivation in a Windows guest?

Postby mpack » 18. Dec 2010, 20:13

I'd like to clarify one thing though: activation messages are caused by whatever Microsoft decides they will be caused by, and this can vary from one Windows version to another. For example, Win7 cares about your VM UUID, but XP didn't. I think XP cared about the boot drive UUID, but there was several flavours of XP, so this is hard to pin down.
mpack
Site Moderator
 
Posts: 27696
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Which changes trigger reactivation in a Windows guest?

Postby abye180 » 22. Dec 2010, 16:34

Oh, that's how it works. Now I understand and can clone win7 without triggering activation.
Thanks mpack and sasquatch, for having explained thingd very clear and your patience.
abye180
 
Posts: 14
Joined: 29. Nov 2010, 21:40
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows 7

Re: Which changes trigger reactivation in a Windows guest?

Postby lagerdalek » 9. Mar 2011, 02:45

Hi,

This appears to have changed since this was last updated (I am running 4.0.4)

For a start I cannot find indiviual machine XML files, and the VirtualBox.xml does not appear to be changed by the modifyvm command. Changing the machine uuid in the VirtualBox.xml does not appear to have any effect.

Any further thoughts or updates to this?

Thanks
lagerdalek
 
Posts: 1
Joined: 9. Mar 2011, 02:40
Primary OS: MS Windows 7
VBox Version: OSE self-compiled
Guest OSses: Windows 7

Re: Which changes trigger reactivation in a Windows guest?

Postby mpack » 9. Mar 2011, 11:53

lagerdalek wrote:For a start I cannot find indiviual machine XML files, and the VirtualBox.xml does not appear to be changed by the modifyvm command. Changing the machine uuid in the VirtualBox.xml does not appear to have any effect.

Since v4.0.0 the VM xml files now have a ".vbox" extension. However this is not the forum to describe whats new in the VirtualBox v4 release. I'm sure you can find that elsewhere if you try.
mpack
Site Moderator
 
Posts: 27696
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Which changes trigger reactivation in a Windows guest?

Postby casolorz » 11. Mar 2011, 03:59

Hopefully this will help someone in the future since its the answer we were unable to find.

Windows 7 appears to use the uuid of your VM for activation. When you first make your VM, there will be a uuid giving the machine a unique id. It can be found on the machine xml element. If you activate Windows 7 at this point, it will use that id. This means as long as that id is registered in VirtualBox, to clone that VM you will need a new id and it will trigger a reactivation. To get around this, before activating Windows 7 (one of our tests even showed you had to install it like that, but further tests didn't), you want to add a hardware id, this is done by adding a uuid to the hardware xml element. I did it by registering the VM, then using the modifyvm command. I am guessing it can be done by hand but I didn't do it that way. Once you've done that, if Windows activates or reactivates (probably), it will use the hardware uuid instead of the machine one. Now you can safely clone the VM, change the machine uuid, but keep the hardware uuid identical and your Windows 7 will not need to be reactivated. Obviously you should still comply with Microsoft licensing.
casolorz
 
Posts: 15
Joined: 10. Jan 2011, 18:21
Primary OS: Ubuntu 8.04
VBox Version: PUEL
Guest OSses: Windows xp/2k3/7/2008

Re: Which changes trigger reactivation in a Windows guest?

Postby Sasquatch » 11. Mar 2011, 21:15

Casorolz, that's exactly what I said in the beginning of this thread ;).
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Which changes trigger reactivation in a Windows guest?

Postby casolorz » 11. Mar 2011, 21:30

Sasquatch wrote:Casorolz, that's exactly what I said in the beginning of this thread ;).


Well not exactly, a lot of posts here point you towards the right solution but honestly no one tells you the exact process. Your first post for example doesn't talk about the hardware uuid. Other posts talk about it but they don't make it clear when to add it, etc. And of course there are a lot of posts talking about how people aren't asking the right question instead of just helping them. So my post was just a way to help people so they don't waste their time trying to decipher all the other posts, it was by no means a way to offend anyone, just trying to be helpful. We've had several people read the entire 5 pages of posts and it was obviously not clear as to how to achieve VM cloning without reactivating, so I just wanted to spell it out. For all I know my post isn't clear either, I don't mind if people ask me to explain further.
casolorz
 
Posts: 15
Joined: 10. Jan 2011, 18:21
Primary OS: Ubuntu 8.04
VBox Version: PUEL
Guest OSses: Windows xp/2k3/7/2008

Re: Which changes trigger reactivation in a Windows guest?

Postby DWade » 18. Mar 2011, 18:36

Let get real.

Some times the explanation seem to be plain and simple; but they are not.

What is needed are those steps done like this:

Step One -- Do this

Step two -- do that. Short or Long way.

For instance I hadn't played with a Mac for awhile and there were all kinds of post about redoing permissions..... What is that??
Oh you go to the Disk Utlity an reapply permission. Ok, what is the disk utlilty? ..

Ok .. i.e. GA ?? oh Guest Additions....
DWade
 
Posts: 33
Joined: 10. Feb 2009, 17:36
Location: Texas
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows

Re: Which changes trigger reactivation in a Windows guest?

Postby Perryg » 18. Mar 2011, 18:55

DWade,
That is what the MAC forums are for. You go there with MAC specific questions and here for VirtualBox specific questions.
I am sure they know what the utility is and can give you a step-by-step guide on it's use.
Perryg
Site Moderator
 
Posts: 34372
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

PreviousNext

Return to Windows Guests

Who is online

Users browsing this forum: No registered users and 26 guests