Udostępnij za pośrednictwem


Set-SCVMHost

Set-SCVMHost

Changes properties of a virtual machine host.

Syntax

Parameter Set: XenServerHost
Set-SCVMHost [-VMHost] <Host> [-AvailableForPlacement <Boolean]> ] [-BaseDiskPaths <String> ] [-BMCAddress <String> ] [-BMCCustomConfigurationProvider <ConfigurationProvider> ] [-BMCPort <UInt32]> ] [-BMCProtocol <OutOfBandManagementType]> ] [-BMCRunAsAccount <RunAsAccount> ] [-Certificate <ClientCertificate> ] [-CPUPercentageReserve <UInt16]> ] [-Credential <PSCredential> ] [-Custom1 <String> ] [-Custom10 <String> ] [-Custom2 <String> ] [-Custom3 <String> ] [-Custom4 <String> ] [-Custom5 <String> ] [-Custom6 <String> ] [-Custom7 <String> ] [-Custom8 <String> ] [-Custom9 <String> ] [-Description <String> ] [-DiskSpaceReserveMB <UInt64]> ] [-EnableLiveMigration <Boolean]> ] [-EnableSecureMode <Boolean> ] [-FibreChannelWorldWideNodeName <String> ] [-FibreChannelWorldWidePortNameMaximum <String> ] [-FibreChannelWorldWidePortNameMinimum <String> ] [-IsDedicatedToNetworkVirtualizationGateway <Boolean]> ] [-JobGroup <Guid]> ] [-JobVariable <String> ] [-LiveMigrationMaximum <UInt32]> ] [-LiveStorageMigrationMaximum <UInt32]> ] [-MaintenanceHost <Boolean]> ] [-ManagementAdapterMACAddress <String> ] [-MaxDiskIOReservation <UInt64]> ] [-MemoryReserveMB <UInt64]> ] [-MigrationAuthProtocol <MigrationAuthProtocolType]> ] [-MigrationPerformanceOption <MigrationPerformanceOptionType]> ] [-MigrationSubnet <String[]> ] [-NetworkPercentageReserve <UInt16]> ] [-NumaSpanningEnabled <Boolean]> ] [-OverrideHostGroupReserves <Boolean]> ] [-PROTipID <Guid]> ] [-RemoteConnectCertificatePath <String> ] [-RemoteConnectEnabled <Boolean]> ] [-RemoteConnectPort <UInt32]> ] [-RemoveRemoteConnectCertificate] [-RunAsynchronously] [-SecureRemoteConnectEnabled <Boolean]> ] [-SMBiosGuid <Guid]> ] [-TCPPort <UInt32]> ] [-UseAnyMigrationSubnet <Boolean]> ] [-VMHostManagementCredential <VMMCredential> ] [-VMPaths <String> ] [ <CommonParameters>]

Detailed Description

The Set-SCVMHost cmdlet changes one or more properties of a virtual machine host managed by Virtual Machine Manager (VMM).

You can specify whether a host is currently considered by the VMM placement process as a candidate on which to place virtual machines.

You can configure the following host reserve settings:

-- Percentage of CPU usage to set aside for use by the host.
-- Amount of disk space (MB) to set aside for use by the host.
-- Maximum number of disk I/O operations per second (IOPS) to set aside for use by the host.
-- Amount of memory (MB) to set aside for use by the host.
-- Percentage of network capacity to set aside for use by the host.

The VMM placement process does not recommend placing a virtual machine on a host unless the resource requirements of the virtual machine can be met without using the host reserves. If you do not specify reserve settings, VMM uses default settings.

You can specify, as a set of default paths, locations on a host where virtual machine files can be stored.

You can specify the password for an account used to manage Hyper-V hosts that are located in a perimeter network or in a non-trusted domain.

You can configure remote connection settings for Hyper-V hosts (VMConnect) that enable users to connect to virtual machines remotely. This setting does not apply to virtual machines on VMware ESX hosts.

Parameters

-AvailableForPlacement<Boolean]>

