The Linux kernel has been upgraded to version 7 and now uses Rust extensively, delivering major performance improvements. So I'm setting up the latest Arch Linux virtual machine on Hyper-V to give it a try.

Installing Arch Linux

I chose the official Arch Linux rolling-release image archlinux-x86_64.iso, which is about 1.5GB. I went with a minimal installation, which is well suited as a high-performance development server.

Key points when creating the Hyper-V VM

  • Generation: Select Generation 2 (Gen 2)
  • Secure Boot: Make sure to uncheck "Enable Secure Boot" in the VM settings, otherwise it won't boot
  • Network: Use the default network first, then switch to an internal network later

After starting the VM, you'll enter the command-line Live environment. The official installer script is recommended:

archinstall

Key options to choose:

OptionRecommended value
MirrorUsers in China should pick the Tsinghua / USTC mirror under China to speed up downloads
Disk partitioningChoose Best-effort default partition layout
File systemext4 (stable) or btrfs (supports snapshots); ext4 is preferred for VMs
UsersSet a password for the root user, then add a regular user and make it a sudo user
ProfileChoose Minimal (headless, high performance)
Network configurationKeep the default NetworkManager

After installation completes, remove the ISO image and reboot into the new system.


Installing SSH

Once in Arch, install and start SSH:

sudo pacman -S openssh
sudo systemctl enable sshd --now

Check the IP address:

ip a

Then connect from a Windows terminal:

ssh username@IP_ADDRESS

You should be able to connect normally at this point. However, if you're using the default Hyper-V network, the VM's IP may change after a reboot, so it's recommended to configure a static IP.


Creating a Hyper-V Internal Network

Open:

Hyper-V Manager
→ Virtual Switch Manager
→ New Virtual Switch
→ Internal

For example, name it:

VM-Internal

After creation, you also need to go into the VM settings and switch the network adapter to this new virtual switch.

Note: Switching the network will immediately drop the existing SSH connection, so it's recommended to finish the Windows-side network configuration first, then switch the VM's network.


Configuring Windows NAT

Open PowerShell as Administrator:

Configure the gateway address for the virtual network adapter created by Hyper-V:

New-NetIPAddress `
  -IPAddress 192.168.100.1 `
  -PrefixLength 24 `
  -InterfaceAlias "vEthernet (VM-Internal)"

Create the NAT:

New-NetNat `
  -Name "VM-NAT" `
  -InternalIPInterfaceAddressPrefix "192.168.100.0/24"

Configuring a Static IP on Arch Linux

Arch Linux uses systemd-networkd to manage networking, and configuration files live in /etc/systemd/network/.

1. Check the network interface name

ip a

Common names: eth0, ens160, enp0s3

2. Inspect and clean up existing configuration

ls /etc/systemd/network/

If a DHCP config file exists (e.g. 10-eth0.network), delete or back it up first to avoid conflicts with the static config (systemd loads files in filename order and matches the first one):

sudo mv /etc/systemd/network/10-eth0.network /etc/systemd/network/10-eth0.network.bak

3. Create the static IP config file

sudo vim /etc/systemd/network/20-wired.network

Write the following content (adjust the IP according to your setup):

[Match]
Name=eth0

[Network]
Address=192.168.100.10/24
Gateway=192.168.100.1
DNS=1.1.1.1
DNS=8.8.8.8

Important:

  • Name must match the interface name exactly
  • Use the /24 format for the subnet mask, not 255.255.255.0
  • Do not add any # comments or non-ASCII characters, otherwise systemd-networkd may fail to parse the file

4. Enable and restart the network service

sudo systemctl enable systemd-networkd --now
sudo systemctl enable systemd-resolved --now
sudo systemctl restart systemd-networkd

5. Confirm the IP

ip a

It should now show inet 192.168.100.10/24.

6. Test the network

ping 1.1.1.1
ping google.com

If you can reach the internet normally, the NAT and DNS configuration are working.

From now on you can connect using the fixed address:

ssh username@192.168.100.10

without worrying about the IP changing.


Configuring Passwordless Login

  • Generate an SSH key pair on Windows (skip this if you've already generated one before):
ssh-keygen -t rsa -b 4096
  • Copy the public key to Arch Linux:
cat ~/.ssh/id_rsa.pub | ssh username@192.168.100.10 "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"

Bonus: Installing Basic Tools

A minimal system lacks some common tools, so it's recommended to install them:

sudo pacman -S git less vim fish
  • git: version control
  • less: Git pager (otherwise git log will error out)
  • vim or nano: text editor
  • fish: a friendly interactive shell (optional)

FAQ

ProblemSolution
Still boots into the installer after rebootRemove the ISO image from the VM
Doesn't boot into the system after rebootMove the disk to the first position in the boot order
Static IP not taking effectCheck for conflicting .network files (e.g. files prefixed with 10- have higher priority); remove the conflicting file and restart systemd-networkd
git log errors with cannot run lessInstall less: sudo pacman -S less
No network but ip a shows an IPCheck the DNS configuration and make sure systemd-resolved is enabled