Set-XenVM
Sets fields of a VM object.
Syntax
Set-XenVM [-VM] <VM> [-PassThru] [-NameLabel <string>] [-NameDescription <string>]
[-UserVersion <long>] [-IsATemplate <bool>] [-Affinity <XenRef[Host]>]
[-VCPUsParams <hashtable>]
[-ActionsAfterSoftreboot {soft_reboot | destroy | restart | preserve | unknown}]
[-ActionsAfterShutdown {destroy | restart | unknown}]
[-ActionsAfterReboot {destroy | restart | unknown}] [-PVBootloader <string>]
[-PVKernel <string>] [-PVRamdisk <string>] [-PVArgs <string>]
[-PVBootloaderArgs <string>] [-PVLegacyArgs <string>] [-HVMBootParams <hashtable>]
[-PCIBus <string>] [-Recommendations <string>] [-XenstoreData <hashtable>]
[-Tags <string[]>] [-SuspendSR <XenRef[SR]>] [-HardwarePlatformVersion <long>]
[-VCPUsNumberLive <long>] [-NVRAM <hashtable>] [-HaRestartPriority <string>]
[-HaAlwaysRun <bool>] [-MemoryDynamicMax <long>] [-MemoryDynamicMin <long>]
[-MemoryDynamicRange <long[]>] [-MemoryStaticMax <long>] [-MemoryStaticMin <long>]
[-MemoryStaticRange <long[]>] [-MemoryLimits <long[]>] [-Memory <long>]
[-MemoryTargetLive <long>] [-HVMShadowMultiplier <double>]
[-ShadowMultiplierLive <double>] [-VCPUsMax <long>] [-VCPUsAtStartup <long>]
[-BiosStrings <hashtable>] [-ProtectionPolicy <XenRef[VMPP]>]
[-SnapshotSchedule <XenRef[VMSS]>] [-StartDelay <long>] [-ShutdownDelay <long>]
[-Order <long>] [-SuspendVDI <XenRef[VDI]>] [-Appliance <XenRef[VM_appliance]>]
[-Groups <List[XenRef[VM_group]]>] [-HasVendorDevice <bool>]
[-ActionsAfterCrash {destroy | coredump_and_destroy | restart | coredump_and_restart | preserve | rename_restart | unknown}]
[-DomainType {hvm | pv | pv_in_pvh | pvh | unspecified | unknown}]
[-HVMBootPolicy <string>] [-UefiMode {setup | user | unknown}]
[-BlockedOperations {snapshot | clone | copy | create_template | revert | checkpoint | snapshot_with_quiesce | provision | start | start_on | pause | unpause | clean_shutdown | clean_reboot | hard_shutdown | power_state_reset | hard_reboot | suspend | csvm | resume | resume_on | pool_migrate | migrate_send | get_boot_record | send_sysrq | send_trigger | query_services | shutdown | call_plugin | changing_memory_live | awaiting_memory_live | changing_dynamic_range | changing_static_range | changing_memory_limits | changing_shadow_memory | changing_shadow_memory_live | changing_VCPUs | changing_VCPUs_live | changing_NVRAM | assert_operation_valid | data_source_op | update_allowed_operations | make_into_template | import | export | metadata_export | reverting | destroy | create_vtpm | sysprep | unknown}]
[-OtherConfig <hashtable>] [-Platform <hashtable>] [-BestEffort]
[-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-XenVM [-Ref] <XenRef[VM]> [-PassThru] [-NameLabel <string>]
[-NameDescription <string>] [-UserVersion <long>] [-IsATemplate <bool>]
[-Affinity <XenRef[Host]>] [-VCPUsParams <hashtable>]
[-ActionsAfterSoftreboot {soft_reboot | destroy | restart | preserve | unknown}]
[-ActionsAfterShutdown {destroy | restart | unknown}]
[-ActionsAfterReboot {destroy | restart | unknown}] [-PVBootloader <string>]
[-PVKernel <string>] [-PVRamdisk <string>] [-PVArgs <string>]
[-PVBootloaderArgs <string>] [-PVLegacyArgs <string>] [-HVMBootParams <hashtable>]
[-PCIBus <string>] [-Recommendations <string>] [-XenstoreData <hashtable>]
[-Tags <string[]>] [-SuspendSR <XenRef[SR]>] [-HardwarePlatformVersion <long>]
[-VCPUsNumberLive <long>] [-NVRAM <hashtable>] [-HaRestartPriority <string>]
[-HaAlwaysRun <bool>] [-MemoryDynamicMax <long>] [-MemoryDynamicMin <long>]
[-MemoryDynamicRange <long[]>] [-MemoryStaticMax <long>] [-MemoryStaticMin <long>]
[-MemoryStaticRange <long[]>] [-MemoryLimits <long[]>] [-Memory <long>]
[-MemoryTargetLive <long>] [-HVMShadowMultiplier <double>]
[-ShadowMultiplierLive <double>] [-VCPUsMax <long>] [-VCPUsAtStartup <long>]
[-BiosStrings <hashtable>] [-ProtectionPolicy <XenRef[VMPP]>]
[-SnapshotSchedule <XenRef[VMSS]>] [-StartDelay <long>] [-ShutdownDelay <long>]
[-Order <long>] [-SuspendVDI <XenRef[VDI]>] [-Appliance <XenRef[VM_appliance]>]
[-Groups <List[XenRef[VM_group]]>] [-HasVendorDevice <bool>]
[-ActionsAfterCrash {destroy | coredump_and_destroy | restart | coredump_and_restart | preserve | rename_restart | unknown}]
[-DomainType {hvm | pv | pv_in_pvh | pvh | unspecified | unknown}]
[-HVMBootPolicy <string>] [-UefiMode {setup | user | unknown}]
[-BlockedOperations {snapshot | clone | copy | create_template | revert | checkpoint | snapshot_with_quiesce | provision | start | start_on | pause | unpause | clean_shutdown | clean_reboot | hard_shutdown | power_state_reset | hard_reboot | suspend | csvm | resume | resume_on | pool_migrate | migrate_send | get_boot_record | send_sysrq | send_trigger | query_services | shutdown | call_plugin | changing_memory_live | awaiting_memory_live | changing_dynamic_range | changing_static_range | changing_memory_limits | changing_shadow_memory | changing_shadow_memory_live | changing_VCPUs | changing_VCPUs_live | changing_NVRAM | assert_operation_valid | data_source_op | update_allowed_operations | make_into_template | import | export | metadata_export | reverting | destroy | create_vtpm | sysprep | unknown}]
[-OtherConfig <hashtable>] [-Platform <hashtable>] [-BestEffort]
[-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-XenVM [-Uuid] <guid> [-PassThru] [-NameLabel <string>] [-NameDescription <string>]
[-UserVersion <long>] [-IsATemplate <bool>] [-Affinity <XenRef[Host]>]
[-VCPUsParams <hashtable>]
[-ActionsAfterSoftreboot {soft_reboot | destroy | restart | preserve | unknown}]
[-ActionsAfterShutdown {destroy | restart | unknown}]
[-ActionsAfterReboot {destroy | restart | unknown}] [-PVBootloader <string>]
[-PVKernel <string>] [-PVRamdisk <string>] [-PVArgs <string>]
[-PVBootloaderArgs <string>] [-PVLegacyArgs <string>] [-HVMBootParams <hashtable>]
[-PCIBus <string>] [-Recommendations <string>] [-XenstoreData <hashtable>]
[-Tags <string[]>] [-SuspendSR <XenRef[SR]>] [-HardwarePlatformVersion <long>]
[-VCPUsNumberLive <long>] [-NVRAM <hashtable>] [-HaRestartPriority <string>]
[-HaAlwaysRun <bool>] [-MemoryDynamicMax <long>] [-MemoryDynamicMin <long>]
[-MemoryDynamicRange <long[]>] [-MemoryStaticMax <long>] [-MemoryStaticMin <long>]
[-MemoryStaticRange <long[]>] [-MemoryLimits <long[]>] [-Memory <long>]
[-MemoryTargetLive <long>] [-HVMShadowMultiplier <double>]
[-ShadowMultiplierLive <double>] [-VCPUsMax <long>] [-VCPUsAtStartup <long>]
[-BiosStrings <hashtable>] [-ProtectionPolicy <XenRef[VMPP]>]
[-SnapshotSchedule <XenRef[VMSS]>] [-StartDelay <long>] [-ShutdownDelay <long>]
[-Order <long>] [-SuspendVDI <XenRef[VDI]>] [-Appliance <XenRef[VM_appliance]>]
[-Groups <List[XenRef[VM_group]]>] [-HasVendorDevice <bool>]
[-ActionsAfterCrash {destroy | coredump_and_destroy | restart | coredump_and_restart | preserve | rename_restart | unknown}]
[-DomainType {hvm | pv | pv_in_pvh | pvh | unspecified | unknown}]
[-HVMBootPolicy <string>] [-UefiMode {setup | user | unknown}]
[-BlockedOperations {snapshot | clone | copy | create_template | revert | checkpoint | snapshot_with_quiesce | provision | start | start_on | pause | unpause | clean_shutdown | clean_reboot | hard_shutdown | power_state_reset | hard_reboot | suspend | csvm | resume | resume_on | pool_migrate | migrate_send | get_boot_record | send_sysrq | send_trigger | query_services | shutdown | call_plugin | changing_memory_live | awaiting_memory_live | changing_dynamic_range | changing_static_range | changing_memory_limits | changing_shadow_memory | changing_shadow_memory_live | changing_VCPUs | changing_VCPUs_live | changing_NVRAM | assert_operation_valid | data_source_op | update_allowed_operations | make_into_template | import | export | metadata_export | reverting | destroy | create_vtpm | sysprep | unknown}]
[-OtherConfig <hashtable>] [-Platform <hashtable>] [-BestEffort]
[-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-XenVM [-Name] <string> [-PassThru] [-NameLabel <string>] [-NameDescription <string>]
[-UserVersion <long>] [-IsATemplate <bool>] [-Affinity <XenRef[Host]>]
[-VCPUsParams <hashtable>]
[-ActionsAfterSoftreboot {soft_reboot | destroy | restart | preserve | unknown}]
[-ActionsAfterShutdown {destroy | restart | unknown}]
[-ActionsAfterReboot {destroy | restart | unknown}] [-PVBootloader <string>]
[-PVKernel <string>] [-PVRamdisk <string>] [-PVArgs <string>]
[-PVBootloaderArgs <string>] [-PVLegacyArgs <string>] [-HVMBootParams <hashtable>]
[-PCIBus <string>] [-Recommendations <string>] [-XenstoreData <hashtable>]
[-Tags <string[]>] [-SuspendSR <XenRef[SR]>] [-HardwarePlatformVersion <long>]
[-VCPUsNumberLive <long>] [-NVRAM <hashtable>] [-HaRestartPriority <string>]
[-HaAlwaysRun <bool>] [-MemoryDynamicMax <long>] [-MemoryDynamicMin <long>]
[-MemoryDynamicRange <long[]>] [-MemoryStaticMax <long>] [-MemoryStaticMin <long>]
[-MemoryStaticRange <long[]>] [-MemoryLimits <long[]>] [-Memory <long>]
[-MemoryTargetLive <long>] [-HVMShadowMultiplier <double>]
[-ShadowMultiplierLive <double>] [-VCPUsMax <long>] [-VCPUsAtStartup <long>]
[-BiosStrings <hashtable>] [-ProtectionPolicy <XenRef[VMPP]>]
[-SnapshotSchedule <XenRef[VMSS]>] [-StartDelay <long>] [-ShutdownDelay <long>]
[-Order <long>] [-SuspendVDI <XenRef[VDI]>] [-Appliance <XenRef[VM_appliance]>]
[-Groups <List[XenRef[VM_group]]>] [-HasVendorDevice <bool>]
[-ActionsAfterCrash {destroy | coredump_and_destroy | restart | coredump_and_restart | preserve | rename_restart | unknown}]
[-DomainType {hvm | pv | pv_in_pvh | pvh | unspecified | unknown}]
[-HVMBootPolicy <string>] [-UefiMode {setup | user | unknown}]
[-BlockedOperations {snapshot | clone | copy | create_template | revert | checkpoint | snapshot_with_quiesce | provision | start | start_on | pause | unpause | clean_shutdown | clean_reboot | hard_shutdown | power_state_reset | hard_reboot | suspend | csvm | resume | resume_on | pool_migrate | migrate_send | get_boot_record | send_sysrq | send_trigger | query_services | shutdown | call_plugin | changing_memory_live | awaiting_memory_live | changing_dynamic_range | changing_static_range | changing_memory_limits | changing_shadow_memory | changing_shadow_memory_live | changing_VCPUs | changing_VCPUs_live | changing_NVRAM | assert_operation_valid | data_source_op | update_allowed_operations | make_into_template | import | export | metadata_export | reverting | destroy | create_vtpm | sysprep | unknown}]
[-OtherConfig <hashtable>] [-Platform <hashtable>] [-BestEffort]
[-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
Description
Changes writable fields of a VM. Each optional parameter listed below corresponds to a field that can be set.
Parameters
-ActionsAfterCrash
Sets the actions\_after\_crash parameter
| Attribute | Value |
|---|---|
| Type | on_crash_behaviour |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | destroy, coredump_and_destroy, restart, coredump_and_restart, preserve, rename_restart, unknown |
-ActionsAfterReboot
Set the actions/after\_reboot field of the given VM.
| Attribute | Value |
|---|---|
| Type | on_normal_exit |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | destroy, restart, unknown |
-ActionsAfterShutdown
Set the actions/after\_shutdown field of the given VM.
| Attribute | Value |
|---|---|
| Type | on_normal_exit |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | destroy, restart, unknown |
-ActionsAfterSoftreboot
Set the actions/after\_softreboot field of the given VM.
| Attribute | Value |
|---|---|
| Type | on_softreboot_behavior |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | soft_reboot, destroy, restart, preserve, unknown |
-Affinity
Set the affinity field of the given VM.
| Attribute | Value |
|---|---|
| Type | XenRef[Host] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Appliance
Assign this VM to an appliance.
| Attribute | Value |
|---|---|
| Type | XenRef[VM_appliance] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Async
If set, the operation runs asynchronously and returns a Task object that can be used to track its progress. Available only for those fields whose underlying operation supports asynchronous invocation.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-BestEffort
If set, the cmdlet continues processing further objects instead of throwing a terminating error when an operation fails for one object.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-BiosStrings
Set custom BIOS strings to this VM. VM will be given a default set of BIOS strings, only some of which can be overridden by the supplied values. Allowed keys are: 'bios-vendor', 'bios-version', 'system-manufacturer', 'system-product-name', 'system-version', 'system-serial-number', 'enclosure-asset-tag', 'baseboard-manufacturer', 'baseboard-product-name', 'baseboard-version', 'baseboard-serial-number', 'baseboard-asset-tag', 'baseboard-location-in-chassis', 'enclosure-asset-tag'
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-BlockedOperations
Update list of operations which have been explicitly blocked and an error code
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | snapshot, clone, copy, create_template, revert, checkpoint, snapshot_with_quiesce, provision, start, start_on, pause, unpause, clean_shutdown, clean_reboot, hard_shutdown, power_state_reset, hard_reboot, suspend, csvm, resume, resume_on, pool_migrate, migrate_send, get_boot_record, send_sysrq, send_trigger, query_services, shutdown, call_plugin, changing_memory_live, awaiting_memory_live, changing_dynamic_range, changing_static_range, changing_memory_limits, changing_shadow_memory, changing_shadow_memory_live, changing_VCPUs, changing_VCPUs_live, changing_NVRAM, assert_operation_valid, data_source_op, update_allowed_operations, make_into_template, import, export, metadata_export, reverting, destroy, create_vtpm, sysprep, unknown |
-Confirm
Prompts for confirmation before running the cmdlet.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Aliases | cf |
-DomainType
Set the VM.domain\_type field of the given VM, which will take effect when it is next started
| Attribute | Value |
|---|---|
| Type | domain_type |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | hvm, pv, pv_in_pvh, pvh, unspecified, unknown |
-Groups
Associate this VM with VM groups.
| Attribute | Value |
|---|---|
| Type | List[XenRef[VM_group]] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-HVMBootParams
Set the HVM/boot\_params field of the given VM.
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-HVMBootPolicy
Set the VM.HVM\_boot\_policy field of the given VM, which will take effect when it is next started
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-HVMShadowMultiplier
Set the shadow memory multiplier on a halted VM
| Attribute | Value |
|---|---|
| Type | double |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-HaAlwaysRun
Set the value of the ha\_always\_run
| Attribute | Value |
|---|---|
| Type | bool |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-HaRestartPriority
Set the value of the ha\_restart\_priority field
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-HardwarePlatformVersion
Set the hardware\_platform\_version field of the given VM.
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-HasVendorDevice
Controls whether, when the VM starts in HVM mode, its virtual hardware will include the emulated PCI device for which drivers may be available through Windows Update. Usually this should never be changed on a VM on which Windows has been installed: changing it on such a VM is likely to lead to a crash on next start.
| Attribute | Value |
|---|---|
| Type | bool |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-IsATemplate
Set the is\_a\_template field of the given VM.
| Attribute | Value |
|---|---|
| Type | bool |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Memory
Set the memory allocation of this VM. Sets all of memory\_static\_max, memory\_dynamic\_min, and memory\_dynamic\_max to the given value, and leaves memory\_static\_min untouched.
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-MemoryDynamicMax
Set the value of the memory\_dynamic\_max field
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-MemoryDynamicMin
Set the value of the memory\_dynamic\_min field
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-MemoryDynamicRange
Set the minimum and maximum amounts of physical memory the VM is allowed to use.
| Attribute | Value |
|---|---|
| Type | long[] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-MemoryLimits
Set the memory limits of this VM.
| Attribute | Value |
|---|---|
| Type | long[] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-MemoryStaticMax
Set the value of the memory\_static\_max field
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-MemoryStaticMin
Set the value of the memory\_static\_min field
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-MemoryStaticRange
Set the static (ie boot-time) range of virtual memory that the VM is allowed to use.
| Attribute | Value |
|---|---|
| Type | long[] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-MemoryTargetLive
Set the memory target for a running VM
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-NVRAM
This parameter has no documentation.
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Name
The name of the VM to operate on.
| Attribute | Value |
|---|---|
| Type | string |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByPropertyName) |
| Aliases | name_label |
-NameDescription
Set the name/description field of the given VM.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-NameLabel
Set the name/label field of the given VM.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Order
Set this VM's boot order
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-OtherConfig
Set the other\_config field of the given VM.
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-PCIBus
Set the PCI\_bus field of the given VM.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-PVArgs
Set the PV/args field of the given VM.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-PVBootloader
Set the PV/bootloader field of the given VM.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-PVBootloaderArgs
Set the PV/bootloader\_args field of the given VM.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-PVKernel
Set the PV/kernel field of the given VM.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-PVLegacyArgs
Set the PV/legacy\_args field of the given VM.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-PVRamdisk
Set the PV/ramdisk field of the given VM.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-PassThru
If set, the cmdlet returns the affected object. By default the cmdlet does not generate any output.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Platform
Set the platform field of the given VM.
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-ProtectionPolicy
Set the value of the protection\_policy field
| Attribute | Value |
|---|---|
| Type | XenRef[VMPP] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Recommendations
Set the recommendations field of the given VM.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Ref
The VM object to operate on, specified by its opaque reference.
| Attribute | Value |
|---|---|
| Type | XenRef[VM] |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByPropertyName) |
| Aliases | opaque_ref |
-SessionOpaqueRef
The session object on which to run the cmdlet. This overrides the default session and lets you target a specific open XenServer connection.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-ShadowMultiplierLive
Set the shadow memory multiplier on a running VM
| Attribute | Value |
|---|---|
| Type | double |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-ShutdownDelay
Set this VM's shutdown delay in seconds
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-SnapshotSchedule
Set the value of the snapshot schedule field
| Attribute | Value |
|---|---|
| Type | XenRef[VMSS] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-StartDelay
Set this VM's start delay in seconds
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-SuspendSR
Set the suspend\_SR field of the given VM.
| Attribute | Value |
|---|---|
| Type | XenRef[SR] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-SuspendVDI
Set this VM's suspend VDI, which must be indentical to its current one
| Attribute | Value |
|---|---|
| Type | XenRef[VDI] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-UefiMode
Set the UEFI mode of a VM
| Attribute | Value |
|---|---|
| Type | vm_uefi_mode |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | setup, user, unknown |
-UserVersion
Set the user\_version field of the given VM.
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Uuid
The UUID of the VM to operate on.
| Attribute | Value |
|---|---|
| Type | guid |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByPropertyName) |
-VCPUsAtStartup
Set the number of startup VCPUs for a halted VM
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-VCPUsMax
Set the maximum number of VCPUs for a halted VM
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-VCPUsNumberLive
Set the number of VCPUs for a running VM
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-VCPUsParams
Set the VCPUs/params field of the given VM.
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-VM
The VM object to operate on.
| Attribute | Value |
|---|---|
| Type | VM |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByValue) |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Aliases | wi |
-XenstoreData
Set the xenstore\_data field of the given VM.
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
Inputs
-
VM -
XenRef[VM] -
guid -
string
Outputs
-
VM -
Task -
void
Examples
Example 1: Set the NameLabel field
PS> Get-XenVM -Name "Demo VM" | Set-XenVM -NameLabel "new value"
Sets the NameLabel field of a VM.
Example 2: Rename a VM and set its description
PS> Get-XenVM -Name "web-01" |
Set-XenVM -NameLabel "web-01a" -NameDescription "Front end, rebuilt"
Several fields can be set in one synchronous call. Only one field at a time can be set with -Async, because each field is a separate call on the server.
Example 3: Put a VM into a VM group
PS> $group = Get-XenVMGroup -Name "front end"
PS> Get-XenVM -Name "web-01" | Set-XenVM -Groups $group
Group membership is written from the VM side and read from the group side, which is the half that is easy to get wrong: there is no Set-XenVMGroup parameter that adds members.
Related links
-
Class: VM
-
Using the XenServer PowerShell module