Page 5 of 11

Re: Which changes trigger reactivation in a Windows guest?

Posted: 17. Dec 2010, 01:02
by abye180
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.

Re: Which changes trigger reactivation in a Windows guest?

Posted: 17. Dec 2010, 13:32
by mpack
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.

Re: Which changes trigger reactivation in a Windows guest?

Posted: 17. Dec 2010, 17:55
by abye180
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.

Re: Which changes trigger reactivation in a Windows guest?

Posted: 17. Dec 2010, 18:09
by mpack
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.

Re: Which changes trigger reactivation in a Windows guest?

Posted: 18. Dec 2010, 17:10
by Sasquatch
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.

Re: Which changes trigger reactivation in a Windows guest?

Posted: 18. Dec 2010, 20:13
by mpack
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.

Re: Which changes trigger reactivation in a Windows guest?

Posted: 22. Dec 2010, 16:34
by abye180
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.

Re: Which changes trigger reactivation in a Windows guest?

Posted: 9. Mar 2011, 02:45
by lagerdalek
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

Re: Which changes trigger reactivation in a Windows guest?

Posted: 9. Mar 2011, 11:53
by mpack
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.

Re: Which changes trigger reactivation in a Windows guest?

Posted: 11. Mar 2011, 03:59
by casolorz
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.

Re: Which changes trigger reactivation in a Windows guest?

Posted: 11. Mar 2011, 21:15
by Sasquatch
Casorolz, that's exactly what I said in the beginning of this thread ;).

Re: Which changes trigger reactivation in a Windows guest?

Posted: 11. Mar 2011, 21:30
by casolorz
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.

Re: Which changes trigger reactivation in a Windows guest?

Posted: 18. Mar 2011, 18:36
by DWade
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....

Re: Which changes trigger reactivation in a Windows guest?

Posted: 18. Mar 2011, 18:55
by Perryg
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.

Re: Which changes trigger reactivation in a Windows guest?

Posted: 18. Mar 2011, 18:57
by casolorz
DWade wrote: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....
Good point.

Let me type the instructions for what worked for us.

Our goal was to clone Windows 7 hard drives without triggering reactivation. Obviously you should have the Windows licenses necessary for this, we just didn't want the pain of reactivating.

Step 1 - Make the vbox file you want to use to install Windows 7. Don't install Windows 7 yet.

Step 2 - Edit the vbox file to add a hardware uuid. Make note of it, this will never change. If you don't see a hardware uuid prior to adding it don't worry, that is normal, but you can still add it. I've added it with modifyvm, but I am guessing it can be done by hand too.

Step 3 - Install Windows 7 and activate.

Step 4 - Clone your hard drive.

Step 5 - Make new vbox file that uses the new hard drive clone. Keep in mind the new clone has a new uuid and a new filename and possibly path. Don't start the VM yet.

Step 6 - Add the same hardware uuid you had before in step 2.

Step 7 - Start the new VM, no reactivation should be needed.

If you want to trigger reactivation, just change the hardware uuid. Also keep in mind the two VMs will have different machine uuids but Windows 7 isn't using it because you now have a hardware ID.

Hope that helps.