VMmanager: Administrator guide

Checking the OS Linux template

After creating a template with the Linux family of operating systems, it is recommended to check it. Recommended check sequence:

  1. Create a virtual machine (VM) with the OS from the template being checked.
  2. Check the repositories.
  3. Run operations with the VM:
    • stop and start;
    • reboot;
    • reinstalling OS;
    • connection via VNC;
    • connection via SPICE;
    • start and stop the recovery mode;
    • mount and unmount an ISO image;
    • migrate to another cluster node;
    • edit the superuser password;
    • cloning;
    • create a backup and restore the VM from that backup;
    • create a snapshot and restore the VM from that snapshot;
    • create an image and restore the VM from that image;
    • run a script on the VM;
    • edit resources with a reboot;
    • edit resources without a reboot;
    • add and delete virtual disks;
    • add and delete an IP address;
    • check the recovery of QEMU Guest Agent.
  4. Delete the VM.

The article contains a list of actions to be performed at each step of the check.

Create a VM

  1. Create a VM with the OS from the template being checked following the instructions from the article Creating a virtual machine. The VM should appear in the list with the status "Installing", then its status should change to "Active". 
  2. Connect to the VM via SSH.
  3. Check the OS version:

    cat /etc/os-release

Check the repositories

Check that the OS is using the correct repositories:

  1. Connect to the VM via SSH.
  2. Run the command:

    Debian based OS
    cat /etc/apt/sources.list
    Red Hat based OS
    yum -v repolist || dnf -v repolist

Run operations with the VM

Stop and start

  1. Enter Virtual machines → select the VM → menu → Stop. The VM status should change to "Stopped".
  2. Enter Virtual machines → select the VM →   menu → Start. The VM status should change to "Active".

Reboot

Enter Virtual machines → select the VM → menu → Restart. The VM status should change to "Restarting", then "Active".

Reinstall the OS


  1. Enter Virtual machines → select the VM →   menu → Reinstall OS
  2. In the Operating system section, select the OS from the template being checked.
  3. Click Reinstall. The VM status should change to "Reinstalling the OS" and then to "Active".

Connection via VNC

Connect to the VM following the instructions in the article VNC.

Connection via SPICE

Connect to the VM following the instructions in the article SPICE.

Start and stop the recovery mode

  1. Run the mode following the instructions in the article Recovery mode. The VM should get the sub-status "In recovery mode".
  2. Stop the mode following the instructions in the article Recovery mode. The VM should have its "In recovery mode" sub-status removed.

Mount and unmount an ISO image

  1. Mount the image following the instructions in the article Mounting an ISO image. When connected, enable the Boot virtual machine from the ISO option.
  2. Connect to the VM via VNC or SPICE. Verify that the VM is uploaded from an ISO image.
  3. Unmount the image following the instructions in the articled Mounting an ISO image. When disconnecting, disable the OS has been reinstalled option.
  4. Connect to the VM via SSH. Verify that the OS from the template being tested is booted on the VM.

Migrate to another cluster node

Perform a migration of the "Within cluster" type following the instructions in the article Migration of virtual machines. The VM status should change to "Migrating", then "Active". The "Node/Storage" column should display data about the node to which the VM was migrated.

Edit the superuser password

  1. Enter Virtual machines → select the VM →   menu → Change password → enter or generate a new password → click Save
  2. Connect to the VM via SSH with a new password.

Cloning

  1. Connect to the VM via SSH.
  2. Create a test.txt file in the user's directory:

    echo "Hello, World!" > test.txt
  3. Clone the VM: Virtual machines → select the VM →   menu → Clone. A new VM with the prefix _cloned and the status "Cloning" should appear in the list of VMs. The status of the cloned VM should then change to "Stopped".
  4. Start the cloned VM: Virtual machines → select the VM → menu → Start. The VM status should change to "Active".
  5. Connect to the cloned VM via SSH.
  6. Verify that the test.txt file contains the text "Hello, World!":

    cat test.txt
  7. Delete the cloned VM.
  8. Connect to the original VM via SSH.
  9. Delete the test.txt file:

    rm test.txt

