Manually setting BIOS serial number for use through WMI

Chum

Bit poster
I'm in the process of trying to convert our standard desktop image to a parallels virtual machine and have had great success in getting it up and running, connecting to the domain, all devices installed, etc.

In order to manage the devices in our environment efficiently, we store records of each device based on the serial number found within the BIOS. For all of our physical machines, this works extremely well as all of the big manufacturers provide unique IDs that can be read through WMI. The problem occurs when attempting to read the same fields from WMI on a parallels virtual machine. The field is populated with a value - specifically Parallels - [MAC ADDRESS] but this is too long to use properly within our processes.

Is there a way, either by a command or editing a configuration file, to manually set the serial number reported by the BIOS? I've been able to do this with both VirtualPC and VMWare and was hoping the same functionality was available within Parallels (which is currently my virualization software of choice).

Thanks for your time.
 
Are you using Parallels Desktop 3.0 or 4.0?
Not sure about Parallels Desktop 3.0, but Parallels 4.0 should report the machine UUID properly and it should be possible to edit it. I cann't say the details right now, but if it is the case, I will take a look tomorrow
 
I recently updated to version 4. And it looks like you are correct in that the "BIOS" of the virtual machine is reporting the UUID and not the MAC as I suspected. Where can I change this value?

Thanks for your help.
 
It should report the uuid from config.pvs of Virtual Machine:

<ParallelsVirtualMachine schemaVersion="1.0" >
...
<Identification>
<VmUuid>{b0a5453f-d61b-4b2a-bf18-e4348a946981}</VmUuid>
</Identification>
</ParallelsVirtualMachine>

PS: could you please send a WMI command which obtains UUID of the machine? I'd want to check myself that all is working as expected
 
We're using the following VBscript code. To test, save into a file with a .vbs extension and then run from a DOS prompt:

cscript.exe [yourfilename].vbs

It should output:

BIOS reported SN of Parallels-OB 12 34 45 56 78 90 12 23 34 45 56 67 78 89 90

set wmiLocator = CreateObject("WbemScripting.SWbemLocator") 'Create wmiObject
set wmiService = wmiLocator.ConnectServer("", "root\cimv2") 'Connect to wmi

set BIOS = wmiService.ExecQuery _
("select SerialNumber from Win32_BIOS") 'run query for sn in Win32_BIOS class

If BIOS.Count > 0 Then 'If we got hits from this query
For Each Inst in BIOS ' extract the serial number
mySN = Inst.SerialNumber
Next
End If

If IsNull(mySN) Then 'If mySN is null, try Win32_SysEnclosure class
set SysEnc = wmiService.ExecQuery _
("select SerialNumber from Win32_SystemEnclosure") ' (often Dell Tags are in here)
If SysEnc.Count > 0 Then 'Extract on success
For Each SE in SysEnc
mySN = SE.SerialNumber
Next
End If
End If

If IsNull(mySN) Then 'If mySN is still null, set var to 'unknown'
mySN = "unknown"
End If

wmiSN = mySN

wscript.echo "BIOS reported SN of " & mySN

I haven't tried to update the config file yet, but will test that shortly. Also - is seems to preface the UUID with the text "Parallels" - is it possible to supress this text?

[Edit] I'm having difficulty editing the the config file. Using Finder (I'm working on a Mac), I right click the .pvm file and choose "Show Package Contents" which opens a new window containing the contents of the virtual machine. I open up the config.pvs with my favorite editor (Smultron) and edit the <VmUuid> field with the value I would like to appear.

When I boot the virutal machine, Parallels informs me that it (the virtual machine) is corrupt and gives me the option to remove. I had to force kill Parallels in order to prevent it from "removing" the virtual machine. I had saved a backup of the config file and restoring the copy made Parallels happy again. Any advice as to how I should be doing this would be greatly appreciated.[Edit]
 
Last edited:
Sorry, I didn't managed to check this today,
but about vmuuid - could you please attach the modified config.pvs here? I will take a look at monday
 
I've attached the .pvs file which I've renamed in order to upload to the forum.

One other quick question that is somewhat related: What is the best way to make a copy of a virtual machine? I would like to do some testing on the .pvs file, but I don't want to corrupt my existing machine. Since disk is cheap, I would prefer to create a copy but wasn't sure how to properly do that from within the Parallels application.
 

Attachments

I've attached the .pvs file which I've renamed in order to upload to the forum.

There is the problem: there is <VmUuid>AFO8N</VmUuid>, but VM requires the UUID in form like {928d22fd-a62d-4fc9-a249-6f08fafb9697}

afaik, the SMBIOS/DMI standard requires so

---

The script have really reported Parallels-OB 12 34 45 56 78 90 12 23 34 45 56 67 78 89 00, it seems that it is the Windows added the 'Parallels' to the start of identifier..

Btw, there is one more way to find system UUID:

set wmiLocator = CreateObject("WbemScripting.SWbemLocator") 'Create wmiObject
set wmiService = wmiLocator.ConnectServer("", "root\cimv2") 'Connect to wmi

Set items = wmiService.ExecQuery("Select * from Win32_ComputerSystemProduct",,48)

For Each Item in items ' extract the serial number
Wscript.Echo "UUID: " & Item.UUID
Next


One other quick question that is somewhat related: What is the best way to make a copy of a virtual machine? I would like to do some testing on the .pvs file, but I don't want to corrupt my existing machine. Since disk is cheap, I would prefer to create a copy but wasn't sure how to properly do that from within the Parallels application.

I think that Cloning the machine (from the menu Virtual Machine->Clone) is a convinient way to do so
 
Thank you for the reply. I knew there had to be a convenient way to clone an existing machine, but am still getting used to the interface.


As for the UUID: The point of the thread was to determine if I could change the BIOS reported serial number away from the {xx-xx-xx-xx-xx-xx-xx-xx} format to something that is more conducive to using within a Windows environment. Is there anyway that I can modify a section of the .pvs file to make this happen?

Thanks.
 
As for the UUID: The point of the thread was to determine if I could change the BIOS reported serial number away from the {xx-xx-xx-xx-xx-xx-xx-xx} format to something that is more conducive to using within a Windows environment. Is there anyway that I can modify a section of the .pvs file to make this happen?

Thanks.

Afaik, the UUID is the only field that is exposed from the VM configuration..
may be you could use e.g. last bytes of UUID to encode something more convinient
 
Any updates? Now that we're on Parallels 7 is there a way to change the BIOS reported serial number on the virtual machine? Your competitors have had this option for quite some time.
 
I am not Chum, but work in the same environment. Nearly five years later, this inability to rename the BIOS name as it appears in Windows continues to be a problem. Given that Parallels is already being used (albeit somewhat hobbled due to the broken back-end record created by the lengthy BIOS name), I would prefer to correct this issue without having to change products. Is there now any known way of working around this?

Thanks.
 
Hi, it is 2 years later and now I am on Parallels 11 for Mac.
How do I manually set the bios serial number reported by a Windows VM ?
 
Serial is in format "Parallels-XX..XX", where XX are digits. Part with digits can be changed by editing config.pvs, field "SourceVmUuid". It is not possible currently to change format of the serial.

I'll talk with responsible person about whether our Parallels policy will allow to modify behaviour in order to change serial completely.
 
Hi Elric, any update on this modification ? I would like also to be able to modify the serial number of a Windows VM as well.

Thanks,
 
Back
Top