{"id":5271,"date":"2023-09-10T14:44:33","date_gmt":"2023-09-10T22:44:33","guid":{"rendered":"https:\/\/wonghoi.humgar.com\/blog\/?p=5271"},"modified":"2024-12-29T15:33:59","modified_gmt":"2024-12-29T23:33:59","slug":"intro-to-proxmox-kvm-qemu","status":"publish","type":"post","link":"https:\/\/wonghoi.humgar.com\/blog\/2023\/09\/10\/intro-to-proxmox-kvm-qemu\/","title":{"rendered":"Intro to Proxmox (KVM\/Qemu)"},"content":{"rendered":"\n<p>Among the common virtual machine solutions (Hyper-V, VirtualBox, Xen (Cirtix), VMware, KVM\/Qemu), KVM\/Qemu has the reputation of being lean and mean. However, it&#8217;s not easy to set up and use. <\/p>\n\n\n\n<p>Microsoft&#8217;s Hyper-V has an interesting approach: if you disable Hyper-V, Windows runs as raw Windows. When you enable Hyper-V, your host Windows is a VM session in disguise running locally and have the first dibs on the hardware, which the overhead is unavoidable even if you launched no VM.<\/p>\n\n\n\n<p>I tried the QEmu port on Windows and it was faster than Hyper-V even when there&#8217;s no KVM (used HAXM). However QEmu&#8217;s Windows port is clearly not polished. It retains a lot of the KVM lingo which <a href=\"https:\/\/wonghoi.humgar.com\/blog\/2023\/09\/09\/kvm-qemu-duality\/\" data-type=\"post\" data-id=\"5276\">made no sense<\/a>, and it&#8217;s messy to get TAP (VMs having direct access to my own network without any translation as if they have their own network card plugged to my router) and it <a href=\"https:\/\/wonghoi.humgar.com\/blog\/2021\/05\/03\/qemu-for-windows-host-quirks\/\" data-type=\"post\" data-id=\"2510\">bluescreens<\/a> my Windows. <\/p>\n\n\n\n<p>So the next attempt is to try QEmu\/KVM on linux. QEmu\/KVM pretty much operate as a simple executable with a gazillion command line switches. Anything you can find that are a little user friendly are just a wrapper that passes the correct command line switches. <\/p>\n\n\n\n<p>Most of the UIs, do not polish the UI to organize the available features into intuitively arranged common use cases like HP\/Agilent\/Keysight\/Windows does. Most of the time it takes as much effort understanding the man pages spit out by &#8211;help switch as using their interface, and there&#8217;s a lot of common use scenarios overlooked that the user will end up having to look up the switches or enter the commands in the shell themselves.<\/p>\n\n\n\n<p>Libvrt is simply an XML tree that&#8217;s a near-direct translation of the command line arguments so you feel the entry looked more professional than saving the command line text is a shell script or batch file. I&#8217;m not impressed as it&#8217;s just more fluff as the structure do not help the users avoid studying the command line switches&#8217; manual pages. <\/p>\n\n\n\n<p>QtEmu had promise (the interface looked like a half-developed version of VirtualBox&#8217;s Manager) but the project was not maintained anymore and Qemu&#8217;s command line switches&#8217; evolution has escaped them so a lot of the functions are broken or missing.<\/p>\n\n\n\n<p>virt-manager do not have a compiled Windows binaries port. They have a virt-viewer for connecting to the sessions in Windows but it&#8217;s command line like SPICE. This is beyond frustrating. If you want something polished like a Hyper-V manager on Windows to manage Proxmox or linux QEmu clusters, forget about it.<\/p>\n\n\n\n<p>Proxmox is very incomplete when compared with Microsoft&#8217;s offerings, but it&#8217;s still better than nothing. At least it has a web interface that VNCs the screen back to you. <\/p>\n\n\n\n<p>You still cannot avoid actually understanding the long list of Qemu command switches as the UI only translates a few basic use cases into raw command switches which they show the raw string to you with the expectation that you&#8217;d figure out what to fix if they accidentally generated invalid combinations. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"385\" src=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-2-1024x385.png\" alt=\"\" class=\"wp-image-5280\" srcset=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-2-1024x385.png 1024w, https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-2-300x113.png 300w, https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-2-768x289.png 768w, https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-2-500x188.png 500w, https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-2.png 1530w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>There are quite a lot of features (like setting up TAP) that still require shell command line entries, which they provided the interface so you don&#8217;t have to SSH separately into the Linux<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"859\" height=\"713\" src=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-3.png\" alt=\"\" class=\"wp-image-5281\" srcset=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-3.png 859w, https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-3-300x249.png 300w, https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-3-768x637.png 768w, https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-3-361x300.png 361w\" sizes=\"auto, (max-width: 859px) 100vw, 859px\" \/><\/figure>\n\n\n\n<p>Remember whatever Proxmox provided, it&#8217;s largely a pass through of the command line (switches) interface. Don&#8217;t get your hopes up assuming all the things a normal user would expect are there. You are expected to fill in the gaps by a lot of Googling. The UI is useful only if you know what you are looking for.<\/p>\n\n\n\n<p>There are a few things Proxmox did right but overall it&#8217;s not an experience comparable to Microsoft&#8217;s management interface.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">USB mapping<\/h2>\n\n\n\n<p>I have to give Proxmox credit for implementing PCI and USB passthrough\/mapping, which is often a pain in the butt to get the unique string from command line and hack together the right reference to mount the hardware.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"616\" src=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-26-1024x616.png\" alt=\"\" class=\"wp-image-5315\" srcset=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-26-1024x616.png 1024w, https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-26-300x181.png 300w, https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-26-768x462.png 768w, https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-26-1536x924.png 1536w, https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-26-2048x1233.png 2048w, https:\/\/wonghoi.humgar.com\/blog\/wp-content\/uploads\/2023\/09\/image-26-498x300.png 498w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">VNC over WebUI is horrendous<\/h2>\n\n\n\n<p>I often hate people for squeezing all the UIs in a browsers when they shouldn&#8217;t. VNC is one of them. The reason is that when you are remote controlling another computer, you need to make sure most keystrokes goes to the VM, not the host, unless released. You cannot do this from within in a browser as the Alt-F4 closes the client&#8217;s browser, not the guest VM&#8217;s Windows!<\/p>\n<div class=\"pvc_clear\"><\/div><p id=\"pvc_stats_5271\" class=\"pvc_stats all  \" data-element-id=\"5271\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p><div class=\"pvc_clear\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Among the common virtual machine solutions (Hyper-V, VirtualBox, Xen (Cirtix), VMware, KVM\/Qemu), KVM\/Qemu has the reputation of being lean and mean. However, it&#8217;s not easy to set up and use. Microsoft&#8217;s Hyper-V has an interesting approach: if you disable Hyper-V, &hellip; <a href=\"https:\/\/wonghoi.humgar.com\/blog\/2023\/09\/10\/intro-to-proxmox-kvm-qemu\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_5271\" class=\"pvc_stats all  \" data-element-id=\"5271\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[3,75,70],"tags":[],"class_list":["post-5271","post","type-post","status-publish","format-standard","hentry","category-it-computers","category-self-host","category-vm"],"_links":{"self":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/5271","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/comments?post=5271"}],"version-history":[{"count":4,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/5271\/revisions"}],"predecessor-version":[{"id":5906,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/5271\/revisions\/5906"}],"wp:attachment":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/media?parent=5271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/categories?post=5271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/tags?post=5271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}