PowerCLI

 View Only
  • 1.  Enable or Disable UEFI Secure Boot on vCloud VM

    Posted Aug 19, 2022 07:01 AM

    Hi,

    Im looking for a way to disable secure boot on VMs in vCloud by script using PowerCLI. I clone a default VM template that IT manages that has secure boot enabled, but since i'm running software that is not compatible I need to disable it after the VM has been generated. I'm generating a whole bunch of VMs which needs the same setup, so I was hoping to avoid having to do this manually...

    This solution works for vCenter, but when trying a similar solution with a vCloud CIVM object it fails:

    $tmpvmObj = Get-CIVM -Id "xxx"
    $spec = New-Object VMware.Vim.VirtualMachineConfigSpec
    $spec.Firmware = [VMware.Vim.GuestOsDescriptorFirmwareType]::bios
    $tmpvmObj.ExtensionData.ReconfigureVm($spec)

    Results in error:
    Cannot find an overload for "ReconfigureVm" and the argument count: "1".
    At line:1 char:1
    + $tmpvmObj.ExtensionData.ReconfigureVm($spec)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest

    So, is there any solution to do this by script automation for vCloud CIVM objects? Thanks in advance



  • 2.  RE: Enable or Disable UEFI Secure Boot on vCloud VM
    Best Answer

    Posted Aug 21, 2022 12:16 PM

    Hi.

    This property and method is missing from the vCloud api.

    BootOptions element contains only BootDelay and EnterBIOSSetup.
    I don't think it can be done in vCloud.

    https://vdc-download.vmware.com/vmwb-repository/dcr-public/ca48e1bb-282b-4fdc-b827-649b819249ed/55142cf1-5bb8-4ab1-8d09-b84f717af5ec/doc/doc/types/VmType.html 



  • 3.  RE: Enable or Disable UEFI Secure Boot on vCloud VM

    Posted Aug 21, 2022 12:56 PM

    **bleep**... thats a bummer I guess i have to ask IT for a separate image with secure boot turned off then.

    Thanks for the quick response!