Skip to main content

How to Connect to Ubuntu in Hyper-V via Serial Console

· 2 min read
ひかり
Main bloger

VM Settings

Select "Named pipe" and set the pipe name to "COM1".

Hyper-V Serial Settings

Ubuntu Settings

GRUB Settings

Open the GRUB configuration file with sudo nano /etc/default/grub.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash console=ttyS0,115200n8"

After saving, apply the GRUB settings with:

sudo update-grub

Enable Serial Port

Configure the service to allow login via the serial port.

sudo systemctl enable [email protected]
sudo systemctl start [email protected]

Connection

Launch as administrator.

Connect from Tera Term

Connect Serial port of Ubuntu on Hyper-V from Tera Term

Connect from PuTTY

Launch as administrator.

Serial lineSpeedConnection type:
\.\pipe\COM1115200Serial

Set the above.

Connect Serial port of Ubuntu on Hyper-V from PuTTy

Connect Serial port of Ubuntu on Hyper-V from PuTTy

Launch as administrator.

Connect Serial port of Ubuntu on Hyper-V from plink.exe on WindowsTerminal

[System.Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("utf-8")
[System.Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("utf-8")
plink.exe -serial \\.\pipe\COM1 -sercfg 115200,8,n,1,N

Exit with Ctrl + C.