Managing systems using the Cockpit web interface

Red Hat Enterprise Linux 8.0 Beta

A guide to using Cockpit for managing systems in Red Hat Enterprise Linux 8.0 Beta

Red Hat Customer Content Services

Abstract

This document describes how use the Cockpit GUI in Red Hat Enterprise Linux 8.0 Beta.

Preface

This document describes how to manage physical and virtual Linux-based systems using the Cockpit web interface. The instructions assume that the server used for management is running in Red Hat Enterprise Linux 8.

This is a beta version!

Thank you for your interest in Red Hat Enterprise Linux 8.0 Beta. Be aware that:

  • Beta code should not be used with production data or on production systems.
  • Beta does not include a guarantee of support.
  • Feedback and bug reports are welcome. Discussions with your account representative, partner contact, and Technical Account Manager (TAM) are also welcome.
  • Upgrades to or from a Beta are not supported or recommended.

Providing feedback on Red Hat documentation

We appreciate your input on our documentation. Please let us know how we could make it better. To do so:

  • For simple comments on specific passages, make sure you are viewing the documentation in the Multi-page HTML format. Highlight the part of text that you want to comment on. Then, click the Add Feedback pop-up that appears below the highlighted text, and follow the displayed instructions.
  • For submitting more complex feedback, create a Bugzilla ticket:

    1. Go to the Bugzilla website.
    2. As the Component, use Documentation.
    3. Fill in the Description field with your suggestion for improvement. Include a link to the relevant part(s) of documentation.
    4. Click Submit Bug.

Chapter 1. Getting started with Cockpit

The following sections aim to help you install Cockpit in Red Hat Enterprise Linux 8 and open the Cockpit interface in your browser. You will also learn how to add remote hosts and monitor them in Cockpit.

1.1. Prerequisites

  • Installed Red Hat Enterprise Linux 8
  • Enabled networking
  • Registered the system and attached subscription

1.2. What is Cockpit?

Cockpit is a Red Hat Enterprise Linux 8 web-based interface designed for managing and monitoring your local system, as well as Linux servers located in your network environment.

cockpit system rhel beta

The Cockpit interface enables you a wide range of administration tasks, including:

  • Managing services
  • Managing user accounts
  • Managing and monitoring system services
  • Configuring network interfaces and firewall
  • Reviewing system logs
  • Managing virtual machines
  • Creating diagnostic reports
  • Setting kernel dump configuration
  • Configuring SELinux
  • Updating software
  • Managing system subscriptions

Cockpit uses the same system APIs as you would in a terminal, and actions performed in a terminal are immediately reflected in Cockpit.

You can monitor the logs of systems in the network environment, as well as their performance, displayed as graphs. In addition, you can change the settings directly in the web interface or through the terminal.

1.3. Installing Cockpit

Red Hat Enterprise Linux 8 includes Cockpit installed by default in many installation variants. If this is not the case on your system, install the Cockpit package and set up the cockpit.socket service to enable the Cockpit interface.

Procedure

  1. Install the cockpit package:

    $ sudo yum install cockpit
  2. Optionally, enable and start the cockpit.socket service, which runs a web server. This step is necessary, if you need to connect to the system through the web interface.

    $ sudo systemctl enable --now cockpit.socket

To verify the previous installation and configuration, you can open the web interface.

If you are using a custom firewall profile, you need to add the cockpit service to firewalld to open port 9090 in the firewall:

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

1.4. Logging in to Cockpit

The following describes the first login to the Cockpit interface using a system user name and password.

Prerequisites

  • Use one of the following browsers for opening cockpit:

    • Mozilla Firefox 23 or later
    • Apple Safari 9 or later
    • Google Chrome 28 or later
    • Opera 21 or later
    • Microsoft Edge 12 or later
  • System user account credentials

    Cockpit uses a specific PAM stack located at /etc/pam.d/cockpit. Authentication with PAM allows you to log in with the user name and password of any local account on the system.

