Link to home
Start Free TrialLog in
Avatar of cavj1
cavj1Flag for United States of America

asked on

Change Hyper-V Virtual Machine Serial Number...

Hi All...

I need to change the serial number for a virtual machine that is running in Hyper-V.  We built two machines from the same ISO and Hyper V assigned it the same serial number.  My vendor uses that serial number in its licensing so I cannot license the second machine as it says it already exists/is licensed.

I've found a lot of articles on changing the GUID but that isn't the Serial number.  I've also read through this article but it just shows you how to query it...not change it.  

https://blogs.technet.microsoft.com/jhoward/2008/09/16/how-to-use-uniquely-identify-a-virtual-machine-in-hyper-v/

Any direction or help anyone could provide would be greatly appreciated...

Thanks
Joe
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

You mean the same product key?  You didn't sysprep?  I'd rebuild!

If you mean the same Hyper-V GUID, then export the VM and import it again (as a copy) - this should give you a new GUID.
Pretty sure he means the product ID, and you should have got your own product id when you purchased the machine. you might find it on the machine labeled product key for the virtual machines. Also check your invoices and communication with the vendor it might be there..

Once you get the correct product code, one way of changing it is from an administrative command prompt

slmgr -ipk <your product key here minus the <>'s >
then to activate
slmgr -ato
Avatar of cavj1

ASKER

No this is a not a product ID or MS License issue.  The VM is a linux built appliance that gets setup from an ISO.  The BIOSSerialNumber is what I need to change.  It seems Hyper V decided to assign both appliances the same serial number and the vendor said that this is a know issue with Hyper-V and we need to down the VM and change it from powershell.  I've asked what the command is to change it but they said that they are not Hyper-V admins and cannot provide the command syntax to change it.
Avatar of cavj1

ASKER

So...if you run this command:

Get-WmiObject – ComputerName hyper – v_server – Namespace '
root\virtualization\v2 – class Msvm_VirtualSystemSettingData ' | select elementname , BIOSSerialNumber

You will get the serial number of a VM.  I need the equivalent command to change that serial number.  Hope that helps...

Thanks
Did you try the Export/Import?
Avatar of cavj1

ASKER

No, that looks to only affect the GUID and not the Serial number.  From what I read the serial number is kept in an XML file.  Curious if that can be edited.
So it doesn't look like it will do it for you therefore you won't try it.  Sound logic.

It's been a very long time since I've seen software locked to a BIOS serial number (if I ever have) so I can't be certain it will work nor am I certain many others have tried because it's not a common problem.

Of course, the BIOS serial number COULD be based on the GUID of the VM... BUT probably not worth trying.

As for editing the XML, XML is a text file... why NOT edit it?  You could try it.  You could EASILY backup the XML file, edit and then see what happens... no?
Avatar of cavj1

ASKER

So editing the XML file seems to have worked...
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.