Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fedora - Create virtual machines with Cockpit in Fedora

#1
Create virtual machines with Cockpit in Fedora

<div><p>This article shows you how to install the software you need to use Cockpit to create and manage virtual machines on Fedora 31. Cockpit is <a href="https://cockpit-project.org/">an interactive admin interface</a> that lets you access and manage systems from any supported web browser. With <a href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/8.0_release_notes/rhel-8_0_0_release#virtualization_4">virt-manager being deprecated</a> users are encouraged to use Cockpit instead, which is meant to replace it.</p>
<p> <span id="more-29555"></span> </p>
<p>Cockpit is an actively developed project, with many plugins available that extend how it works. For example, one such plugin is “Machines,” which interacts with libvirtd and lets users create and manage virtual machines.</p>
<h2>Installing software</h2>
<p>The required software prerequisites are <em>libvirt</em>, <em>cockpit</em> and <em>cockpit-machines</em>. To install them on Fedora 31, run the following command from a terminal <a href="https://fedoramagazine.org/howto-use-sudo/">using sudo</a>:</p>
<pre class="wp-block-preformatted">$ sudo dnf install libvirt cockpit cockpit-machines</pre>
<p>Cockpit is also included as part of the “Headless Management” package group. This group is useful for a Fedora based server that you only access through a network. In that case, to install it, use this command:</p>
<pre class="wp-block-preformatted">$ sudo dnf groupinstall "Headless Management"</pre>
<h2>Setting up Cockpit services</h2>
<p>After installing the necessary packages it’s time to enable the services. The <em>libvirtd</em> service runs the virtual machines, while Cockpit has a socket activated service to let you access the Web GUI:</p>
<pre class="wp-block-preformatted">$ sudo systemctl enable libvirtd --now
$ sudo systemctl enable cockpit.socket --now</pre>
<p>This should be enough to run virtual machines and manage them through Cockpit. Optionally, if you want to access and manage your machine from another device on your network, you need to expose the service to the network. To do this, add a new rule in your firewall configuration:</p>
<pre class="wp-block-preformatted">$ sudo firewall-cmd --zone=public --add-service=cockpit --permanent
$ sudo firewall-cmd --reload</pre>
<p>To confirm the services are running and no issues occurred, check the status of the services:</p>
<pre class="wp-block-preformatted">$ sudo systemctl status libvirtd
$ sudo systemctl status cockpit.socket</pre>
<p>At this point everything should be working. The Cockpit web GUI should be available at <a href="https://localhost:9090">https://localhost:9090</a> or <a href="https://127.0.0.1:9090">https://127.0.0.1:9090</a>. Or, enter the local network IP in a web browser on any other device connected to the same network. (Without SSL certificates setup, you may need to allow a connection from your browser.)</p>
<h2>Creating and installing a machine</h2>
<p>Log into the interface using the user name and password for that system. You can also choose whether to allow your password to be used for administrative tasks in this session.</p>
<p>Select <em>Virtual Machines</em> and then select <em>Create VM</em> to build a new box. The console gives you several options:</p>
<ul>
<li>Download an OS using Cockpit’s built in library</li>
<li>Use install media already downloaded on the system you’re managing</li>
<li>Point to a URL for an OS installation tree</li>
<li>Boot media over the network via the <a href="https://en.wikipedia.org/wiki/Preboot_Execution_Environment">PXE</a> protocol</li>
</ul>
<p>Enter all the necessary parameters. Then select <em>Create</em> to power up the new virtual machine.</p>
<p>At this point, a graphical console appears. Most modern web browsers let you use your keyboard and mouse to interact with the VM console. Now you can complete your installation and use your new VM, just as you would <a href="https://fedoramagazine.org/full-virtualization-system-on-fedora-workstation-30/">via virt-manager in the past</a>.</p>
<hr class="wp-block-separator" />
<p><em>Photo by <a href="https://flickr.com/photos/miguelteixeira/">Miguel Teixeira</a> on <a href="https://flickr.com/photos/miguelteixeira/2964851828/">Flickr</a> (CC BY-SA 2.0).</em></p>
</div>


https://www.sickgaming.net/blog/2019/11/...in-fedora/
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Fedora - Contribute to Fedora 39 Upgrade, Virtualization, and Cloud Test Day xSicKxBot 0 2,029 09-30-2023, 03:56 AM
Last Post: xSicKxBot
  Fedora - Share your game achievements with Gamerzilla xSicKxBot 0 1,002 09-27-2023, 09:59 AM
Last Post: xSicKxBot
  Fedora - Using Cockpit to graphically manage systems, without installing Cockpit on xSicKxBot 0 895 09-26-2023, 06:41 AM
Last Post: xSicKxBot
  Fedora - Announcing Fedora Linux 39 Beta xSicKxBot 0 917 09-20-2023, 09:48 AM
Last Post: xSicKxBot
  Fedora - Contribute at Passkey Auth, Fedora CoreOS and IoT Test Week xSicKxBot 0 890 09-19-2023, 12:23 PM
Last Post: xSicKxBot
  Fedora - Quick Fedora shirt update and sale of last stock with the old logo xSicKxBot 0 941 09-16-2023, 12:28 PM
Last Post: xSicKxBot
  Fedora - Contribute at the Fedora Linux Test Week for Kernel 6.5 and Toolbx Test Day xSicKxBot 0 950 09-11-2023, 02:47 PM
Last Post: xSicKxBot
  Fedora - Fedora Linux Flatpak cool apps to try for September xSicKxBot 0 930 09-10-2023, 04:59 PM
Last Post: xSicKxBot
  Fedora - Contribute at the Test Week for the Anaconda WebUI Installer for Fedora Wor xSicKxBot 0 922 09-09-2023, 11:54 PM
Last Post: xSicKxBot
  Fedora - Docs workshop: Virtually writing together xSicKxBot 0 966 09-09-2023, 05:08 AM
Last Post: xSicKxBot

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016