Procedure

  1. Open https://server.name.com:9090 in your web browser.

    If you use a self-signed certificate, the browser issues a warning. Check the certificate and accept the security exception to proceed with the login.

    Cockpit loads a certificate from the /etc/cockpit/ws-certs.d directory and uses the last file with a .cert extension in alphabetical order. To avoid having to grant security exceptions, install a certificate signed by a certificate authority (CA).

  2. In the login screen, enter your system user name and password.

    cockpit login

  3. Optionally, click the Reuse my password for privileged tasks option.

    If the user account you are using to log in has sudo privileges, this makes it possible to perform privileged tasks in Cockpit, such as installing software or configuring SELinux.

  4. Click Log In.

After successful authentication, Cockpit opens the web interface.

1.5. Adding remote systems

This section helps you to connect other systems with a user name and password to the Cockpit Dashboard.

The Cockpit Dashboard is a tool designed for remote server management, where you can add, connect, or remove remote systems.

The Cockpit Dashboard displays graphs and status for each of the remote systems.

cockpit dashboard

Prerequisites

  • Cockpit installed on remote systems. For details, see Installing Cockpit.
  • Opened the SSH service on remote systems.
  • The cockpit-dashboard package installed in the system where the web interface is running:

    $ sudo yum install cockpit-dashboard

    The cockpit-dashboard package extends Cockpit with the remote system management.

Procedure

  1. In the Cockpit interface, go to Dashboard.
  2. In the Dashboard, click the Add Server icon.

    cockpit add server icon

  3. In the Add Machine to Dashboard dialog box, enter the host name or IP address of the remote system.
  4. (Optional) Click the Color field to change the color of the system in Dashboard.
  5. Click Add.
  6. In the Log in to <servername> dialog box, enter the credentials for the remote system.

    You can use any user account of the remote system with administration privileges.

    cockpit add server passwd

  7. Click Log In.

If the login succeeds Cockpit Dashboard adds a new item in the list. To verify the connection, click the system to see all the details in the Cockpit interface.

Note

Cockpit does not save passwords used to log in to remote systems which means that you have to log in again after each system restart. To open the login dialog, click the Troubleshoot button placed on the main screen of the disconnected remote system.

cockpit cannot connect screen

Chapter 2. Managing user accounts in Cockpit

Cockpit offers an interface for adding, editing, and removing system user accounts. After reading this section, you will know:

  • From where the existing accounts come from.
  • How to add new accounts.
  • How to set password expiration.
  • How and when to terminate user sessions.

2.1. Prerequisites

  • Being logged into Cockpit with an account that has administrator permissions assigned. For details, see Logging in to Cockpit.

2.2. System user accounts managed in Cockpit

With user accounts displayed in Cockpit you can:

  • Authenticate users when accessing the system.
  • Set them access rights to the system.

Cockpit displays all user accounts located in the system. Therefore, you can see at least one user account just after the first login to Cockpit.

Ones you are logged in the Cockpit, you can:

  • Create new users accounts.
  • Change their parameters.
  • Lock accounts.
  • Terminate the user session.

You can find the account management in the Accounts settings.

cockpit user accounts

2.3. Adding new accounts in Cockpit

The following describes adding system user accounts in Cockpit and setting administration rights to the accounts.

Procedure

  1. Log in to the Cockpit interface.
  2. Click Accounts.
  3. Click Create New Account.
  4. In the Full Name field, enter the full name of the user.

    Cockpit automatically suggests a user name from the full name and fills it in the User Name field. If you do not want to use the original naming convention consisting of the first letter of the first name and the whole surname, update the suggestion.

  5. In the Password/Confirm fields, enter the password and retype it for verification that your password is correct. The color bar placed below the fields shows you security level of the entered password.

    cockpit create new account

  6. Click Create to save the settings and close the dialog box.
  7. Select the newly created account.
  8. Select Server Administrator in the Roles item.

cockpit terminate session

Now you can see the new account in the Accounts settings and you can use the credentials to connect to the system.

