VMware Communities > Blogs > John Tuffin's Blog > 2008 > May

Blog Posts

John Tuffin's Blog : May 27, 2008

Previous Next

0


This is cool becasue so often I've wanted to modify the boot order of a virtual machine and this little bit of code allows you to do it. I can't remember where I found it now so I can't give credit but thanks to the poster that put this up in the forums.

$spec = New-Object VMware.Vim.VirtualMachineConfigSpec $spec.extraConfig += New-Object VMware.Vim.OptionValue $spec.extraConfig[0].key = "bios.bootDeviceClasses" $spec.extraConfig[0].value = "allow:cd,hd" (get-view (Get-VM -Name <VM-name>).ID).ReconfigVM_Task($spec)

0 Comments Permalink