Skip to main content

I am using the New-NTNXVirtualMachine PowerShell cmdlet to create a VM on an AHV cluster.  Up until now, I haven’t included the “-BootConfig” option and it has defaulted to “BIOS”.

 

Now I need to specify UEFI and Secure Boot for Boot Configuration.  AI gave me examples and information but it must be out-dated because the properties were not named correctly.  Or maybe my cmdlets are out-dated.

 

It gave me this:

$bootConfig = New-NutanixObject -Name BootConfig
$bootConfig.uefi_boot = $true
$bootConfig.secure_boot = $true
$bootConfig.boot_device_order = @("kCdrom", "kDisk", "kNetwork")

New-NTNXVirtualMachine -Name "MyUEFIVM" -MemoryMB 4096 -NumVCPUs 2 -BootConfig $bootConfig -Cluster "MyCluster"

When I tried it, I found there were actually no underscores in the name.  But I did not find any reference to a property for “secureboot”.

$bootconfig | get-member


TypeName: Nutanix.Prism.DTO.Acropolis.BootConfigDTO

Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
bootDeviceOrder Property string[] bootDeviceOrder {get;set;}
bootDeviceType Property string bootDeviceType {get;set;}
diskAddress Property Nutanix.Prism.DTO.Acropolis.VMDiskAddressDTO diskAddress {get;set;}
macAddr Property string macAddr {get;set;}
uefiBoot Property System.Nullable[bool] uefiBoot {get;set;}

 

Does anyone have information how to correctly use this option?

 

Thank you!

 

-Tim

 

Be the first to reply!