Indicates whether the VMM placement process considers this host or this volume on a host to be eligible as a possible location on which to deploy virtual machines. If this parameter is set to $False, you can choose to deploy virtual machines on this host or volume anyway. The default value is $True. This parameter does not apply to VMware ESX hosts.

When this parameter is used with network adapters, if set to $False, then placement does not consider the logical networks configured on this network adapter to determine if the host is suitable for connecting a virtual machine.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-BaseDiskPaths<String>

Specifies the paths to base disks.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-BMCAddress<String>

Specifies, or updates, the out-of-band baseboard management controller (BMC) address for a specific physical machine. A BMC is also known as a service processor or management controller. A BMC address can be an IP address, the fully qualified domain name (FQDN), or the DNS prefix, which is usually the same name as the NetBIOS name.

Typically, the BMC address and its connection to the network are separate from the IP address associated with a standard network adapter. Alternatively, some computers do use a standard network adapter to provide a single address for the BMC and for the network adapter. However, the BMC address has a unique port and is thus uniquely identifiable on the network.

-- IPv4 format: 10.0.0.21
-- Ipv6: 2001:4898:2a:3:657b:9c7a:e1f0:6829
-- FQDN format: Computer01.Contoso.com
-- NetBIOS format: Computer01

By default, VMM uses an IP address or FQDN for the BMC address. However, it is also possible to create a Windows PowerShell module that enables you to specify other types of addresses as the BMC address.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-BMCCustomConfigurationProvider<ConfigurationProvider>

Specifies, or updates, a configuration provider object for a BMC. A configuration provider is a plug-in to VMM that translates VMM Windows PowerShell commands to API calls that are specific to a type of baseboard management controller. To use this parameter, specify a value of Custom for the BMCProtocol parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-BMCPort<UInt32]>

Specifies, or updates, the out-of-band BMC port for a specific physical machine. A BMC port is also known as a service processor port. Example default ports are 623 for IPMI and 443 for SMASH over WS-Man.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-BMCProtocol<OutOfBandManagementType]>

Specifies, or updates, the protocol that VMM uses to communicate with the out-of-band BMC. Valid values are:

-- IPMI
-- SMASH
-- Custom

A BMC is a specialized controller on the motherboard of a server that acts an interface between the hardware and system management software. If the motherboard of a physical machine includes a BMC, when the machine is plugged in, whether it is powered off or powered on, and whether or not an operating system is installed, information about system hardware and the state of that system hardware health is available.

The Custom protocol requires you to specify the BMCCustomConfigurationProvider parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-BMCRunAsAccount<RunAsAccount>

Specifies the Run As account to use with the BMC device.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Certificate<ClientCertificate>

Specifies a security certificate object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CPUPercentageReserve<UInt16]>

Specifies the percentage of CPU to reserve for the use of the operating system on the physical host computer. If you do not specify a value, this cmdlet uses the default setting for the host group, which is 10 percent. The VMM placement process does not recommend that a virtual machine be placed on a host unless its resource requirements can be met without using host reserves.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies a credential object or, for some cmdlets, a Run As account object that contains the user name and password of an account that has permission to perform this action.

For more information about the PSCredential object, type Get-Help Get-Credential. For more information about Run As accounts, type, Get-Help New-SCRunAsAccount.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Custom1<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Custom10<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Custom2<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Custom3<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Custom4<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Custom5<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Custom6<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Custom7<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Custom8<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Custom9<String>

Specifies a custom property on a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Description<String>

States a description for the specified object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DiskSpaceReserveMB<UInt64]>

Specifies, in megabytes, the amount of disk space to reserve for the use of the operating system on the physical host computer. If you do not specify a value, this cmdlet uses the default setting for the host group, which is 100 MB. The VMM placement process does not recommend that a virtual machine be placed on a host unless its resource requirements can be met without using host reserves.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-EnableLiveMigration<Boolean]>

Indicates whether live migration is enabled on the host.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-EnableSecureMode<Boolean>

Indicates whether VMM communicates with VMware ESX hosts and Citrix XenServer hosts in secure mode. The default value is $True.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FibreChannelWorldWideNodeName<String>

Specifies the Fibre Channel world-wide node name.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FibreChannelWorldWidePortNameMaximum<String>

Specifies the maximum value of the Fibre Channel world-wide port name range.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FibreChannelWorldWidePortNameMinimum<String>

Specifies the minimum value of the Fibre Channel world-wide port name range.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-IsDedicatedToNetworkVirtualizationGateway<Boolean]>

Indicates whether the host is dedicated to a network virtualization gateway.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobGroup<Guid]>

Specifies an identifier for a series of commands that run as a set just before the final command that includes the same job group identifier runs.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LiveMigrationMaximum<UInt32]>

Specifies the maximum number of simultaneous live migrations.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LiveStorageMigrationMaximum<UInt32]>

Specifies the maximum number of simultaneous live storage migrations.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MaintenanceHost<Boolean]>

This parameter is obsolete. Use AvailableForPlacement instead.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ManagementAdapterMACAddress<String>

Specifies the MAC address of the physical network adapter on the computer that is to be used by the VMM server to communicate with this host.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MaxDiskIOReservation<UInt64]>

Specifies the maximum disk I/O per second (IOPS) on the physical host computer. If you do not specify this parameter, this cmdlet uses the default setting for the host group, which is 10000. The VMM placement process does not recommend that a virtual machine be placed on a host unless its resource requirements can be met without using host reserves.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MemoryReserveMB<UInt64]>

Specifies, in megabytes, the amount of memory to reserve for the use of the host operating system on the physical host computer. If you do not specify this parameter, this cmdlet uses the default setting for the host group, which is 256 MB. The VMM placement process does not recommend that a virtual machine be placed on a host unless its resource requirements can be met without using host reserves.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MigrationAuthProtocol<MigrationAuthProtocolType]>

Specifies the authorization protocol used for migration. Valid values are: CredSSP and Kerberos.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MigrationPerformanceOption<MigrationPerformanceOptionType]>

Specifies the migration performance option type. Valid values are:

-- Standard
-- UseCompression
-- UseSmbTransport

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MigrationSubnet<String[]>

Specifies an array of subnets to use for migration.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NetworkPercentageReserve<UInt16]>

Specifies the percentage of network capacity to reserve for the use of the host operating system on the physical host computer. If you do not specify this parameter, this cmdlet uses the default setting for the host group, which is 10 percent. The VMM placement process does not recommend that a virtual machine be placed on a host unless its resource requirements can be met without using host reserves.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NumaSpanningEnabled<Boolean]>

Indicates whether NUMA spanning is enabled.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OverrideHostGroupReserves<Boolean]>

Indicates whether the host reserve settings from the parent host group are be overridden by the provided settings.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid]>

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RemoteConnectCertificatePath<String>

This parameter is obsolete.

Aliases

VMRCCertificatePath

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RemoteConnectEnabled<Boolean]>

Indicates whether to enable a connection on a host server that lets users connect to their virtual machines remotely. This parameter only applies to virtual machines on Hyper-V hosts. It is not applicable to virtual machines on VMware ESX hosts or Citrix XenServer hosts.

Aliases

VMRCEnabled

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RemoteConnectPort<UInt32]>

Specifies a default value for the TCP port to use when a remote user connects to a virtual machine. Typically, the default port for a Hyper-V host is 2179. This parameter does not apply to VMware ESX hosts or Citrix XenServer hosts.

Aliases

VMRCPort

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RemoveRemoteConnectCertificate

This parameter is obsolete.

Aliases

RemoveVMRCCertificate

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SecureRemoteConnectEnabled<Boolean]>

This parameter is obsolete.

Aliases

SecureVMRCEnabled

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SMBiosGuid<Guid]>

Specifies the System Management BIOS globally unique identifier (SMBIOS GUID) for a physical computer that is associated with a record for that physical computer in VMM. SMBIOS defines data structures and access methods that enable a user or application to store and retrieve information about hardware on this computer, such as the name of the system, manufacturer, or the system BIOS version. Windows operating systems retrieve SMBIOS data at system startup and make that data available to programs.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TCPPort<UInt32]>