2.4. Enforcing password expiration in Cockpit

By default, user accounts have set passwords to never expire. To enforce password expiration, as administrator, set system passwords to expire after a defined number of days.

When the password expires, the next login attempt will prompt for a password change.

Procedure

  1. Log in to the Cockpit interface.
  2. Click Accounts.
  3. Select the user account for which to enforce password expiration.
  4. In the user account settings, click Never expire password.
  5. In the Password Expiration dialog box, select Require password change every …​ days and enter a positive whole number representing the number of days when the password expires.

    cockpit passwd expiration settings

  6. Click Change.

To verify the settings, open the account settings. Cockpit displays a link with the date of expiration.

cockpit accounts require passwd change

2.5. Terminating user sessions in Cockpit

A user creates user sessions when logging into the system. Terminating user sessions means to log the user out from the system.

It can be helpful if you need to perform administrative tasks sensitive to configuration changes, for example, system upgrades.

In each user account in Cockpit you can terminate all sessions for the account except for the Cockpit session you are currently using. This prevents you from cutting yourself off the system.

Procedure

  1. Log in to the Cockpit interface.
  2. Click Accounts.
  3. Click the user account for which you want to terminate the session.
  4. Click the Terminate Session button.

    cockpit terminate session If the Terminate Session button is inactive, the user is not logged in the system.

Cockpit terminates the sessions.

Chapter 3. Configuring kdump in the web console

The following sections provide an overview of how to setup and test the kdump configuration through a web console called Cockpit. The console is contained in a default installation of Red Hat Enterprise Linux 8. Cockpit allows you to enable or disable starting the service at boot time, configure the reserved memory for kdump, and conveniently select the vmcore saving location in an uncompressed or compressed format.

3.1. Configuring kdump memory usage and target location in Cockpit

The procedure below shows you how to use the Kernel Dump tab in the Cockpit interface to configure the amount of memory that is reserved for the kdump kernel. The procedure also describes how to specify the target location of the vmcore dump file and how to test your configuration.

Procedure

  1. Open the Kernel Dump tab and start the kdump service.
  2. Configure the kdump memory usage through the command line.
  3. Click the link next to the Crash dump location option.

    cockpit initial screen
  4. Select the Local Filesystem option from the drop-down and specify the directory you want to save the dump in.

    cockpit crashdump target
    Note

    Tick the Compression check box to reduce the size of the vmcore dump file.

  5. Test your configuration by crashing the kernel.

    cockpit test kdump config

Additional resources

Chapter 4. Using Cockpit for managing virtual machines

You can use the Cockpit interface to manage virtual machines. The following sections describe Cockpit’s virtualization management capabilities and provide instructions for using them.

4.1. Virtual machine management in Cockpit

Cockpit is a web-based interface for administering servers. It provides a graphical view of the virtual machines on the servers to which Cockpit can connect, and allows monitoring system resources and adjusting configuration with ease. With the installation of a Cockpit plug-in, Cockpit can be used to manage virtual machines on the servers to which Cockpit can connect.

Using Cockpit for virtual machine management, you can do the following:

  • Create and delete virtual machines
  • Install operating systems on virtual machines
  • Run and shut down virtual machines
  • View information about virtual machines
  • Create and attach disks to virtual machines
  • Configure virtual CPU settings for virtual machines
  • Manage virtual network interfaces
  • Interact with virtual machines using virtual machine consoles
Note

In RHEL 8, Cockpit is the default graphical management tool for virtual machines, because the Virtual Machine Manager has been deprecated. However, the Virtual Machine Manager is still supported in RHEL 8.

4.2. Setting up Cockpit to manage virtual machines

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Prerequisites

  • Ensure that Cockpit is installed on your machine.
$ yum info cockpit
Installed Packages
Name         : cockpit
[...]

Procedure

  1. Install the libvirt-dbus package.

    # yum install libvirt-dbus

  2. Install the cockpit-machines plug-in.

    # yum install cockpit-machines

    If the installation is successful, Virtual Machines appears in the Cockpit side menu.

