Set-SCStorageVolume
Set-SCStorageVolume
Modifies the setting for a volume on a host that enables VMM to evaluate that volume as available storage during the virtual machine placement process.
構文
Parameter Set: Default
Set-SCStorageVolume [-StorageVolume] <StorageVolume> -AvailableForPlacement <Boolean> [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [ <CommonParameters>]
詳細説明
The Set-SCStorageVolume cmdlet modifies the setting that determines whether Virtual Machine Manager (VMM) will evaluate a specific volume on a host server as available storage during the virtual machine placement process.
During the placement process, VMM evaluates managed hosts, including the volumes on those managed hosts, when calculating a recommendation for the best location on which to deploy a virtual machine. If you specify that a volume on the host will not be included when VMM performs its automatic placement calculation, you can still choose to manually deploy a virtual machine on that volume.
パラメーター
-AvailableForPlacement<Boolean>
Indicates whether the VMM placement process will consider 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 will not consider the logical networks configured on this network adapter to determine if the host is suitable for connecting a virtual machine.
エイリアス |
none |
必須? |
true |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-JobVariable<String>
Specifies that job progress is tracked and stored in the variable named by this parameter.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-PROTipID<Guid]>
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-StorageVolume<StorageVolume>
Specifies a storage volume object on a specific virtual machine host.
エイリアス |
VMHostVolume |
必須? |
true |
位置は? |
1 |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
- StorageVolume
例
Example Example 1: Make a volume on 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 gets the storage volume object for the host stored in $VMHost, and then stores the object in the $StorageVol variable. This example assumes that VMHost01 has only one volume.
The last command makes the first volume object on VMHost01 available for placement. Setting the parameter AvailableForPlacement to $True enables the VMM placement process to evaluate this volume on VMHost01 as a possible candidate to host virtual machines.
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01.Contoso.com"
PS C:\> $StorageVol = Get-SCStorageVolume -VMHost $VMHost
PS C:\> Set-SCStorageVolume -StorageVolume $StorageVol[0] -AvailableForPlacement $True
Example 2: Make a second volume on a host available for placement
The first command gets the host object named VMHost02, and then stores the object in the $VMHost variable.
The second command gets all storage volume objects VMHost02, and then stores the objects in the object array named $StorageVols. This example assumes that VMHost02 has at least two volumes.
The last command makes the second volume stored in the $StorageVols array available for placement.
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost02.Contoso.com"
PS C:\> $StorageVols = Get-SCStorageVolume -VMHost $VMHost
PS C:\> Set-SCStorageVolume -StorageVolume $StorageVols[1] -AvailableForPlacement $True