使用Azure 入口網站來管理 Azure Stack Edge Pro GPU 上 VM 上的網路介面

適用于: Yes for Pro GPU SKU Azure Stack Edge Pro - GPU Yes for Pro 2 SKU Azure Stack Edge Pro 2 Yes for Pro R SKU Azure Stack Edge Pro R Yes for Mini R SKU Azure Stack Edge Mini R

您可以使用 Azure 入口網站、範本、Azure PowerShell Cmdlet,以及透過 Azure CLI/Python 腳本,在 Azure Stack Edge 裝置上建立和管理虛擬機器(VM)。 本文說明如何使用 Azure 入口網站 來管理在 Azure Stack Edge 裝置上執行的 VM 上的網路介面。

當您建立 VM 時,您會指定要建立的一個虛擬網路介面。 建立虛擬機器之後,您可能會想要將一或多個網路介面新增至虛擬機器。 您也可以變更現有網路介面的預設網路介面設定。

本文說明如何將網路介面新增至現有的 VM、變更現有設定,例如 IP 類型(靜態與動態),以及中斷連結或刪除現有的介面。

關於 VM 上的網路介面

網路介面可讓在 Azure Stack Edge Pro 裝置上執行的虛擬機器(VM)與 Azure 和內部部署資源通訊。

您可以使用本機 UI 建立一或多個虛擬交換器。 建立虛擬交換器之後,Azure Stack Edge 會為其建立預設網路。 VM 可以透過虛擬交換器連結至預設網路。 預設網路名稱與虛擬交換器名稱相同。

建立虛擬網路是選擇性的。 只有當您的網路位於不同的 VLAN 網路,或具有不同的非預設位址空間和閘道時,您才必須建立虛擬網路。

多個網路介面可以與一個虛擬交換器相關聯。 VM 上的每個網路介面都有指派靜態或動態 IP 位址。 將 IP 位址指派給 VM 上的多個網路介面時,您的 VM 上會啟用特定功能。 例如,您的 VM 可以在單一伺服器上裝載具有不同 IP 位址和 SSL 憑證的多個網站或服務。

裝置上的 VM 可以做為網路虛擬裝置,例如防火牆或負載平衡器。 如需在虛擬交換器上新增虛擬區域網路絡 (LAN) 組態的詳細資訊,請參閱 建立虛擬 LAN

必要條件

在您透過Azure 入口網站開始管理裝置上的 VM 之前,請確定:

  1. 您可以存取已啟用的 Azure Stack Edge Pro GPU 裝置。 您已在裝置上啟用用於計算的網路介面。 此動作會在 VM 上的網路介面上建立虛擬交換器。

    1. 在裝置的本機 UI 中,移至 [計算 ]。 選取您將用來建立虛擬交換器的網路介面。

    2. 在網路介面上啟用計算。 Azure Stack Edge Pro GPU 會建立和管理對應至該網路介面的虛擬交換器。

  2. 您至少有一部 VM 部署在裝置上。 若要建立此 VM,請參閱透過 Azure 入口網站 在 Azure Stack Edge Pro 上部署 VM 中的 指示。

  3. 您的 VM 應處於 [ 已停止] 狀態。 若要停止 VM,請移至 [虛擬機器 ],然後選取您想要停止的 VM。 在 [VM 詳細資料] 頁面中,選取 [ 停止 ],然後在系統提示您確認時選取 [ ]。 在您新增、編輯或刪除網路介面之前,必須先停止 VM。

    Screenshot showing the confirmation prompt to stop a virtual machine in Azure Stack Edge.

新增網路介面