cockpit vms info

4.3. Creating virtual machines and installing operating systems using Cockpit

Using Cockpit, you can create virtual machines and install operating systems on virtual machines. You can also delete virtual machines.

4.3.1. Creating virtual machines using Cockpit

You can create virtual machines using Cockpit.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure

You can create a virtual machine on the machine to which Cockpit is connected.

  1. Click Create New VM.

    The Create New Virtual Machine dialog appears.

    cockpit create new vm
  2. Enter the basic configuration of the virtual machine you want to create.

    • Name - The name of the virtual machine.
    • Installation Source Type - The type of the installation source: Filesystem, URL
    • Installation Source - The path or URL that points to the installation source.
    • OS Vendor - The vendor of the virtual machine’s operating system.
    • Operating System - The virtual machine’s operating system.
    • Memory - The amount of memory with which to configure the virtual machine.
    • Storage Size - The amount of storage space with which to configure the virtual machine.
    • Immediately Start VM - Whether or not the virtual machine will start immediately after it is created.
  3. Click Create.
    The virtual machine is created and will start immediately if the Immediately Start VM checkbox is selected.

You must install the operating system the first time the virtual machine is run.

Additional resources

4.3.2. Installing operating systems using Cockpit

You can install an operating system on virtual machines using Cockpit.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure

The first time a virtual machine loads, you must install an operating system on the virtual machine.

  • Click Install.
    The installation routine of the operating system runs in the virtual machine console.
Note

If the Immediately Start VM checkbox in the Create New Virtual Machine dialog is checked, the installation routine of the operating system starts automatically when the virtual machine is created.

Note

If the installation routine fails, the virtual machine must be deleted and recreated.

4.3.3. Deleting virtual machines using Cockpit

You can delete virtual machines and their associated storage files.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure

You can delete a virtual machine from the host to which Cockpit is connected.

  1. Click a row with the name of the virtual machine you want to delete.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Delete.
    A confirmation dialog appears.

    cockpit vm delete confirm
  3. If you want to delete all or some of the storage files associated with the virtual machine, select the checkboxes next to the storage files you want to delete.
  4. Click Delete.
    The virtual machine and any selected associated storage files are deleted.

4.4. Powering up and powering down virtual machines using Cockpit

Using Cockpit, you can run, shut down, and restart virtual machines. You can also send a non-maskable interrupt to a virtual machine that is unresponsive.

4.4.1. Powering up virtual machines in Cockpit

You can run a selected virtual machine.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure

If a virtual machine is in the shut off state, you can start it.

  1. Click a row with the name of the virtual machine you want to start.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Run.
    The virtual machine starts.
Additional resources

4.4.2. Powering down virtual machines in Cockpit

You can shut down a selected virtual machine.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure

If a virtual machine is in the running state, you can shut it down.

  1. Click a row with the name of the virtual machine you want to shut down.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Shut Down.
    The virtual machine shuts down.
Note

If the virtual machine does not shut down, click the arrow next to the Shut Down button and select Force Shut Down.

Additional resources

4.4.3. Restarting virtual machines using Cockpit

You can restart a selected virtual machine.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure

If a virtual machine is in the running state, you can restart it.

  1. Click a row with the name of the virtual machine you want to restart.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Restart.
    The virtual machine shuts down and restarts.
Note

If the virtual machine does not restart, click the arrow next to the Restart button and select Force Restart.

4.4.3.1. Additional resources

4.4.4. Sending non-maskable interrupts to virtual machines using Cockpit

You can send a non-maskable interrupt (NMI) to a selected virtual machine that becomes unresponsive.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure

If a virtual machine is in the running state but is unresponsive, you can send it an NMI.

  1. Click a row with the name of the virtual machine to which you want to send an NMI.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Clickthe arrow next to the Shut Down button and select Send Non-Maskable Interrupt.
    An NMI is sent to the virtual machine.

4.4.4.1. Additional resources

4.5. Viewing virtual machine information using Cockpit

Using Cockpit, you can view information about the virtual machines to which Cockpit is connected.

4.5.1. Viewing virtual machine information in Cockpit

The following describes how to view state and connection information about the virtual machines to which the Cockpit session is connected.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure

To view connection and state information for the virtual machines to which Cockpit is attached.

  • Click Virtual Machines in the Cockpit side menu.
    Information about the virtual machines to which the Cockpit session is connected appears.
cockpit vms info

The information includes the following:

  • Name - The name of the virtual machine.
  • Connection - The type of libvirt connection, system or session.
  • State - The state of the virtual machine.

4.5.1.1. Additional resources

4.5.2. Viewing basic virtual machine information in Cockpit

The following describes how to view basic information about a selected virtual machine to which the Cockpit session is connected.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure

To view basic information about a selected virtual machine.

  • Click a row with the name of the virtual machine whose information you want to see.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
Note

If another tab is selected, click Overview.

cockpit basic vm info

The information includes the following:

  • Memory - The amount of memory assigned to the virtual machine.
  • Emulated Machine - The machine type emulated by the virtual machine.
  • vCPUs - The number of virtual CPUs configured for the virtual machine.

    Note

    To see more detailed virtual CPU information and configure the virtual CPUs configured for a virtual machine, see Section 4.6.1, “Configuring virtual CPUs for virtual machines using Cockpit”.

  • Boot Order - The boot order configured for the virtual machine.
  • CPU Type - The architecture of the virtual CPUs configured for the virtual machine.
  • Autostart - Whether or not autostart is enabled for the virtual machine.

4.5.2.1. Additional resources

4.5.3. Viewing virtual machine resource usage in Cockpit

The following describes how to view resource usage information about a selected virtual machine to which the Cockpit session is connected.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure

To view information about the memory and virtual CPU usage of a selected virtual machine.

  1. Click a row with the name of the virtual machine whose information you want to see.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Usage.
    The Usage pane appears with information about the memory and virtual CPU usage of the virtual machine.
cockpit resource usage

4.5.3.1. Additional resources

4.5.4. Viewing virtual machine disk information in Cockpit

The following describes how to view disk information about a virtual machine to which the Cockpit session is connected.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure

To view disk information about a selected virtual machine.

  1. Click a row with the name of the virtual machine whose information you want to see.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Disks.
    The Disks pane appears with information about the disks assigned to the virtual machine.
cockpit disk info

The information includes the following:

  • Device - The device type of the disk.
  • Target - The controller type of the disk.
  • Used - The amount of the disk that is used.
  • Capacity - The size of the disk.
  • Bus - The bus type of the disk.
  • Readonly - Whether or not the disk is read-only.
  • Source - The disk device or file.

4.5.4.1. Additional resources

4.5.5. Viewing virtual NIC information in Cockpit

The following describes how to view information about the virtual network interface cards (vNICs) on a selected virtual machine:

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure

To view information about the virtual network interface cards (NICs) on a selected virtual machine.

  1. Click a row with the name of the virtual machine whose information you want to see.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Networks.
    The Networks pane appears with information about the virtual NICs configured for the virtual machine.
cockpit vNIC info

The information includes the following:

  • Type - The type of network interface for the virtual machine. Types include direct, network, bridge, ethernet, hostdev, mcast, user, and server.
  • Model type - The model of the virtual NIC.
  • MAC Address - The MAC address of the virtual NIC.
  • Source - The source of the network interface. This is dependent on the network type.
  • State - The state of the virtual NIC.

4.5.5.1. Additional resources

4.6. Managing virtual CPUs using Cockpit

Using Cockpit, you can manage the virtual CPUs configured for the virtual machines to which Cockpit is connected. You can view information about the virtual machines. You can also configure the virtual CPUs for virtual machines.

4.6.1. Configuring virtual CPUs for virtual machines using Cockpit

