Skip to content

Commit 53aef5e

Browse files
authored
Merge pull request #153434 from alkohli/vm4
Create a new vswitch
2 parents 82fc33c + af031e2 commit 53aef5e

5 files changed

+150
-4
lines changed

articles/databox-online/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@
261261
href: azure-stack-edge-gpu-manage-virtual-machine-resize-portal.md
262262
- name: Manage VM tags
263263
href: azure-stack-edge-gpu-manage-virtual-machine-tags-powershell.md
264+
- name: Create virtual switch
265+
href: azure-stack-edge-gpu-create-virtual-switch-powershell.md
264266
- name: Manage certificates
265267
items:
266268
- name: Requirements

articles/databox-online/azure-stack-edge-gpu-connect-resource-manager.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ Set the Azure Resource Manager environment and verify that your device to client
357357
358358
An alternative way to log in is to use the `login-AzureRmAccount` cmdlet.
359359
360-
`login-AzureRMAccount -EnvironmentName <Environment Name>` -TenantId c0257de7-538f-415c-993a-1b87a031879d
360+
`login-AzureRMAccount -EnvironmentName <Environment Name> -TenantId c0257de7-538f-415c-993a-1b87a031879d`
361361
362362
Here is a sample output of the command.
363363
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
---
2+
title: Create a new virtual switch in Azure Stack Edge via PowerShell
3+
description: Describes how to create a virtual switch on an Azure Stack Edge device by using PowerShell.
4+
services: databox
5+
author: alkohli
6+
7+
ms.service: databox
8+
ms.subservice: edge
9+
ms.topic: how-to
10+
ms.date: 04/06/2021
11+
ms.author: alkohli
12+
---
13+
14+
# Create a new virtual switch in Azure Stack Edge Pro GPU via PowerShell
15+
16+
[!INCLUDE [applies-to-GPU-and-pro-r-and-mini-r-skus](../../includes/azure-stack-edge-applies-to-gpu-pro-r-mini-r-sku.md)]
17+
18+
This article describes how to create a new virtual switch on your Azure Stack Edge Pro GPU device. For example, you would create a new virtual switch if you want your virtual machines to connect through a different physical network port.
19+
20+
## VM deployment workflow
21+
22+
1. Connect to the PowerShell interface on your device.
23+
2. Query available physical network interfaces.
24+
3. Create a virtual switch.
25+
4. Verify the virtual network and subnet that are automatically created.
26+
27+
## Prerequisites
28+
29+
Before you begin, make sure that:
30+
31+
- You've access to a client machine that can access the PowerShell interface of your device. See [Connect to the PowerShell interface](azure-stack-edge-gpu-connect-powershell-interface.md#connect-to-the-powershell-interface).
32+
33+
The client machine should be running a [Supported OS](azure-stack-edge-gpu-system-requirements.md#supported-os-for-clients-connected-to-device).
34+
35+
- Use the local UI to enable compute on one of the physical network interfaces on your device as per the instructions in [Enable compute network](azure-stack-edge-gpu-deploy-configure-network-compute-web-proxy.md#enable-compute-network) on your device.
36+
37+
38+
## Connect to the PowerShell interface
39+
40+
[Connect to the PowerShell interface of your device](azure-stack-edge-gpu-connect-powershell-interface.md#connect-to-the-powershell-interface).
41+
42+
## Query available network interfaces
43+
44+
1. Use the following command to display a list of physical network interfaces on which you can create a new virtual switch. You will select one of these network interfaces.
45+
46+
```powershell
47+
Get-NetAdapter -Physical
48+
```
49+
Here is an example output:
50+
51+
```powershell
52+
[10.100.10.10]: PS>Get-NetAdapter -Physical
53+
54+
Name InterfaceDescription ifIndex Status MacAddress LinkSpeed
55+
---- -------------------- ------- ------ ---------- -----
56+
Port2 QLogic 2x1GE+2x25GE QL41234HMCU NIC ... 12 Up 34-80-0D-05-26-EA ...ps
57+
Ethernet Remote NDIS Compatible Device 11 Up F4-02-70-CD-41-39 ...ps
58+
Port1 QLogic 2x1GE+2x25GE QL41234HMCU NI...#3 9 Up 34-80-0D-05-26-EB ...ps
59+
Port5 Mellanox ConnectX-4 Lx Ethernet Ad...#2 8 Up 0C-42-A1-C0-E3-99 ...ps
60+
Port3 QLogic 2x1GE+2x25GE QL41234HMCU NI...#4 7 Up 34-80-0D-05-26-E9 ...ps
61+
Port6 Mellanox ConnectX-4 Lx Ethernet Adapter 6 Up 0C-42-A1-C0-E3-98 ...ps
62+
Port4 QLogic 2x1GE+2x25GE QL41234HMCU NI...#2 4 Up 34-80-0D-05-26-E8 ...ps
63+
64+
[10.100.10.10]: PS>
65+
```
66+
2. Choose a network interface that is:
67+
68+
- In the **Up** status.
69+
- Not used by any existing virtual switches. Currently, only one vswitch can be configured per network interface.
70+
71+
To check the existing virtual switch and network interface association, run the `Get-HcsExternalVirtualSwitch` command.
72+
73+
Here is an example output.
74+
75+
```powershell
76+
[10.100.10.10]: PS>Get-HcsExternalVirtualSwitch
77+
78+
Name : vSwitch1
79+
InterfaceAlias : {Port2}
80+
EnableIov : True
81+
MacAddressPools :
82+
IPAddressPools : {}
83+
ConfigurationSource : Dsc
84+
EnabledForCompute : True
85+
SupportsAcceleratedNetworking : False
86+
DbeDhcpHostVnicName : f4a92de8-26ed-4597-a141-cb233c2ba0aa
87+
Type : External
88+
89+
[10.100.10.10]: PS>
90+
```
91+
In this instance, Port 2 is associated with an existing virtual switch and shouldn't be used.
92+
93+
## Create a virtual switch
94+
95+
Use the following cmdlet to create a new virtual switch on your specified network interface. After this operation is complete, your compute instances can use the new virtual network.
96+
97+
```powershell
98+
Add-HcsExternalVirtualSwitch -InterfaceAlias <Network interface name> -WaitForSwitchCreation $true
99+
```
100+
101+
Use the `Get-HcsExternalVirtualSwitch` command to identify the newly created switch. The new switch that is created is named as `vswitch-<InterfaceAlias>`.
102+
103+
Here is an example output:
104+
105+
```powershell
106+
[10.100.10.10]: P> Add-HcsExternalVirtualSwitch -InterfaceAlias Port5 -WaitForSwitchCreation $true
107+
[10.100.10.10]: PS>Get-HcsExternalVirtualSwitch
108+
109+
Name : vSwitch1
110+
InterfaceAlias : {Port2}
111+
EnableIov : True
112+
MacAddressPools :
113+
IPAddressPools : {}
114+
ConfigurationSource : Dsc
115+
EnabledForCompute : True
116+
SupportsAcceleratedNetworking : False
117+
DbeDhcpHostVnicName : f4a92de8-26ed-4597-a141-cb233c2ba0aa
118+
Type : External
119+
120+
Name : vswitch-Port5
121+
InterfaceAlias : {Port5}
122+
EnableIov : True
123+
MacAddressPools :
124+
IPAddressPools :
125+
ConfigurationSource : Dsc
126+
EnabledForCompute : False
127+
SupportsAcceleratedNetworking : False
128+
DbeDhcpHostVnicName : 9b301c40-3daa-49bf-a20b-9f7889820129
129+
Type : External
130+
131+
[10.100.10.10]: PS>
132+
```
133+
134+
## Verify network, subnet
135+
136+
After you have created the new virtual switch, Azure Stack Edge Pro GPU automatically creates a virtual network and subnet that corresponds to it. You can use this virtual network when creating VMs.
137+
138+
<!--To identify the virtual network and subnet associated with the new switch that you created, use the `Get-HcsVirtualNetwork` command. This cmdlet will be released in April some time. -->
139+
140+
## Next steps
141+
142+
- [Deploy VMs on your Azure Stack Edge Pro GPU device via Azure PowerShell](azure-stack-edge-gpu-deploy-virtual-machine-powershell.md)
143+
144+
- [Deploy VMs on your Azure Stack Edge Pro GPU device via the Azure portal](azure-stack-edge-gpu-deploy-virtual-machine-portal.md)

articles/databox-online/azure-stack-edge-gpu-manage-virtual-machine-tags-powershell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Verify that your client can connect to the local Azure Resource Manager.
4040
1. Call local device APIs to authenticate:
4141

4242
```powershell
43-
Login-AzureRMAccount -EnvironmentName <Environment Name>
43+
login-AzureRMAccount -EnvironmentName <Environment Name> -TenantId c0257de7-538f-415c-993a-1b87a031879d
4444
```
4545
4646
1. Provide the username `EdgeArmUser` and the password to connect via Azure Resource Manager. If you do not recall the password, [Reset the password for Azure Resource Manager](azure-stack-edge-gpu-set-azure-resource-manager-password.md) and use this password to sign in.

includes/azure-stack-edge-gateway-deploy-virtual-machine-prerequisites.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Make sure that you can use the following steps to access the device from your cl
1818
1919
1. To call the local device APIs to authenticate, enter:
2020
21-
`login-AzureRMAccount -EnvironmentName <Environment Name>`
21+
`login-AzureRMAccount -EnvironmentName <Environment Name> -TenantId c0257de7-538f-415c-993a-1b87a031879d`
2222
23-
To connect via Azure Resource Manager, provide the username *EdgeARMuser* and your password.
23+
To connect via Azure Resource Manager, provide the username *EdgeArmUser* and your password.
2424
2525
1. If you configured compute for Kubernetes, you can skip this step. Otherwise, ensure that you've enabled a network interface for compute by doing the following:
2626

0 commit comments

Comments
 (0)