{"id":303,"date":"2024-01-03T14:04:13","date_gmt":"2024-01-03T14:04:13","guid":{"rendered":"https:\/\/thinkdebian.net\/blog\/?p=303"},"modified":"2024-10-16T10:56:24","modified_gmt":"2024-10-16T10:56:24","slug":"enable-serial-terminal-for-proxmox-linux-guest-vms","status":"publish","type":"post","link":"https:\/\/thinkdebian.net\/blog\/enable-serial-terminal-for-proxmox-linux-guest-vms\/","title":{"rendered":"Enable serial terminal for Proxmox Linux guest VMs"},"content":{"rendered":"\n<p><br><strong>Configuration on the host<br><\/strong><br>Add a virtual serial port to the VM:<br><br>qm set -serial0 socket<br><br>or<\/p>\n\n\n\n<p>echo &#8220;serial0: socket&#8221; &gt;&gt; \/etc\/pve\/qemu-server\/.conf<br><br><strong>Configuration on the guest<\/strong><br><br>Enable and start serial console on the guest VM:<br><br>systemctl enable serial-getty@ttyS0.service<br>systemctl start serial-getty@ttyS0.service<br><br>Instruct grub2 to send the boot messages on the serial port by editing \/etc\/default\/grub and adding:<br><br>GRUB_CMDLINE_LINUX=&#8221;quiet console=tty0 console=ttyS0,115200&#8243;<br><br>For the change to take effect, run: update-grub<br><br><strong>Connecting to the Serial Terminal<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>qm terminal &lt;VMID&gt;<br>and press enter a second time to get the prompt.<\/p>\n\n\n\n<p><strong>NOTE<\/strong>: if it seems this is not working, and if you have defined ttyS1, you can connect to it with the command:<\/p>\n\n\n\n<p>qm terminal -iface serial1<\/p>\n\n\n\n<p>Source:<br><a href=\"https:\/\/zain.mu\/proxmox\/serial-terminal\/\" data-type=\"URL\" data-id=\"https:\/\/zain.mu\/proxmox\/serial-terminal\/\">https:\/\/zain.mu\/proxmox\/serial-terminal\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Configuration on the hostAdd a virtual serial port to the VM: qm set -serial0 socket or echo &#8220;serial0: socket&#8221; &gt;&gt; \/etc\/pve\/qemu-server\/.conf Configuration on the guest Enable and start serial console on the guest VM: systemctl enable serial-getty@ttyS0.servicesystemctl start serial-getty@ttyS0.service Instruct grub2 to send the boot messages on the serial port by editing \/etc\/default\/grub and adding: &#8230; <a title=\"Enable serial terminal for Proxmox Linux guest VMs\" class=\"read-more\" href=\"https:\/\/thinkdebian.net\/blog\/enable-serial-terminal-for-proxmox-linux-guest-vms\/\" aria-label=\"More on Enable serial terminal for Proxmox Linux guest VMs\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,4,39],"tags":[12,23,13,40],"_links":{"self":[{"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/posts\/303"}],"collection":[{"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/comments?post=303"}],"version-history":[{"count":4,"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/posts\/303\/revisions"}],"predecessor-version":[{"id":307,"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/posts\/303\/revisions\/307"}],"wp:attachment":[{"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/media?parent=303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/categories?post=303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thinkdebian.net\/blog\/wp-json\/wp\/v2\/tags?post=303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}