You can configure the number of virtual CPUs and other virtual CPU parameters for a virtual machine using Cockpit.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure
  1. Click a row with the name of the virtual machine for which you want to view and configure virtual CPU parameters.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine, including the number of virtual CPUs, and controls for shutting down and deleting the virtual machine.
  2. Click the number of vCPUs in the Overview pane.
    The vCPU Details dialog appears.

    cockpit configure vCPUs

  3. Configure the virtual CPUs for the selected virtual machine.

    • vCPU Count - Enter the number of virtual CPUs for the virtual machine.

      Note

      The vCPU count cannot be greater than the vCPU Maximum.

    • vCPU Maximum - Enter the maximum number of virtual CPUs that can be configured for the virtual machine.
    • Sockets - Select the number of sockets to expose to the virtual machine.
    • Cores per socket - Select the number of cores for each socket to expose to the virtual machine.
    • Threads per core - Select the number of threads for each core to expose to the virtual machine.
  4. Click Apply.

    The virtual CPUs for the virtual machine are configured.

    Note

    Changes to the virtual CPU settings only take effect after the virtual machine is stopped and restarted.

4.7. Managing virtual machine disks using Cockpit

Using Cockpit, you can manage the disks configured for the virtual machines to which Cockpit is connected.

You can:

4.7.1. Viewing virtual machine disk information in Cockpit

The following describes how to view disk information about a virtual machine to which the Cockpit session is connected.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure

To view disk information about a selected virtual machine.

  1. Click a row with the name of the virtual machine whose information you want to see.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Disks.
    The Disks pane appears with information about the disks assigned to the virtual machine.
cockpit disk info

The information includes the following:

  • Device - The device type of the disk.
  • Target - The controller type of the disk.
  • Used - The amount of the disk that is used.
  • Capacity - The size of the disk.
  • Bus - The bus type of the disk.
  • Readonly - Whether or not the disk is read-only.
  • Source - The disk device or file.

4.7.1.1. Additional resources

4.7.2. Adding new disks to virtual machines using Cockpit

You can add new disks to virtual machines by creating a new disk (storage pool) and attaching it to a virtual machine using Cockpit.

Note

You can only use directory-type storage pools when creating new disks for virtual machines using Cockpit.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure
  1. Click a row with the name of the virtual machine for which you want to create and attach a new disk.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Disks.
    The Disks pane appears with information about the disks configured for the virtual machine.

    cockpit disk info

  3. Click Add Disk.
    The Add Disk dialog appears. cockpit add disk
  4. Ensure that the Create New option button is selected.
  5. Configure the new disk.

    • Pool - Select the storage pool from which the virtual disk will be created.
    • Target - Select a target for the virtual disk that will be created.
    • Name - Enter a name for the virtual disk that will be created.
    • Size - Enter the size and select the unit (MiB or GiB) of the virtual disk that will be created.
    • Format - Select the format for the virtual disk that will be created. Supported types: qcow2, raw
    • Attach permanently - Whether or not the virtual disk will be persistent. If checked, the virtual disk is persistent. If not checked, the virtual disk is not persistent.
Note

When adding a new disk to a virtual machine that is not running, the Attach permanently check box does not appear. Only persistent virtual disks can be added to virtual machines that are not running.

  1. Click Add.

    The virtual disk is created and connected to the virtual machine.

Additional resources

4.7.3. Attaching existing disks to virtual machines using Cockpit

The following describes how to attach existing disks to a virtual machine using Cockpit.

Note

You can only attach directory-type storage pools to virtual machines using Cockpit.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure
  1. Click a row with the name of the virtual machine to which you want to attach an existing disk.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Disks.
    The Disks pane appears with information about the disks configured for the virtual machine.

    cockpit disk info

  3. Click Add Disk.
    The Add Disk dialog appears. cockpit add disk
  4. Click the Use Existing option button.
    The appropriate configuration fields appear in the Add Disk dialog. cockpit attach disk
  5. Configure the disk for the virtual machine.

    • Pool - Select the storage pool from which the virtual disk will be attached.
    • Target - Select a target for the virtual disk that will be attached.
    • Volume - Select the storage volume that will be attached.
    • Attach Permanently - Check to make the virtual disk persistent. Clear to make the virtual disk transient.
  6. Click Add

    The selected virtual disk is attached to the virtual machine.

