{"id":165,"date":"2023-12-12T19:40:00","date_gmt":"2023-12-12T18:40:00","guid":{"rendered":"https:\/\/blubb.fish\/?p=165"},"modified":"2023-12-12T06:58:11","modified_gmt":"2023-12-12T05:58:11","slug":"set-up-virtual-serial-console-proxmox-gentoo-with-systemd","status":"publish","type":"post","link":"https:\/\/blubb.fish\/index.php\/2023\/12\/12\/set-up-virtual-serial-console-proxmox-gentoo-with-systemd\/","title":{"rendered":"set up virtual serial console proxmox &#8211; fedora \/ gentoo with systemd"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">enable serial console on vm in proxmox<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">tested with<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Gentoo with systemd<\/li>\n\n\n\n<li>Fedora Server<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">shell:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>qm set 115 -serial0 socket<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">GUI:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"834\" height=\"384\" src=\"https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6367.png\" alt=\"\" class=\"wp-image-200\" style=\"width:350px;height:auto\" srcset=\"https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6367.png 834w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6367-300x138.png 300w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6367-768x354.png 768w\" sizes=\"auto, (max-width: 834px) 100vw, 834px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"171\" height=\"312\" src=\"https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6368.png\" alt=\"\" class=\"wp-image-201\" srcset=\"https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6368.png 171w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6368-164x300.png 164w\" sizes=\"auto, (max-width: 171px) 100vw, 171px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"323\" height=\"130\" src=\"https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6369.png\" alt=\"\" class=\"wp-image-202\" srcset=\"https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6369.png 323w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6369-300x121.png 300w\" sizes=\"auto, (max-width: 323px) 100vw, 323px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"904\" height=\"359\" src=\"https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6370.png\" alt=\"\" class=\"wp-image-203\" srcset=\"https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6370.png 904w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6370-300x119.png 300w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6370-768x305.png 768w\" sizes=\"auto, (max-width: 904px) 100vw, 904px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><br>after this the vm should have a serial adapter. Maybe a reboot \/ full shutdown is needed that it is no longer yellow and correct attached<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">after reboot check which ttyS* the virtual machine uses (normally the id chosen in proxmox settings)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dmesg | grep tty<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">this will show something like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"244\" src=\"https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6361-1024x244.jpeg\" alt=\"\" class=\"wp-image-170\" srcset=\"https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6361-1024x244.jpeg 1024w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6361-300x72.jpeg 300w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6361-768x183.jpeg 768w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6361.jpeg 1170w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">so we know we need to use ttyS0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">edit the serial service unit file with the baud rate needed for console<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim \/usr\/lib\/systemd\/system\/serial-getty\\@.service <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">change the ExecStart line to the correct rate. Often 115200<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"287\" src=\"https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6360-1024x287.jpeg\" alt=\"\" class=\"wp-image-172\" srcset=\"https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6360-1024x287.jpeg 1024w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6360-300x84.jpeg 300w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6360-768x215.jpeg 768w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6360.jpeg 1170w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Enable the service. Be sure to add the correct ttyS* (does not exist before)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable serial-getty@ttyS0<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">start the service<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl start serial-getty@ttyS0<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">check status as running<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status serial-getty@ttyS0<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"526\" src=\"https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6362-1024x526.jpeg\" alt=\"\" class=\"wp-image-175\" srcset=\"https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6362-1024x526.jpeg 1024w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6362-300x154.jpeg 300w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6362-768x395.jpeg 768w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6362.jpeg 1170w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">now you should be able to connect to the serial port with apps or tools like proxmobo<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"927\" src=\"https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6363-1024x927.jpeg\" alt=\"\" class=\"wp-image-177\" srcset=\"https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6363-1024x927.jpeg 1024w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6363-300x272.jpeg 300w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6363-768x695.jpeg 768w, https:\/\/blubb.fish\/wp-content\/uploads\/2023\/12\/IMG_6363.jpeg 1170w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>enable serial console on vm in proxmox tested with shell: GUI: after this the vm should have a serial adapter. Maybe a reboot \/ full shutdown is needed that it is no longer yellow and correct attached after reboot check which ttyS* the virtual machine uses (normally the id chosen in proxmox settings) this will [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[7],"class_list":["post-165","post","type-post","status-publish","format-standard","hentry","category-linux","tag-linux"],"_links":{"self":[{"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/posts\/165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/comments?post=165"}],"version-history":[{"count":11,"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/posts\/165\/revisions"}],"predecessor-version":[{"id":208,"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/posts\/165\/revisions\/208"}],"wp:attachment":[{"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/media?parent=165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/categories?post=165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/tags?post=165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}