Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to create a virtual machine using Cockpit

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly describes how to use Cockpit to create virtual machines, the article is very detailed, has a certain reference value, interested friends must read!

Cockpit is a free and open source web-based administration tool that allows system administrators to perform tasks such as storage management, network configuration, checking logs, managing containers, and more. Cockpit provides a friendly Web front-end interface that makes it easy to manage our GNU/Linux servers, very lightweight, and the Web interface is very easy to use.

install software

Prerequisite software is libvirt, cockpit and cockpit-machines. To install them on Fedora 31, run the following command on the terminal using sudo:

$ sudo dnf install libvirt cockpit cockpit-machines

Cockpit is also in the Headless Management package group. This suite is useful for Fedora-based servers that are only accessible over the network. Here, install using the following command:

$ sudo dnf groupinstall "Headless Management" Set Cockpit Service

After installing the necessary software packages, it's time to enable the service. The libvirtd service runs virtual machines, while Cockpit has an active socket service that gives you access to Web GUIs:

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

This should be enough to run the virtual machine and manage it via Cockpit. (Optional) If you want to access and manage your computer from another device on the network, you need to expose the service to the network. To do this, add a new rule to the firewall configuration:

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

To confirm that the service is running and that no problems are occurring, check the status of the service:

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

Everything should be working normally at this point. Cockpit Web GUI should be accessible at https://localhost:9090 or www.example.com. https://127.0.0.1:9090 Alternatively, enter the local network IP in a Web browser on any other device connected to the same network. (If SSL Certificates are not set, you may need to allow connections from browsers.)

Creating and installing machines

Log in to the interface using the system's username and password. You can also choose whether to allow passwords to be used for administrative tasks in this session.

Select Virtual Machines and then Create VM to create a new virtual machine. The console gives you several options:

Download the operating system using Cockpit's built-in library Use the installation media downloaded on the system URL pointing to the system installation tree Enter all necessary parameters via network boot media via PXE protocol. Then select Create to start the new virtual machine.

A graphics console appears. Most modern Web browsers allow you to interact with the VM console using the keyboard and mouse. You can now complete the installation and use the new VM just as you did with virt-manager.

That's all for "How to create a virtual machine with Cockpit". Thanks for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report