Kumpulan Tutorial Kito

Selasa, 07 Juli 2020

COCKPIT-rhed8 full


Create KVM Virtual Machine using Cockpit UI RHEL CentOS 8

Last updated on June 25, 2020 at 04:37 pm
https://www.golinuxcloud.com/create-kvm-virtual-machines-cockpit-centos-8/

Table of Contents

  • What is Cockpit?
  • Pre-requisite
  • Install Cockpit
  • Enable and start Cockpit
  • Enable Firewall for Cockpit
  • Access Cockpit Web Console GUI
    • Connect using browser
    • Connect using CLI
  • Configure Bridged Network
  • Create KVM Virtual Machine using Cockpit
Advertisements
In this article I will share step by step instructions with screenshots to create KVM Virtual Machine using Cockpit web console in RHEL/CentOS 8 Linux
ALSO READ:
You can also create KVM Virtual Machines using
⇒ Virtual Manager (Deprecated starting RHEL/CentOS 8)
⇒ virt-install Command Line Tool

What is Cockpit?

  • The RHEL/CentOS web console is an open source project called Cockpit that provides a user-friendly web interface allowing for the remote administration of servers.
  • Starting with RHEL/CentOS 7, the cockpit package provides a powerful and extensible web console for system administration.
  • You can learn more about cockpit from their official project page
  • Cockpit is installed by default on RHEL/CentOS 8, which is why you may see a login message on screen "Activate the web console with: systemctl enable --now cockpit.socket" every time you connect to your RHEL/CentOS 8 box.

Pre-requisite

As a pre-requisite, you must first install KVM and enable KVM Virtualization on your Linux server host before you can create KVM Virtual Machine using Cockpit or any other method in RHEL/CentOS 8 Linux

Install Cockpit

  • As told earlier, cockpit should be installed by default on your RHEL/CentOS 8 Linux server
  • But if not installed, you can manually install it using dnf or yum. I hope you are already aware of YUM alternative DNF tool
  • We will also need cockpit-machines to add a new plugin in cockpit which we will use to create KVM virtual machine using Cockpit
copy
[root@rhel-8 ~]# dnf install -y cockpit cockpit-machines
Below are the cockpit rpm versions used in this article
copy
[root@rhel-8 ~]# rpm -q cockpit
cockpit-196.3-1.el8.x86_64

[root@rhel-8 ~]# rpm -q cockpit-machines
cockpit-machines-197.3-1.el8.noarch

Enable and start Cockpit

  • The cockpit service is handled by cockpit.socket
  • So you don't need to worry about cockpit.service (unless it is masked)
  • You just need to start and enable cockpit.socket
copy
[root@rhel-8 ~]# systemctl enable cockpit.socket --now
Check the status of the socket
copy
[root@rhel-8 ~]# systemctl status cockpit.socket
● cockpit.socket - Cockpit Web Service Socket
   Loaded: loaded (/usr/lib/systemd/system/cockpit.socket; enabled; vendor preset: disabled)
   Active: active (listening) since Wed 2020-04-29 01:45:39 IST; 4 days ago
     Docs: man:cockpit-ws(8)
   Listen: [::]:9090 (Stream)
    Tasks: 0 (limit: 26213)
   Memory: 2.4M
   CGroup: /system.slice/cockpit.socket
  • It is possible that cockpit.service is dead. This is because currently there are no incoming request for the cockpit.service
  • As soon as cockpit.socket received a request, it will start the service automatically
copy
[root@rhel-8 ~]# systemctl status cockpit
● cockpit.service - Cockpit Web Service
   Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:cockpit-ws(8)


Apr 29 01:45:39 rhel-8.example.com systemd[1]: Starting Cockpit Web Service Socket.
Apr 29 01:45:39 rhel-8.example.com systemd[1]: Listening on Cockpit Web Service Socket.

Enable Firewall for Cockpit

By default there should be a rule to allow cockpit.service
copy
[root@rhel-8 ~]# firewall-cmd --list-services
cockpit dhcpv6-client ssh
But if it is not present you can create a new firewall rule to allow cockpit in firewalld
copy
# firewall-cmd --add-service=cockpit --permanent
# firewall-cmd --reload

Access Cockpit Web Console GUI

After you enable and start cockpit.socket, next you can access your cockpit web console GUI:
Advertisements

Connect using browser

Open browser and in address link put : http://server-ip:9090 or http://localhost:9090

Connect using CLI

From command line as root or non-root user you can launch firefox.
copy
$ firefox server-ip:9090
or
copy
$ firefox localhost:9090
Login as any Linux system user by providing the username and password. Below is the Cockpit web console login screen,
Create KVM Virtual Machine using Cockpit UI RHEL CentOS 8

Configure Bridged Network

  • You can either configure Bridged Network or any other type of Network which will be used when we create KVM Virtual Machine using Cockpit
  • You can create network using nmcli tool, or using ip tool or you can also configure bridged network using Cockpit web console GUI
  • In my case I already had created bridged network, but I will share the screenshots from Cockpit web console so you can also create one for your use case
  • I already have created nm-bridge as my Bridged Interface and virbr0 which is system's default bridge interface.
