Skip to content

Instantly share code, notes, and snippets.

View ioperations's full-sized avatar
🎯
Focusing

ioperations ioperations

🎯
Focusing
  • guangzhou
  • 16:39 (UTC +08:00)
View GitHub Profile
@mzaglia
mzaglia / hyper-v-static-ip.md
Last active May 11, 2025 01:59
Static IP Hyper-V Ubuntu VM

First in a powershell create a new network switch

New-VMSwitch -SwitchName "SwitchName" -SwitchType Internal
Get-NetAdapter       // (note down ifIndex of the newly created switch as INDEX)
New-NetIPAddress -IPAddress 192.168.0.1 -PrefixLength 24 -InterfaceIndex <INDEX>
New-NetNat -Name MyNATnetwork -InternalIPInterfaceAddressPrefix 192.168.0.0/24

In your ubuntu server open your network netplan