This section explains how to install and uninstall the guest tools. This functionality is required for creating consistent snapshots of a running VM’s disks.
Limitations
- Guest tools rely on the QEMU guest agent that is installed alongside the tools. The agent service must be running for the tools to work.
Prerequisites
- Virtual machines are created, as described in Creating virtual machines.
- The virtual machine has a guest operating system installed.
Installing guest tools
You can install the guest tools inside a virtual machine by using ISO images stored either in the official repository or on a compute node. The latter case includes additional steps performed by a user with the system administrator role.
- Inside a Windows VM:
- Download the Windows guest tools ISO image provided by your system administrator or download vz-guest-tools-win.iso from the official repository.
- Mount the image inside the VM.
- On Windows 8 or Windows Server 2012 or newer, you can natively mount an ISO image. To do this, right-click the guest tools ISO image and select Mount.
- On Windows 7 and Windows Server 2008, you need a third-party application to mount ISO images.
- Go to the mounted optical drive in Explorer and install the guest tools by running setup.exe.
- After the installation is complete, restart the VM.
- Inside a Linux VM:
- Download the Linux guest tools ISO image provided by your system administrator or download vz-guest-tools-lin.iso from the official repository.
- Create a mount point for the optical drive with the guest tools image and run the installer:
# mkdir /mnt/cdrom # mount <path_to_guest_tools_iso> /mnt/cdrom # bash /mnt/cdrom/install
Uninstalling guest tools
If you find out that the guest tools are incompatible with some software inside a virtual machine, you can uninstall them by doing the following:
-
Inside a Windows VM:
- Remove the QEMU device drivers from the device manager.
- Uninstall the QEMU guest agent and guest tools from the list of installed applications.
- Stop and delete Guest Tools Monitor:
> sc stop VzGuestToolsMonitor > sc delete VzGuestToolsMonitor
- Unregister Guest Tools Monitor from Event Log:
> reg delete HKLMSYSTEMCurrentControlSetserviceseventlogApplication\ VzGuestToolsMonitor
- Delete the autorun registry key for RebootNotifier:
> reg delete HKLMSOFTWAREMicrosoftWindowsCurrentVersionRun /v VzRebootNotifier
- Delete the C:Program FilesQemu-ga directory.
If VzGuestToolsMonitor.exe is locked, close all the Event Viewer windows. If it remains locked, restart theeventlog
service:> sc stop eventlog > sc start eventlog
After removing the guest tools, restart the virtual machine.
- Remove the QEMU device drivers from the device manager.
-
Inside a Linux VM:
- Remove the packages:
- On RPM-based systems (CentOS and other):
# yum remove dkms-vzvirtio_balloon prl_nettool qemu-guest-agent-vz vz-guest-udev
- On DEB-based systems (Debian and Ubuntu):
# apt-get remove vzvirtio-balloon-dkms prl-nettool qemu-guest-agent-vz vz-guest-udev
If any of the packages listed above are not installed on your system, the command will fail. In this case, exclude these packages from the command and run it again.
- On RPM-based systems (CentOS and other):
- Remove the files:
# rm -f /usr/bin/prl_backup /usr/share/qemu-ga/VERSION /usr/bin/install-tools /etc/udev/rules.d/90-guest_iso.rules /usr/local/bin/fstrim-static /etc/cron.weekly/fstrim
- Reload the
udev
rules:# udevadm control --reload
After removing guest tools, restart the virtual machine.
- Remove the packages: