New-SCVMNetwork
创建虚拟机网络。
语法
New-SCVMNetwork
[-UserRole <UserRole>]
[-VMMServer <ServerConnection>]
[-Name] <String>
[[-Description] <String>]
-LogicalNetwork <LogicalNetwork>
[-RoutingDomainId <Guid>]
[-PAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-CAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-Owner <String>]
[-PortACL <PortACL>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVMNetwork
[-UserRole <UserRole>]
[-VMMServer <ServerConnection>]
[-Name] <String>
[[-Description] <String>]
-LogicalNetwork <LogicalNetwork>
[-RoutingDomainId <Guid>]
-IsolationType <VMNetworkType>
[-PAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-CAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-Owner <String>]
[-PortACL <PortACL>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVMNetwork
[-UserRole <UserRole>]
[-VMMServer <ServerConnection>]
[-Name] <String>
[[-Description] <String>]
-LogicalNetwork <LogicalNetwork>
[-RoutingDomainId <Guid>]
[-PAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-CAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-AutoCreateSubnet]
[-Owner <String>]
[-NetworkManager <VirtualSwitchExtensionManager>]
[-PortACL <PortACL>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVMNetwork
[-UserRole <UserRole>]
[-VMMServer <ServerConnection>]
[-Name] <String>
[[-Description] <String>]
-LogicalNetwork <LogicalNetwork>
[-RoutingDomainId <Guid>]
[-PAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-CAIPAddressPoolType <VMNetworkIPAddressPoolType>]
-ExternalName <String>
[-Owner <String>]
[-PortACL <PortACL>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVMNetwork
[-UserRole <UserRole>]
[-VMMServer <ServerConnection>]
[-Name] <String>
[[-Description] <String>]
-LogicalNetwork <LogicalNetwork>
[-RoutingDomainId <Guid>]
[-PAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-CAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-ExternalVMNetwork]
[-Owner <String>]
[-NetworkManager <VirtualSwitchExtensionManager>]
[-PortACL <PortACL>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
说明
New-SCVMNetwork cmdlet 创建虚拟机网络。 虚拟机网络支持多种隔离方法:无隔离、网络虚拟化、外部和 VLAN。 VM 网络使用的隔离类型取决于指定的逻辑网络。 Virtual Machine Manager (VMM) 使用与虚拟机网络关联的 IP 地址池将客户地址分配给虚拟机。
客户地址对虚拟机可见,由客户用来与虚拟机通信。
创建虚拟机网络时,必须提供逻辑网络对象。 若要获取逻辑网络对象,请使用 Get-SCLogicalNetwork cmdlet。
示例
示例 1:创建虚拟机网络
PS C:\> $LogNet = Get-SCLogicalNetwork -Name "LogicalNetwork01"
PS C:\> New-SCVMNetwork -Name "VMNetwork01" -LogicalNetwork $LogNet
第一个命令获取名为 LogicalNetwork01 的逻辑网络对象,并将对象存储在$LogNet变量中。
第二个命令使用逻辑网络 LogicalNetwork01 创建名为 VMNetwork01 的 VM 网络。
参数
-AutoCreateSubnet
指示自动创建子网。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CAIPAddressPoolType
指定地址池类型。 有效值为:IPV4、IPV6。
Type: | VMNetworkIPAddressPoolType |
Accepted values: | IPV4, IPV6 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
指定虚拟机网络的说明。
Type: | String |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ExternalName
指定对象的外部名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ExternalVMNetwork
指示虚拟机网络是外部的。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IsolationType
指定虚拟机网络的隔离类型。 此参数的可接受值为:
- NoIsolation
- WindowsNetworkVirtualization
- 外部
- VLANNetwork
Type: | VMNetworkType |
Accepted values: | NoIsolation, WindowsNetworkVirtualization, External, VLANNetwork |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
指定跟踪作业进度,并将其存储在此参数命名的变量中。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LogicalNetwork
指定逻辑网络。 逻辑网络是 IP 子网和 VLAN 的命名分组,用于组织和简化网络分配。
Type: | LogicalNetwork |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
指定 VMM 对象的名称。
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NetworkManager
指定虚拟交换机扩展管理器。
Type: | VirtualSwitchExtensionManager |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-OnBehalfOfUser
指定用户名。 此 cmdlet 代表此参数指定的用户操作。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUserRole
指定用户角色。 若要获取用户角色,请使用 Get-SCUserRole cmdlet。 此 cmdlet 代表此参数指定的用户角色进行操作。
Type: | UserRole |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Owner
以一个有效的域用户帐户形式指定 VMM 对象的所有者。
- 示例格式:
-Owner "Contoso\PattiFuller"
- 示例格式:
-Owner "PattiFuller@Contoso"
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PAIPAddressPoolType
指定地址池类型。 有效值为:IPV4、IPV6。
Type: | VMNetworkIPAddressPoolType |
Accepted values: | IPV4, IPV6 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PortACL
指定端口 ACL 对象。
Type: | PortACL |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
指定触发此操作 (PRO 提示) 的性能和资源优化提示的 ID。 此参数允许审核 PRO 提示。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RoutingDomainId
以 GUID 的形式指定路由域的 ID。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
指示作业以异步方式运行,以便控件立即返回到命令 shell。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UserRole
指定一个用户角色对象。
Type: | UserRole |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
指定VMM 服务器对象。
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |