Controlling Hosted-Engine With Virsh.
What is Virsh?
A toolkit for managing virtual shell or virsh virtualization platforms. It is a flexible command line utility for managing virtual machines (VMs) controlled by the API libvirt. It is the default management tool for Linux kernel-based virtual machines (KVMs) and also supports Xen, VMware, and other platforms.
Click here for more information about Virsh on libvirt.org.
Bug alert for RHEL 9 and compatible systems.
RHEL 9 – LVM – Devices file sys_wwid nvme. PVID last seen on not found. Click here for the solution.
oVirt Hosted-Engine and Virsh
When you want to interfere with hosted-engine vm with Virsh, it asks you to log in, but neither admin nor root accounts work.
Here’s the remedy
To circumvent the problem, you need to log in as follows.
virsh -c qemu:///system?authfile=/etc/ovirt-hosted-engine/virsh_auth.conf
You can access the details of the commands using the Help parameter.
Examples
Since the following four commands are self-explanatory, I will not write further explanations.
hosted-engine --help
hosted-engine --vm-shutdown
hosted-engine --vm-status
hosted-engine --vm-start
Entering and exiting the maintenance mode.
hosted-engine --set-maintenance --mode=global
hosted-engine --set-maintenance --mode=none
Sending commands from console.
hosted-engine --console
Full backup. Server must be in maintenance mode.
engine-backup --scope=all --mode=backup --file=/root/full_he_backup.tar --log=/root/full_he_backup.log
Database backup. Server must be in maintenance mode.
engine-backup --scope=files --scope=db --mode=backup --file=/root/db__he_backup.tar --log=/root/db__he_backup.log