請遵循下列步驟,將網路介面新增至部署在裝置上的虛擬機器。

  1. 移至您已停止的虛擬機器,然後選取 [ 網路]。

    Screenshot showing the Details tab for a virtual machine. The Networking label, which opens the Networking blade for the VM, is highlighted.

  2. 在 [ 網路] 刀鋒視窗中,從命令列選取 [+ 新增網路介面 ]。

    Screenshot showing the Networking blade for a virtual machine. The Plus Add Network Interface button is highlighted.

  3. 在 [ 新增網路介面] 刀鋒視窗中,輸入下列參數:

    欄位 描述:
    Name 邊緣資源群組內的唯一名稱。 建立網路介面之後,就無法變更名稱。 若要輕鬆地管理多個網路介面,請使用命名慣例 提供的建議。
    選取邊緣資源群組 選取要新增網路介面的邊緣資源群組。
    虛擬網路 當您在網路介面上啟用計算時,與您裝置上建立的虛擬交換器相關聯的虛擬網路。
    子網路 所選虛擬網路內的子網。 此欄位會自動填入與您啟用計算之網路介面相關聯的子網。
    IP 位址指派 網路介面的靜態或動態 IP。 靜態 IP 應該是來自指定子網範圍的可用免費 IP。 如果環境中有 DHCP 伺服器,請選擇動態。

    Screenshot showing the Add network interface blade for a virtual machine. The Add button is highlighted.

  4. 您會看到網路介面建立正在進行中的通知。

    Screenshot showing the notification that a network interface is being created.

  5. 成功建立網路介面之後,網路介面清單會重新整理以顯示新建立的介面。

    Screenshot of the Networking blade for a virtual machine. The entry for a newly created virtual machine is highlighted.

編輯網路介面

請遵循下列步驟來編輯與您裝置上部署之虛擬機器相關聯的網路介面。

  1. 移至您已停止的虛擬機器,然後選取 [虛擬機器 詳細 資料] 中的 [網路 ]。

  2. 在網路介面清單中,選取您想要編輯的介面。 在選取的網路介面最右邊,選取編輯圖示(鉛筆)。

    Screenshot showing the Networking blade for a virtual machine. The name of a network interface, and the pencil icon for the entry, are highlighted.

  3. 在 [ 編輯網路介面] 刀鋒視窗中,您只能變更網路介面的 IP 指派。 建立網路介面之後,就無法變更與網路介面相關聯的名稱、邊緣資源群組、虛擬網路和子網。 將 IP 指派 變更為靜態,並儲存變更。

    Screenshot of the Edit network interface blade for a virtual machine. The IP address assignment area and the Save button are highlighted.

  4. 網路介面清單會重新整理以顯示更新的網路介面。

將網路介面中斷連結

請遵循下列步驟來中斷連結或移除與裝置上部署之虛擬機器相關聯的網路介面。

  1. 移至您已停止的虛擬機器,然後選取 [虛擬機器 詳細 資料] 中的 [網路 ]。

  2. 在網路介面清單中,選取您想要編輯的介面。 在選取的網路介面最右邊,選取卸離圖示(拔除)。

    Screenshot of the Networking blade for a virtual machine. The name of a network interface, and the detach icon for it are highlighted.

  3. 您會看到一則訊息,要求您確認您想要中斷連結網路介面。 選取

    Screenshot showing the notification to confirm you want to detach a network interface from a virtual machine.

    在介面完全中斷連結之後,會重新整理網路介面清單以顯示其餘介面。

刪除網路介面

請遵循下列步驟來刪除未連結至虛擬機器的網路介面。

  1. 移至 [虛擬機器 ],然後移至 [ 資源] 頁面。 選取 [網路功能]。

    Screenshot that shows the Networking tab on the Resources page for virtual machines. The labels for the Resources pane and the Networking tab are highlighted.

  2. 在 [ 網路] 刀鋒視窗上,選取您要刪除之網路介面的刪除圖示(垃圾桶)。 刪除圖示只會針對未連結至 VM 的網路介面顯示。

    Screenshot showing the Networking blade in virtual machine resources. The delete icon for an unattached network interface is highlighted.

  3. 您會看到一則訊息,要求您確認要刪除網路介面。 無法反轉作業。 選取

    Screenshot of the notification asking you to confirm you want to delete a selected network interface.

    刪除網路介面完成之後,會將網路介面從清單中移除。

下一步

若要瞭解如何在 Azure Stack Edge Pro 裝置上部署虛擬機器,請參閱 透過Azure 入口網站 部署虛擬機器。