Additional resources

4.7.4. Detaching disks from virtual machines

The following describes how to detach disks from virtual machines using Cockpit.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure
  1. Click a row with the name of the virtual machine from which you want to detach an existing disk.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Disks.
    The Disks pane appears with information about the disks configured for the virtual machine.

    cockpit disk info

  3. Click icon detach disk next to the disk you want to detach from the virtual machine.

    The virtual disk is detached from the virtual machine.

Caution

There is no confirmation before detaching the disk from the virtual machine.

Additional resources

4.8. Using Cockpit for managing virtual machine vNICs

Using Cockpit, you can manage the virtual network interface cards (vNICs) configured for the virtual machines to which Cockpit is connected. You can view information about vNICs. You can also connect and disconnect vNICs from virtual machines.

4.8.1. Viewing virtual NIC information in Cockpit

The following describes how to view information about the virtual network interface cards (vNICs) on a selected virtual machine:

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure

To view information about the virtual network interface cards (NICs) on a selected virtual machine.

  1. Click a row with the name of the virtual machine whose information you want to see.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Networks.
    The Networks pane appears with information about the virtual NICs configured for the virtual machine.
cockpit vNIC info

The information includes the following:

  • Type - The type of network interface for the virtual machine. Types include direct, network, bridge, ethernet, hostdev, mcast, user, and server.
  • Model type - The model of the virtual NIC.
  • MAC Address - The MAC address of the virtual NIC.
  • Source - The source of the network interface. This is dependent on the network type.
  • State - The state of the virtual NIC.

4.8.1.1. Additional resources

4.8.2. Connecting virtual NICs in Cockpit

Using Cockpit, you can connect virtual network interface cards (NICs) configured for a selected virtual machine.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure

If a virtual NIC is disconnected from the selected virtual machine, you can reconnect it.

  1. Click a row with the name of the virtual machine whose virtual NIC you want to connect.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Networks.
    The Networks pane appears with information about the virtual NICs configured for the virtual machine.

    cockpit vNIC plug

  3. Click Plug in the row of the virtual NIC you want to connect.
    The selected virtual NIC connects to the virtual machine.

4.8.3. Disconnecting virtual NICs in Cockpit

Using Cockpit, you can disconnect the virtual network interface cards (NICs) configured for a selected virtual machine.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure

If a virtual NIC is connected to the selected virtual machine, you can disconnect it.

  1. Click a row with the name of the virtual machine whose virtual NIC you want to disconnect.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Networks.
    The Networks pane appears with information about the virtual NICs configured for the virtual machine.

    cockpit vNIC info
  3. Click Unplug in the row of the virtual NIC you want to disconnect.
    The selected virtual NIC disconnects from the virtual machine.

4.9. Viewing virtual machine consoles using Cockpit

Using Cockpit, you can view the virtual machine’s consoles. These include both graphical and serial consoles.

4.9.1. Viewing the virtual machine graphical console in Cockpit

You can view the graphical console of a selected virtual machine in Cockpit. The virtual machine console shows the graphical output of the virtual machine.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure
  1. Click a row with the name of the virtual machine whose graphical console you want to view.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Consoles.
    The graphical console appears in the Cockpit pane.

.

cockpit graphical console in cockpit

You can interact with the virtual machine console using the mouse and keyboard in the same manner you interact with a real machine. The display in the virtual machine console reflects the activities being performed on the virtual machine.

The server on which Cockpit is running can intercept specific key combinations preventing them from being sent to the virtual machine. To send the Ctrl+Alt+Del combination to the virtual machine, click Ctrl+Alt+Del.

