def get_vm_boot_spec(client_factory, device):
 config_spec = client_factory.create('ns0:VirtualMachineConfigSpec')
 boot_disk = client_factory.create('ns0:VirtualMachineBootOptionsBootableDiskDevice')
 boot_disk.deviceKey = device.key
 boot_options = client_factory.create('ns0:VirtualMachineBootOptions')
 boot_options.bootOrder = [boot_disk]
 config_spec.bootOptions = boot_options
 return config_spec

def get_vm_boot_spec ( client_factory , device ) : config_spec = client_factory . create ( 'ns0:VirtualMachineConfigSpec' ) boot_disk = client_factory . create ( 'ns0:VirtualMachineBootOptionsBootableDiskDevice' ) boot_disk . deviceKey = device . key boot_options = client_factory . create ( 'ns0:VirtualMachineBootOptions' ) boot_options . bootOrder = [ boot_disk ] config_spec . bootOptions = boot_options return config_spec
returns updated boot settings for the instance .