Specifies a numeric value that represents a TCP port.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UseAnyMigrationSubnet<Boolean]>

Indicates whether any subnet can be used for migration.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMHost<Host>

Specifies a virtual machine host object. VMM supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts.

For more information about each type of host, type Get-Help Add-SCVMHost -detailed.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMHostManagementCredential<VMMCredential>

This parameter is obsolete.

Aliases

PerimeterNetworkHostCredential

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMPaths<String>

Specifies a set of default paths. as strings separated by the pipeline operator, on a host where virtual machine files can be stored. Specify paths in the following format:

C:\Folder01|C:\Folder02|C:\Folder03

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Host

Examples

Example 1: Make a host available for placement

The first command gets the host object named VMHost01, and then stores the object in the $VMHost variable.

The second command makes VMHost01 available as a host for virtual machines. Setting the parameter AvailableForPlacement to $True enables the VMM placement process to evaluate this host as a possible candidate on which to deploy virtual machines.

PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01"
PS C:\> Set-SCVMHost -VMHost $VMHost -AvailableForPlacement $True

Example 2: Enable remote connections on a Hyper-V host

The first command gets the host object named VMHost01, and then stores the object in the $VMHost variable.

The second command enables remote connections on VMHost01 and sets the port used for remote connections to 5900.

Enabling remote connections on a Hyper-V host allows users to remotely access and manage their virtual machines on the host.

PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01"
PS C:\> Set-SCVMHost -VMHost $VMHost -RemoteConnectEnabled $True -RemoteConnectPort 5900

Example Example 3:. Update the virtual machine paths for a host.:

The first command gets the host object named VMHost01, and then stores the object in the $VMHost variable.

The second command updates the VMPaths property for the host stored in $VMHost by adding the path D:\VirtualMachinePath to the list of virtual machine paths on that host.

PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01"
PS C:\> Set-SCVMHost -VMHost $VMHost -VMPaths "C:\ProgramData\Microsoft\Windows\Hyper-V|D:\VirtualMachinePath"

Example 4: Update the resource reserves for a host

The first command gets the host object named VMHost01, and then stores the object in the $VMHost variable.

The second command updates the specified properties for VMHost01.

PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01"
PS C:\> Set-SCVMHost -VMHost $VMHost -CPUPercentageReserve 40 -DiskSpaceReserveMB 2048 -MaxDiskIOReservation 500 -MemoryReserveMB 1024 -NetworkPercentageReserve 40

Example 5: Update the bare-metal computer username and password for a specified physical host

The first command gets the host object named VMHost02, and then stores the object in the $VMHost variable.

The second command gets the Run As account object named BMCCreds, and then stores the object in the $BMCRAA variable.

The third command updates the host stored in $VMHost with the new Run As account stored in $BMCRAA.

The last command refreshes the host stored in $VMHost using its out-of-band interface, which updates the Run As account for the host.

PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost02"
PS C:\> $BMCRAA = Get-SCRunAsAccount -Name "BMCCreds"
PS C:\> Set-SCVMHost $VMHost -BMCRunAsAccount $BMCRAA
PS C:\> Read-SCVMHost -VMHost $VMHost -RefreshOutOfBandProperties

Example 6: Update the certificates for XenServer hosts in a cluster

The first command gets the host object named XenHost01, and then stores the object in the $VMhost variable.

The second gets the certificate object for XenHost01, and then stores the object in the $Cert variable.

The last command uses the certificate supplied in $Cert to enable VMM to communicate with XenHost01 in secure mode.

PS C:\> $VMHost = Get-VMHost -ComputerName "XenHost01"
PS C:\> $Cert = Get-SCCertificate -Computername $VMHost.Name
PS C:\> Set-SCVMHost -VMHost $VMHost -Certificate $Cert -EnableSecureMode $True

Add-SCVMHost

Disable-SCVMHost

Enable-SCVMHost

Get-SCVMHost

Move-SCVMHost

New-SCVMHost

Read-SCVMHost

Register-SCVMHost

Remove-SCVMHost

Repair-SCVMHost

Restart-SCVMHost

Start-SCVMHost

Stop-SCVMHost