From the virtual machine pane, click the Send key menu and select the key sequence to send.

Additional Resources

4.9.2. Viewing virtual machine consoles in remote viewers using Cockpit

You can view the virtual machine’s consoles in a remote viewer. The connection can be made by Cockpit or manually.

4.9.2.1. Viewing the graphical console in a remote viewer

You can view the graphical console of a selected virtual machine in a remote viewer. The virtual machine console shows the graphical output of the virtual machine.

You can launch Virt Viewer from within Cockpit.

Prerequisites
  • Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

    Note

    If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

  • Before you can view the graphical console in Virt Viewer, Virt Viewer must be installed on the machine to which Cockpit is connected. To view information on installing Virt Viewer, select the Graphics Console in Desktop Viewer Console Type and click More Information in the Consoles window.

    cockpit install vv info
Note

Some browser extensions and plug-ins do not allow Cockpit to open Virt Viewer.

Procedure
  1. Click a row with the name of the virtual machine whose graphical console you want to view.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Consoles.
    The graphical console appears in the Cockpit window.
  3. Select the Graphics Console in Desktop Viewer Console Type.

    cockpit launch graphical console in vv
  4. Click Launch Remote Viewer.
    The graphical console appears in Virt Viewer.

    cockpit graphical console in virt viewer

You can interact with the virtual machine console using the mouse and keyboard in the same manner you interact with a real machine. The display in the virtual machine console reflects the activities being performed on the virtual machine.

The server on which Cockpit is running can intercept specific key combinations (for example, Ctrl+Alt+F1) to prevent them from being sent to the virtual machine. You can use the menu:Send key menu to send these sequences. From the virtual machine window, click the menu:Send key menu and select the key sequence to send. In addition, from this menu you can also capture the screen output.

Additional Resources

4.9.2.2. Viewing the graphical console in a remote viewer connecting manually

You can view the graphical console of a selected virtual machine in a remote viewer. The virtual machine console shows the graphical output of the virtual machine.

Cockpit provides the information necessary to launch any SPICE or VNC viewer to view the virtual machine console.

Prerequisites
  • Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

    Note

    If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

  • Before you can view the graphical console in a remote viewer, ensure that a SPICE or VNC viewer application is installed on the machine to which Cockpit is connected. To view information on installing Virt Viewer, select the Graphics Console in Desktop Viewer Console Type and click More Information in the Consoles window.

    cockpit install vv info
Procedure

You can view the virtual machine graphics console in any SPICE or VNC viewer application.

  1. Click a row with the name of the virtual machine whose graphical console you want to view.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Consoles.
    The graphical console appears in the Cockpit window.
  3. Select the Graphics Console in Desktop Viewer Console Type.
    The following Manual Connection information appears on the right side of the pane.

    cockpit manual viewer info
  4. Enter the information in the SPICE or VNC viewer.

For more information, see the documentation for the SPICE or VNC viewer.

Additional Resources

4.9.3. Viewing the virtual machine serial console in Cockpit

You can view the serial console of a selected virtual machine in Cockpit.

Prerequisites

Before using Cockpit to manage virtual machines, you must install the Cockpit virtual machine plug-in.

Note

If the Cockpit plug-in is not installed, see Section 4.2, “Setting up Cockpit to manage virtual machines” for information about installing the Cockpit virtual machine plug-in.

Procedure
  1. Click a row with the name of the virtual machine whose serial console you want to view.
    The row expands to reveal the Overview pane with basic information about the selected virtual machine and controls for shutting down and deleting the virtual machine.
  2. Click Consoles.
    The graphical console appears in the Cockpit pane.
  3. Select the Serial Console Console Type.
    The serial console appears in the Cockpit pane.

    cockpit serial console in cockpit

You can disconnect and reconnect the serial console from the virtual machine.

  • To disconnect the serial console from the virtual machine, click Disconnect.
  • To reconnect the serial console to the virtual machine, click Reconnect.
Additional Resources

Legal Notice

Copyright © 2018 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.