Create a backup and restore the VM

  1. Create a backup following the instructions in the article Creating backups manually.
  2. Connect to the VM via SSH.
  3. Create a test.txt file in the user's directory:

    echo "Hello, World!" > test.txt
  4. Restore the VM from a backup: Virtual machines → select the VM → click Parameters → Backups tab → in the line with the backup, click restore.
  5. Connect to the VM via SSH.
  6. Verify that there is no test.txt file in the user's directory: 

    ls -la

Create a snapshot and restore the VM

  1. Create a snapshot following the instructions in the article Snapshots of virtual machines.
  2. Connect to the VM via SSH.
  3. Create a test.txt file in the user's directory:

    echo "Hello, World!" > test.txt
  4. Recover the VM following the instructions in the article Snapshots of virtual machines.
  5. Connect to the VM via SSH.
  6. Verify that there is no test.txt file in the user's directory:

    ls -la

Create an image and restore the VM

  1. Connect to the VM via SSH.
  2. Create a test.txt file in the user's directory:

    echo "Hello, World!" > test.txt
  3. Create an image following the instructions in the article Creating a disk image. When creating, disable the Anonymize the image option.
  4. Create a VM from the image following the instructions in the article Creating a virtual machine.
  5. Connect via SSH to the VM created from the image.
  6. Verify that the test.txt file contains the text "Hello, World!":

    cat test.txt
  7. Delete the VM created from the image.
  8. Connect to the original VM via SSH.
  9. Delete the test.txt file:

    rm test.txt

Run a script on the VM

  1. Create a script following the instructions in the article Creating a script for the VM. When creating, specify the following:
    1. OS tags that match the template tags.
    2. Script type Shell.
    3. Script code: 

      echo "Hello, World!" > test.txt
  2. Run the script on the VM following the instructions in the article Running scripts on the VM.
  3. Connect to the VM via SSH.
  4. Verify that the test.txt file contains the text "Hello, World!":

    cat /test.txt
  5. Delete the test.txt file:

    rm /test.txt

Edit resources with a reboot

  1. Enter Virtual machines → select the VM → menu → Change resources.
  2. Verify that the Add resources without restarting the VM option is disabled.
  3. Increase the vCPU, RAM, and Storage values.
  4. Click the Change and restart button. The VM status will change to "Stopped" and then to "Active".
  5. Connect to the VM via SSH.
  6. Verify that the number of vCPUs matches the set value:

    nproc
  7. Verify that the size of RAM matches the set value:

    free -h
  8. Verify that the disk size matches the Storage setting:

    df -h

Edit resources without a reboot

  1. Connect to the VM via SSH.
  2. Enter Virtual machines → select the VM → click ParametersFine-tuning settings section → enable the Add resources without restarting the VM option → click Change and restart. The VM status will change to "Stopped" and then to "Active".
  3. Enter Virtual machines → select the VM → menu → Change resources.
  4. Increase the vCPU value.
  5. Increase the RAM value by a multiple of 1024 MB.
  6. Click Edit. Verify that the VM has not rebooted and the SSH connection has not been terminated.
  7. Verify that the number of vCPUs matches the set value:

    nproc
  8. Verify that the size of RAM matches the set value:

    free -h

Add and delete virtual disks

  1. Connect the new disk to the VM following the instructions in this article Managing VM disks.
  2. Connect to the VM via SSH.
  3. Check for the presence of a disk in the command output: 

    fdisk -l
  4. Delete the disk following the instructions in this article Managing VM disks.
  5. Connect to the VM via SSH.
  6. Verify that there is no disk in the command output:

    fdisk -l

Add and delete an IP address

  1. Add an IP address to the VM following the instructions in the article Managing VM IP addresses.
  2. Connect to the VM via SSH.
  3. Check for the added IP address in the command output:

    ip a
  4. Delete the IP address following the instructions in the article Managing VM IP addresses.
  5. Verify that there is no deleted IP address in the command output:

    ip a

Check the recovery of QEMU Guest Agent

  1. Connect to the VM via SSH.
  2. Stop the QEMU Guest Agent software:

    systemctl stop qemu-guest-agent
  3. Enter Virtual machines → select the VM → click on the message "Problem with Guest Agent" → button Install GA and restart VM. The VM status will change to "Stopped" and then to "Active".
  4. Connect to the VM via SSH.
  5. Check the status of the QEMU Guest Agent software:

    systemctl status qemu-guest-agent

Delete the VM

Enter Virtual machines → select the VM →   menu → Delete. The VM status should change to "Deleting" and then to "Deleted".