Create KVM Virtual Machine using Cockpit UI RHEL CentOS 8

Create KVM Virtual Machine using Cockpit

To create KVM Virtual Machine using Cockpit or any other method, it is important that all KVM related rpms and installed and modules are loaded on your Linux server host
On the Cockpit web console, click on "Virtual Machines" from the left panel. If you have not installed cockpit-machines then you won't get this option on Cockpit Web Console.
In my case I already have different virtual machines running on my KVM host. You can ignore them for now.
Create KVM Virtual Machine using Cockpit UI RHEL CentOS 8

After you click on "Create VM", you will get a pop up screen where you must provide details of your new VM
I had already downloaded CentOS 8 ISO and have kept it under /tmp to create KVM Virtual Machine using Cockpit
copy
[root@rhel-8 ~]# ls -l /tmp/CentOS-8.1.1911-x86_64-dvd1.iso
-rw-r--r--. 1 qemu qemu 7554990080 Jan  4 03:17 /tmp/CentOS-8.1.1911-x86_64-dvd1.iso
We will provide the path to this ISO under "Installation Source"Create KVM Virtual Machine using Cockpit UI RHEL CentOS 8

Next provide other details for your VM such as Disk Size, Memory, OS Vendor. At the time of writing this article, CentOS 8 was not shown under list of OS Vendor so I have selected CentOS 7.
Lastly click on Create to create KVM Virtual Machine using Cockpit
Create KVM Virtual Machine using Cockpit UI RHEL CentOS 8

In the next step, you will be again on the main section of "Virtual Machines" and a new VM will have been created if all was successful. You can check the VM's details, such as attached Disks, Network Interfaces by selecting the respective TAB menu for the respective VM.
Create KVM Virtual Machine using Cockpit UI RHEL CentOS 8
Currently at the time of writing this article, Cockpit does not supports many important features required to manage KVM Virtual Machine. You can get the complete list of missing features between Cockpit Web Console and Virtual Manager from Red Hat's documentation
Alternatively you can also use command line tool virsh to manage and modify KVM Virtual Machine
Create KVM Virtual Machine using Cockpit UI RHEL CentOS 8

Next click on Install to start the Installation Process which will automatically re-direct you to the Console of the VM.
Create KVM Virtual Machine using Cockpit UI RHEL CentOS 8

You can also click on Consoles to access the console of the VM using VNC. From the drop down menu you can choose to access console using serial console or using virt-viewer
Create KVM Virtual Machine using Cockpit UI RHEL CentOS 8

You can next follow the steps to install your respective OS on the KVM VM
The Virtual Machine which we created using Cockpit will also be accessible using virt-manager and virsh. You can use virt-manager to manage the Virtual Machine which currently provides more list of features to modify and manage the KVM Virtual Machines

References:
How to install Cockpit in RHEL/CentOS 8?
Diposting oleh tutorial kito di 02.12
Kirimkan Ini lewat EmailBlogThis!Bagikan ke XBerbagi ke FacebookBagikan ke Pinterest

Tidak ada komentar:

Posting Komentar

Posting Lebih Baru Posting Lama Beranda
Langganan: Posting Komentar (Atom)

Menu login


Mengenai Saya

tutorial kito
Lihat profil lengkapku

