After creating a template with the Linux family of operating systems, it is recommended to check it. Recommended check sequence:
- Create a virtual machine (VM) with the OS from the template being checked.
- Check the repositories.
- 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.
- Delete the VM.
The article contains a list of actions to be performed at each step of the check.
Create a VM
- 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".
- Connect to the VM via SSH.
-
Check the OS version:
cat /etc/os-release
Check the repositories
Check that the OS is using the correct repositories:
- Connect to the VM via SSH.
-
Run the command:
Debian based OScat /etc/apt/sources.list
Red Hat based OSyum -v repolist || dnf -v repolist
Run operations with the VM
Stop and start
- Enter Virtual machines → select the VM → menu → Stop. The VM status should change to "Stopped".
- 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
- Enter Virtual machines → select the VM → menu → Reinstall OS.
- In the Operating system section, select the OS from the template being checked.
- 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
- Run the mode following the instructions in the article Recovery mode. The VM should get the sub-status "In recovery mode".
- 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
- Mount the image following the instructions in the article Mounting an ISO image. When connected, enable the Boot virtual machine from the ISO option.
- Connect to the VM via VNC or SPICE. Verify that the VM is uploaded from an ISO image.
- Unmount the image following the instructions in the articled Mounting an ISO image. When disconnecting, disable the OS has been reinstalled option.
- 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
- Enter Virtual machines → select the VM → menu → Change password → enter or generate a new password → click Save.
- Connect to the VM via SSH with a new password.
Cloning
- Connect to the VM via SSH.
-
Create a test.txt file in the user's directory:
echo "Hello, World!" > test.txt
- 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".
- Start the cloned VM: Virtual machines → select the VM → menu → Start. The VM status should change to "Active".
- Connect to the cloned VM via SSH.
-
Verify that the test.txt file contains the text "Hello, World!":
cat test.txt
- Delete the cloned VM.
- Connect to the original VM via SSH.
-
Delete the test.txt file:
rm test.txt
Create a backup and restore the VM
- Create a backup following the instructions in the article Creating backups manually.
- Connect to the VM via SSH.
-
Create a test.txt file in the user's directory:
echo "Hello, World!" > test.txt
- Restore the VM from a backup: Virtual machines → select the VM → click Parameters → Backups tab → in the line with the backup, click restore.
- Connect to the VM via SSH.
-
Verify that there is no test.txt file in the user's directory:
ls -la
Create a snapshot and restore the VM
- Create a snapshot following the instructions in the article Snapshots of virtual machines.
- Connect to the VM via SSH.
-
Create a test.txt file in the user's directory:
echo "Hello, World!" > test.txt
- Recover the VM following the instructions in the article Snapshots of virtual machines.
- Connect to the VM via SSH.
-
Verify that there is no test.txt file in the user's directory:
ls -la
Create an image and restore the VM
- Connect to the VM via SSH.
-
Create a test.txt file in the user's directory:
echo "Hello, World!" > test.txt
- Create an image following the instructions in the article Creating a disk image. When creating, disable the Anonymize the image option.
- Create a VM from the image following the instructions in the article Creating a virtual machine.
- Connect via SSH to the VM created from the image.
-
Verify that the test.txt file contains the text "Hello, World!":
cat test.txt
- Delete the VM created from the image.
- Connect to the original VM via SSH.
-
Delete the test.txt file:
rm test.txt
Run a script on the VM
- Create a script following the instructions in the article Creating a script for the VM. When creating, specify the following:
- OS tags that match the template tags.
- Script type Shell.
-
Script code:
echo "Hello, World!" > test.txt
- Run the script on the VM following the instructions in the article Running scripts on the VM.
- Connect to the VM via SSH.
-
Verify that the test.txt file contains the text "Hello, World!":
cat /test.txt
-
Delete the test.txt file:
rm /test.txt
Edit resources with a reboot
- Enter Virtual machines → select the VM → menu → Change resources.
- Verify that the Add resources without restarting the VM option is disabled.
- Increase the vCPU, RAM, and Storage values.
- Click the Change and restart button. The VM status will change to "Stopped" and then to "Active".
- Connect to the VM via SSH.
-
Verify that the number of vCPUs matches the set value:
nproc
-
Verify that the size of RAM matches the set value:
free -h
-
Verify that the disk size matches the Storage setting:
df -h
Edit resources without a reboot
- Connect to the VM via SSH.
- Enter Virtual machines → select the VM → click Parameters → Fine-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".
- Enter Virtual machines → select the VM → menu → Change resources.
- Increase the vCPU value.
- Increase the RAM value by a multiple of 1024 MB.
- Click Edit. Verify that the VM has not rebooted and the SSH connection has not been terminated.
-
Verify that the number of vCPUs matches the set value:
nproc
-
Verify that the size of RAM matches the set value:
free -h
Add and delete virtual disks
- Connect the new disk to the VM following the instructions in this article Managing VM disks.
- Connect to the VM via SSH.
-
Check for the presence of a disk in the command output:
fdisk -l
- Delete the disk following the instructions in this article Managing VM disks.
- Connect to the VM via SSH.
-
Verify that there is no disk in the command output:
fdisk -l
Add and delete an IP address
- Add an IP address to the VM following the instructions in the article Managing VM IP addresses.
- Connect to the VM via SSH.
-
Check for the added IP address in the command output:
ip a
- Delete the IP address following the instructions in the article Managing VM IP addresses.
-
Verify that there is no deleted IP address in the command output:
ip a
Check the recovery of QEMU Guest Agent
- Connect to the VM via SSH.
-
Stop the QEMU Guest Agent software:
systemctl stop qemu-guest-agent
- 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".
- Connect to the VM via SSH.
-
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".