0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Hyper-V の仮想スイッチのネットワークアダプタを切り替える

0
Posted at

概要

間違えて Wi-Fi ルータのネットワークアダプタを仮想スイッチに割り当てた。設定時に LAN ケーブルを使用していなかった ( 余ってるものがなかった ) ので。

before

# 外部スイッチに割り当てる物理ネットワークアダプタ
ipconfig
イーサネット アダプター vEthernet (ExternalSwitchWebServer):

   メディアの状態. . . . . . . . . . . .: メディアは接続されていません
   接続固有の DNS サフィックス . . . . .:

この ExternalSwitchWebServer というネットワークインタフェース (仮想NIC ) に Wi-Fi のネットワークアダプタが紐付けられていた。

modify

PowerShell の Set-VMSwitch を使用し、イーサネットのアダプタを割り当てます。

ネットワークアダプタA (Wi-Fi) →B (イーサネット) に割り当てを変更

# ネットワークアダプタ名を確認
Get-NetAdapter -Physical | Select Name, InterfaceDescription
Name         InterfaceDescription
---
イーサネット Intel(R) Ethernet Controller I226-V
Wi-Fi        Realtek 8852BE Wireless LAN WiFi 6 PCI-E NIC

# 外部スイッチ名を確認
Get-VMSwitch | Select Name, SwitchType, NetAdapterInterfaceDescription
Name                    SwitchType NetAdapterInterfaceDescription
---
ExternalSwitchWebServer   External Realtek 8852BE Wireless LAN WiFi 6 PCI-E NIC
Default Switch            Internal

# 外部スイッチにネットワークアダプタを割り当てる
Set-VMSwitch -Name "ExternalSwitchWebServer" -NetAdapterName "イーサネット"

確認

外部スイッチに IPv4 アドレス が無事追加されました。

# 外部スイッチに割り当てる物理ネットワークアダプタ
ipconfig

イーサネット アダプター vEthernet (ExternalSwitchWebServer):

   接続固有の DNS サフィックス . . . . .:
   IPv6 アドレス . . . . . . . . . . . .: 240b:10:bfc2:2f00:b8ff:aa58:62b2:92db
   一時 IPv6 アドレス. . . . . . . . . .: 240b:10:bfc2:2f00:3034:29c1:97f6:e82a
   リンクローカル IPv6 アドレス. . . . .: fe80::f17e:8620:2fe3:818c%28
   IPv4 アドレス . . . . . . . . . . . .: 192.168.11.16
   サブネット マスク . . . . . . . . . .: 255.255.255.0
   デフォルト ゲートウェイ . . . . . . .: fe80::86e8:cbff:fe6c:1fb0%28
                                          192.168.11.1
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?