Arsip Blog

  • ►  2026 (1)
    • ►  Februari (1)
  • ►  2025 (62)
    • ►  Desember (2)
    • ►  November (1)
    • ►  Oktober (6)
    • ►  September (2)
    • ►  Agustus (3)
    • ►  Juli (1)
    • ►  Juni (3)
    • ►  Mei (12)
    • ►  April (2)
    • ►  Maret (3)
    • ►  Februari (12)
    • ►  Januari (15)
  • ►  2024 (434)
    • ►  Desember (6)
    • ►  November (20)
    • ►  Oktober (80)
    • ►  September (69)
    • ►  Agustus (35)
    • ►  Juli (52)
    • ►  Juni (18)
    • ►  Mei (47)
    • ►  April (46)
    • ►  Maret (16)
    • ►  Februari (29)
    • ►  Januari (16)
  • ►  2023 (173)
    • ►  Desember (3)
    • ►  November (40)
    • ►  Oktober (11)
    • ►  September (5)
    • ►  Agustus (17)
    • ►  Juli (9)
    • ►  Juni (21)
    • ►  Mei (8)
    • ►  April (17)
    • ►  Maret (5)
    • ►  Februari (25)
    • ►  Januari (12)
  • ►  2022 (136)
    • ►  November (6)
    • ►  Oktober (19)
    • ►  September (6)
    • ►  Agustus (21)
    • ►  Juli (14)
    • ►  Juni (21)
    • ►  Mei (9)
    • ►  April (5)
    • ►  Maret (3)
    • ►  Februari (26)
    • ►  Januari (6)
  • ►  2021 (257)
    • ►  Desember (21)
    • ►  November (38)
    • ►  Oktober (15)
    • ►  September (22)
    • ►  Agustus (20)
    • ►  Juli (14)
    • ►  Juni (22)
    • ►  Mei (31)
    • ►  April (16)
    • ►  Maret (19)
    • ►  Februari (18)
    • ►  Januari (21)
  • ▼  2020 (431)
    • ►  Desember (16)
    • ►  November (53)
    • ►  Oktober (42)
    • ►  September (35)
    • ►  Agustus (51)
    • ▼  Juli (54)
      • SENDMAIL-ubuntu12.04
      • XENSERVER-installasi
      • RHEV-centos8
      • RHEV3.5-part6
      • RHEV3.5-part5
      • RHEV3.5-part4
      • RHEV3.5-part3
      • RHEV3.5-part2
      • RHEV3.5 IND-part1
      • RHEV-instalasi
      • RHEV-H-virtualisasi redhat
      • VG_NAME DUPLICAT-rename vg_name
      • PROXMOX-install router
      • PROXMOX-add hardisk node
      • CEP STORAGE-centos7
      • CRONTAB-permision danied
      • GANTI DOCROOT-aplikasi linux
      • ROOT CENTOS8-setting akses root
      • NFS CENTOS7-owncloud multi server
      • iSCSI-centos7
      • iSCSI-install
      • OWNCLOUD 10-Centos/rhed7
      • CLUSTER DB-galera mysql centos7-OK
      • OWNCLOUD-install centos7
      • OWNCLOUD-multi server 2018
      • ORACLE CLIENT-xampp
      • ORACLE-clien xampp
      • EXTENSION PHP ORACLE-xampp
      • FTP SERVER-windows server 2012
      • MARIA DB-citsos
      • DOCKER EE-ibm power 7le
      • DOCKER IBM POWER-install
      • NETPLAN EROR-ubuntu 18.04
      • ORACLE-lock sesion
      • ORACLE-file corupt
      • ORACLE-online backup
      • ORACLE-restore DB online
      • ORACLE-restore offline backup
      • ORACLE-blajar dasar db
      • ORACLE-enable archivelog
      • ORACLE-delet otomatis archivelog
      • RHEV-install
      • AUTO START-script sh ubuntu
      • OVIRT-centos7
      • COCKPIT Indo-rhed8
      • KVM Indo-Centos7
      • COCKPIT-rhed8 full
      • KVM COCKPIT-centos8
      • KVM COCKPIT-rhel8
      • COCKPIT-multi server centos7
      • KVM COCKPIT-centos 8
      • KVM-Centos7
      • VIRTUAL KVM-redhat/centos7
      • CEK PORT UBUNTU-port yg aktif
    • ►  Juni (24)
    • ►  Mei (27)
    • ►  April (19)
    • ►  Maret (41)
    • ►  Februari (37)
    • ►  Januari (32)
  • ►  2019 (216)
    • ►  Desember (60)
    • ►  November (44)
    • ►  Oktober (16)
    • ►  September (5)
    • ►  Agustus (11)
    • ►  Juni (26)
    • ►  Mei (7)
    • ►  April (20)
    • ►  Maret (4)
    • ►  Februari (17)
    • ►  Januari (6)
  • ►  2018 (221)
    • ►  Desember (11)
    • ►  November (17)
    • ►  Oktober (2)
    • ►  September (34)
    • ►  Agustus (19)
    • ►  Juli (22)
    • ►  Juni (10)
    • ►  Mei (7)
    • ►  April (25)
    • ►  Maret (18)
    • ►  Februari (23)
    • ►  Januari (33)
  • ►  2017 (203)
    • ►  Desember (8)
    • ►  November (20)
    • ►  Oktober (25)
    • ►  September (33)
    • ►  Agustus (13)
    • ►  Juli (13)
    • ►  Juni (25)
    • ►  Mei (16)
    • ►  April (11)
    • ►  Maret (10)
    • ►  Februari (13)
    • ►  Januari (16)
  • ►  2016 (522)
    • ►  Desember (96)
    • ►  November (22)
    • ►  Oktober (41)
    • ►  September (29)
    • ►  Agustus (68)
    • ►  Juli (34)
    • ►  Juni (12)
    • ►  Mei (25)
    • ►  April (24)
    • ►  Maret (47)
    • ►  Februari (59)
    • ►  Januari (65)
  • ►  2015 (702)
    • ►  Desember (50)
    • ►  November (31)
    • ►  Oktober (48)
    • ►  September (19)
    • ►  Agustus (18)
    • ►  Juli (20)
    • ►  Juni (50)
    • ►  Mei (19)
    • ►  April (77)
    • ►  Maret (138)
    • ►  Februari (103)
    • ►  Januari (129)
  • ►  2014 (286)
    • ►  Desember (196)
    • ►  November (90)
Tema Sederhana. Diberdayakan oleh Blogger.