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

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 an interactive admin interface that lets you access and manage systems from any supported web browser. With virt-manager being deprecated users are encouraged to use Cockpit instead, which is meant to replace it.

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.

Installing software


The required software prerequisites are libvirt, cockpit and cockpit-machines. To install them on Fedora 31, run the following command from a terminal using sudo:

$ sudo dnf install libvirt cockpit cockpit-machines

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:

$ sudo dnf groupinstall "Headless Management"

Setting up Cockpit services


After installing the necessary packages it’s time to enable the services. The libvirtd service runs the virtual machines, while Cockpit has a socket activated service to let you access the Web GUI:

$ sudo systemctl enable libvirtd --now
$ sudo systemctl enable cockpit.socket --now

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:

$ sudo firewall-cmd --zone=public --add-service=cockpit --permanent
$ sudo firewall-cmd --reload

To confirm the services are running and no issues occurred, check the status of the services:

$ sudo systemctl status libvirtd
$ sudo systemctl status cockpit.socket

At this point everything should be working. The Cockpit web GUI should be available at https://localhost:9090 or https://127.0.0.1:9090. 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.)

Creating and installing a machine


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.

Select Virtual Machines and then select Create VM to build a new box. The console gives you several options:

  • Download an OS using Cockpit’s built in library
  • Use install media already downloaded on the system you’re managing
  • Point to a URL for an OS installation tree
  • Boot media over the network via the PXE protocol

Enter all the necessary parameters. Then select Create to power up the new virtual machine.

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 via virt-manager in the past.


Photo by Miguel Teixeira on Flickr (CC BY-SA 2.0).



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



Possibly Related Threads…
Thread Author Replies Views Last Post
  Fedora - Scheduling tasks with cron xSicKxBot 0 9 04-12-2021, 06:43 PM
Last Post: xSicKxBot
  Fedora - Using network bound disk encryption with Stratis xSicKxBot 0 14 04-07-2021, 02:52 PM
Last Post: xSicKxBot
  Fedora - Contribute at Fedora Linux 34 Upgrade, Audio, and Virtualization test days xSicKxBot 0 12 04-06-2021, 10:27 AM
Last Post: xSicKxBot
  Fedora - Fedora Council statement on Richard Stallman rejoining FSF Board xSicKxBot 0 13 04-03-2021, 11:11 AM
Last Post: xSicKxBot
  Fedora - Playing with modular synthesizers and VCV Rack xSicKxBot 0 23 03-31-2021, 02:01 PM
Last Post: xSicKxBot
  Fedora - Network address translation part 3 – the conntrack event framework xSicKxBot 0 21 03-26-2021, 10:16 AM
Last Post: xSicKxBot
  Fedora - Announcing the release of Fedora Linux 34 Beta xSicKxBot 0 26 03-24-2021, 02:28 PM
Last Post: xSicKxBot
  Fedora - Productivity with Ulauncher xSicKxBot 0 24 03-22-2021, 06:29 PM
Last Post: xSicKxBot
  Fedora - 4 cool new projects to try in COPR for March 2021 xSicKxBot 0 28 03-19-2021, 09:16 AM
Last Post: xSicKxBot
  Fedora - Fedora Workstation 34 Feature Focus: Updated Activities Overview xSicKxBot 0 31 03-17-2021, 03:08 PM
Last Post: xSicKxBot

Forum Jump:

[-]
Active Threads
[Tut] Private and Public Attributes in P...
Last Post: xSicKxBot
Yesterday 11:05 PM
» Replies: 0
» Views: 3
(Indie Deal) Adventure Tales Bundle, Qua...
Last Post: xSicKxBot
Yesterday 11:05 PM
» Replies: 0
» Views: 4
Mobile - Arena battler Smash Legends goe...
Last Post: xSicKxBot
Yesterday 11:05 PM
» Replies: 0
» Views: 3
News - Epic Secures $1 Billion In Fundin...
Last Post: xSicKxBot
Yesterday 11:04 PM
» Replies: 0
» Views: 3
News - Anniversary: The Animal Crossing ...
Last Post: xSicKxBot
Yesterday 11:04 PM
» Replies: 0
» Views: 3
News - TMNT: Shredder's Revenge Confirme...
Last Post: xSicKxBot
Yesterday 11:04 PM
» Replies: 0
» Views: 6
Unigine 2.14 Released
Last Post: xSicKxBot
Yesterday 03:06 PM
» Replies: 0
» Views: 8
News - Lawson Will Offer New Pokémon Sna...
Last Post: xSicKxBot
Yesterday 03:06 PM
» Replies: 0
» Views: 7
News - Nacon Announces WRC 10, Speeds On...
Last Post: xSicKxBot
Yesterday 03:06 PM
» Replies: 0
» Views: 5
News - Blizzard Arcade Collection Gets T...
Last Post: xSicKxBot
Yesterday 03:06 PM
» Replies: 0
» Views: 16

[-]
Twitter

[-]
Sponsored
Get the Deal of the Week at RefurBees.com

Copyright © SickGaming.net 2012-2020