{"id":4704,"date":"2025-04-08T20:27:18","date_gmt":"2025-04-09T00:27:18","guid":{"rendered":"https:\/\/dft.wiki\/?p=4704"},"modified":"2025-06-04T19:36:53","modified_gmt":"2025-06-04T23:36:53","slug":"managing-kvm-with-cockpit","status":"publish","type":"post","link":"https:\/\/dft.wiki\/?p=4704","title":{"rendered":"Managing KVM with Cockpit"},"content":{"rendered":"<p><strong>Project Cockpit<\/strong> is a lightweight, web-based interface that lets you monitor and manage your servers with easy access to logs, services, networking, containers, virtual machines, storage, and more [<a href=\"https:\/\/github.com\/cockpit-project\/cockpit\">Link<\/a>].<\/p>\n<hr \/>\n<p><strong>INSTALLATION ON UBUNTU<\/strong><\/p>\n<p>It most likely will work the same way for most Debian-based distros.<\/p>\n<pre>sudo apt update &amp;&amp; sudo apt upgrade -y\r\nsudo apt install bridge-utils -y\r\nsudo apt install cockpit -y\r\nsudo systemctl enable cockpit.socket\r\nsudo ufw allow 9090<\/pre>\n<p>The following additions are very desirable for extended features.<\/p>\n<pre>sudo apt install cockpit-* libvirt-dbus -y\r\nsudo apt install -t noble-backports -y\r\nsudo usermod -a -G libvirt libvirtdbus<\/pre>\n<p>For managing Virtual Machines, the KVM+QEMU needs to be present.<\/p>\n<pre>sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager -y\r\nsudo reboot<\/pre>\n<p>Read more about <strong>KVM and QEMU Cheat Sheet<\/strong> [<a href=\"https:\/\/dft.wiki\/?p=3526\">Link<\/a>].<\/p>\n<hr \/>\n<p><strong>INSTALLATION ON ROCKY \/ ALMA<\/strong><\/p>\n<p>It most likely will work the same way for most RHEL-based distros like Fedora.<\/p>\n<pre>sudo su -\r\ndnf update -y\r\ndnf install cockpit cockpit-machines libvirt wget nano -y\r\nfirewall-cmd --permanent --zone=public --add-service=cockpit\r\nfirewall-cmd --reload\r\nsystemctl enable --now libvirtd cockpit.socket\r\nadduser admin &amp;&amp; passwd admin &amp;&amp; usermod -aG wheel admin &amp;&amp; echo \"admin ALL=(ALL) NOPASSWD:ALL\" | tee \/etc\/sudoers.d\/admin<\/pre>\n<hr \/>\n<p><strong>WEB-UI USAGE<\/strong><\/p>\n<p>Navigate to the address of your server <strong>https:\/\/<span style=\"text-decoration: underline;\">&lt;IP&gt;<\/span>:9090\/<\/strong>.<\/p>\n<p>Log in using a system account, preferably a service account with <code>sudo<\/code> privileges but avoid using <code>root<\/code> it as much as possible.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-4757 aligncenter\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-43-20.png\" alt=\"\" width=\"640\" height=\"372\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-43-20.png 861w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-43-20-300x174.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-43-20-768x446.png 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Elevate your privileges to an &#8220;administrator&#8221;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4756\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-46-40-1024x768.png\" alt=\"\" width=\"640\" height=\"480\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-46-40-1024x768.png 1024w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-46-40-300x225.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-46-40-768x576.png 768w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-46-40.png 1238w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>A confirmation box might pop up.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4755\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-47-33-1024x355.png\" alt=\"\" width=\"640\" height=\"222\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-47-33-1024x355.png 1024w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-47-33-300x104.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-47-33-768x266.png 768w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-47-33.png 1042w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><strong>Logs<\/strong> can be searched and filtered with ease.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4751\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-50-11-1024x759.png\" alt=\"\" width=\"640\" height=\"474\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-50-11-1024x759.png 1024w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-50-11-300x222.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-50-11-768x569.png 768w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-50-11.png 1252w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><strong>Storage<\/strong> devices utilization and metrics.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4752\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-50-01-1024x833.png\" alt=\"\" width=\"640\" height=\"521\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-50-01-1024x833.png 1024w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-50-01-300x244.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-50-01-768x625.png 768w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-50-01.png 1252w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Same for <strong>Network<\/strong> adapters (physical and virtual).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4754\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-49-16-1024x582.png\" alt=\"\" width=\"640\" height=\"364\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-49-16-1024x582.png 1024w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-49-16-300x170.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-49-16-768x436.png 768w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-49-16.png 1252w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4753\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-49-49-1024x932.png\" alt=\"\" width=\"640\" height=\"583\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-49-49-1024x932.png 1024w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-49-49-300x273.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-49-49-768x699.png 768w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-49-49.png 1252w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><strong>Virtual Machines<\/strong> can be deployed and managed with incredible sharpness on the graphical console.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4750\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-50-24-1024x391.png\" alt=\"\" width=\"640\" height=\"244\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-50-24-1024x391.png 1024w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-50-24-300x115.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-50-24-768x293.png 768w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-50-24.png 1252w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-4759 aligncenter\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-20-26-28-1024x932.png\" alt=\"\" width=\"640\" height=\"583\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-20-26-28-1024x932.png 1024w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-20-26-28-300x273.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-20-26-28-768x699.png 768w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-20-26-28.png 1393w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Users and groups can be managed in <strong>Accounts<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-4758 aligncenter\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-13-50-55-1024x564.png\" alt=\"\" width=\"640\" height=\"353\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-13-50-55-1024x564.png 1024w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-13-50-55-300x165.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-13-50-55-768x423.png 768w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-13-50-55.png 1252w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Services<\/strong> allow to start sand top any daemon and other systems assets (targets, sockets, timers, or paths).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4748\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-51-16-1024x680.png\" alt=\"\" width=\"640\" height=\"425\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-51-16-1024x680.png 1024w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-51-16-300x199.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-51-16-768x510.png 768w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-51-16.png 1252w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><strong>Software Updates<\/strong>. The security patches are shown in Red.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4747\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-51-57-1024x857.png\" alt=\"\" width=\"640\" height=\"536\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-51-57-1024x857.png 1024w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-51-57-300x251.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-51-57-768x643.png 768w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-51-57.png 1252w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>The process is visualized similarly to the CLI.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4745\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-58-10.png\" alt=\"\" width=\"640\" height=\"279\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-58-10.png 912w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-58-10-300x131.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-58-10-768x335.png 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>If necessary reboot to apply some of the updates it will prompt at the end.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4744\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-20-00-57.png\" alt=\"\" width=\"424\" height=\"264\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-20-00-57.png 424w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-20-00-57-300x187.png 300w\" sizes=\"auto, (max-width: 424px) 100vw, 424px\" \/><\/p>\n<p>No need for delay before rebooting.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4743\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-20-01-14.png\" alt=\"\" width=\"640\" height=\"216\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-20-01-14.png 861w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-20-01-14-300x101.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-20-01-14-768x259.png 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Finally, it also has a web-based <strong>Terminal<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4746\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-52-08-1024x762.png\" alt=\"\" width=\"640\" height=\"476\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-52-08-1024x762.png 1024w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-52-08-300x223.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-52-08-768x572.png 768w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot-From-2025-04-08-19-52-08.png 1252w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<hr \/>\n<p><strong>REFLECTIONS<\/strong><\/p>\n<p>Project Cockpit is much more than this, it was just an overview of its most evident capabilities and a quick reference guide.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4891\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot_2025-06-04_19_33_10-1024x595.png\" alt=\"\" width=\"640\" height=\"372\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot_2025-06-04_19_33_10-1024x595.png 1024w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot_2025-06-04_19_33_10-300x174.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot_2025-06-04_19_33_10-768x446.png 768w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot_2025-06-04_19_33_10-1536x893.png 1536w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2025\/04\/Screenshot_2025-06-04_19_33_10.png 1700w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Project Cockpit is a lightweight, web-based interface that lets you monitor and manage your servers [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-4704","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/4704","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4704"}],"version-history":[{"count":5,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/4704\/revisions"}],"predecessor-version":[{"id":4892,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/4704\/revisions\/4892"}],"wp:attachment":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}