Search This Blog

Thursday 17 December 2009

PowerCLI to alter VM BIOS setting



I've been asked by a client how to change the BIOS boot order of a Virtual Machine so that they can PXE boot it first to build it, and then change it to boot from the hard disk afterwards.

So, I've not discovered any information where it is possible to actually change the order of boot devices, but it IS possible to allow/disallow certain devices. So, the code is as follows


Connect-VIServer ipaddress
$spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$spec.extraConfig += New-Object VMware.Vim.OptionValue
$spec.extraConfig[0].key = "bios.bootDeviceClasses"
$spec.extraConfig[0].value = "allow:net"

(get-view (Get-VM -Name "Virtual Machine").ID).ReconfigVM_Task($spec)

Thursday 3 December 2009

vSphere client crashes with C++ error



If you have installed Converter onto vCenter for vSphere 4, make sure that you don't have the VirtualCenter 2.5 client installed along with the vSphere Client as you will get this c++ error.


I haven't tested it, but http://communities.vmware.com/thread/118140?start=30&tstart=0 states that you can run the two versions if you follow the instructions.

Update Manager Proxy settings



Just discovered something important when you are creating proxy settings in update manager for vSphere 4.

You must make sure that the account you are using for the proxy server

a) exists!!
b) is the service account that Update Manager is running under.