schtritoff / hyperv-vm-provisioning

Quick provisioning of Linux VM using Hyper-V on Windows
76 stars 28 forks source link

Serial console - Named pipe #4

Closed AvrumFeldman closed 1 year ago

AvrumFeldman commented 1 year ago

Hi,

During my quest to streamline our Linux machine setups I came across your amazing script and love it!

Are you able to get the serial console output to a named pipe? I tried and it just doesn't work, and based on the documentation from Microsoft here it seems the named pipe must already exist in order for HyperV to be able to use it, which adds up as I checked use pipelist and I didn't see the named pipe used.

Regards,

schtritoff commented 1 year ago

Did you try with ShowSerialConsoleWindow switch? Try to see if there is a named pipe with the same name before creating VM, for example withpipelist.

AvrumFeldman commented 1 year ago

Confirmed there is no named pipe with the same name.

I honestly didn't use your script, I tried it manually on a VM I created manually. (PowerShell window was elevated).

AvrumFeldman commented 1 year ago

Nevermind, I now tested with a new VM and the pipe was created and putty was able to connect, albeit with no output showing up on terminal.

I don't know what I did different this time, my only guess is that it's possible the previous VM creation wasn't done using elevated console so adding afterwards the named pipe even from an elevated session doesn't work.

Will do some testing.

AvrumFeldman commented 1 year ago

Update: Seems that the ISO installer doesn't output to ttyS0 while the cloud images do. (This doesn't answer why the named pipe wasn't working yesterday, but it's working now so screw it 😀).