[SOLVED] How to configure serial / terminal to connect to a VM guest from the PVE host?

Discussion in 'Proxmox VE: Installation and configuration' started by fibo_fr, Jul 10, 2018.

  1. fibo_fr

    fibo_fr Member

    Joined:
    Apr 21, 2014
    Messages:
    40
    Likes Received:
    2
    I still have problem to configure networks for my guests VMs: the console (from web) has lots of limtations.

    So I was hoping I could connect from the host to the guest VM by a simple qm terminal xxx, but I all get is the prompt:
    starting serial terminal on interface serial0 (press control-O to exit)
    but then nothing happens whatever I type... until I type control-O to en the connection

    On the guest machine, I have enabled (thru the web admin console) the serial ports 0 and 1 (and rebooted of course)
    what else should I do on the guest VM?
     
  2. Alexander Pytlev

    Joined:
    Apr 14, 2016
    Messages:
    48
    Likes Received:
    7
    You must configure operation system in guest VM to use serial console.

    P.S. What limitations in web console block you to configure networks in guests VMs?
     
  3. LnxBil

    LnxBil Well-Known Member

    Joined:
    Feb 21, 2015
    Messages:
    3,936
    Likes Received:
    364
    Hopefully you meant restarted, because reboots are for windoze

    Whatever this means ... have you read this?
    https://pve.proxmox.com/wiki/Serial_Terminal

    It normally works like charm. I used it several times.
     
  4. fibo_fr

    fibo_fr Member

    Joined:
    Apr 21, 2014
    Messages:
    40
    Likes Received:
    2
    1 - B-) I happen to use frequently the Linux reboot command.

    2 - Currently I have a mix of 4.4 and 5.1 hosts. because some prod VMs and CTs are waiting a favorable time. Consequently some hosts have only VNC for shell access with WebUI. VNC without copy paste is a nightmare with my French keyboard.

    3 - So usually I work with VMs in ssh only.
    BUT that implies that the network is configured... which cannot be done with ssh
    So I'm looking for a connection interface other than ssh and WebUI shell

    4 - for some reason, I'm currently replicating one existing VM. Duplication is done by qmrestore to a different VMID
    After the duplication I have to set up the network.

    5 - I was hoping / investigating if QM TERMINAL from the host would give me command-line access.
    BUT I am still unsuccessful, hence my question.

    NB: the legacy WM I am replicating happens to be Ubuntu desktop. With (grr) network manager. I will change that to Ubuntu server as soon as I can securely have additional machines for test and standby backups.
    So for now Ubuntu desktop (14.04) is a given, not a changeable item
     
  5. LnxBil

    LnxBil Well-Known Member

    Joined:
    Feb 21, 2015
    Messages:
    3,936
    Likes Received:
    364
    So, you have not read the Wiki article then (at least you haven't answered my question)?

    Ubuntu is Debian based and is able to use a serial console since .. hmm 3 or 4 decades. I myself installed Debian once on a 486 laptop without a network card via serial connection back in the late 90s :p

    So, maybe just go along with this:
    https://help.ubuntu.com/community/SerialConsoleHowto
     
  6. fibo_fr

    fibo_fr Member

    Joined:
    Apr 21, 2014
    Messages:
    40
    Likes Received:
    2
    Hi,
    Thx for your answer help, even if you were in a somewhat sarcastic mood...

    Not sure I understood the pun about restart / reboot. No problem.

    Before even posting the question, I had done my homework and had read the wiki article. however it is in fact useless if the ttyS do not exist yet

    I was thinking this was a proxmox problem, so did not explore the ubuntu side.
    The Ubuntu link you provide does in fact solve the problem (creating ttyS0.conf, etc): MERCI
     
    #6 fibo_fr, Jul 13, 2018
    Last edited: Jul 13, 2018
  7. fibo_fr

    fibo_fr Member

    Joined:
    Apr 21, 2014
    Messages:
    40
    Likes Received:
    2
    I updated the Proxmox wiki page with the Ubuntu info, so that all the information is there.
    My update might need some changes to be coherent with the grub part of the wiki page
     
  8. Adam Smith

    Adam Smith New Member

    Joined:
    Feb 1, 2018
    Messages:
    10
    Likes Received:
    0
    I was working on this with an Ubuntu 18.04 guest and found this thread. What I discovered is neither the Proxmox Serial Terminal setup nor the Ubuntu Serial Console instructions were sufficient. It seems that both assume init instead of systemd, the latter of which, I understand, Ubuntu adopted several releases ago. These instructions from a generous poster helped me configure the serial console on Ubuntu 18.04. I hope it helps someone else.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice