VMware Cloud Community
VMW4LFE
Contributor
Contributor

How can I Modify vCenter VirtualCenter server configuration?

Hello all,

I'm running into a situation where I must change the VirtualCenter Server Unique ID every couple of days due to VM MAC address duplication. I change the Unique ID and then VC starts handing out MAC addresses with the 3rd to last 'octet' being different from before. I can change the ID manually but I would like to task/script the process to be automatically done every week or so for the next year. I'm fairly well versed in the VIToolkit and Powershell but I do not see where this value can be unattended to.

The value I need to chage is in VirtualCenter under Administartion > Server Configuration > Runtime Settings > VirtualCenter Server Unique ID

Acceptable value range is 0-63

Please help!

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership

Afaik there is currently no cmdlet for the VC advanced configuration parameters, like there is for ESX hosts with the Set-VMHostAdvancedConfiguration cmdlet.

But there is a method, called UpdateOptions, in the SDK that allows this.

This should do the trick

$om = Get-View -Id (get-view ServiceInstance).content.setting

$ov = New-Object VMware.Vim.OptionValue
$ov.key = "instance.id"
$ov.value = <new-ID-value>

$om.UpdateOptions($ov)


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos