Managing guest tools – LS Cloud

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:
    1. Download the Windows guest tools ISO image provided by your system administrator or download vz-guest-tools-win.iso from the official repository.
    2. 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.
    3. Go to the mounted optical drive in Explorer and install the guest tools by running setup.exe.
    4. After the installation is complete, restart the VM.
  • Inside a Linux VM:
    1. Download the Linux guest tools ISO image provided by your system administrator or download vz-guest-tools-lin.iso from the official repository.
    2. 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:

    1. Remove the QEMU device drivers from the device manager.
      Important

      Do not remove the VirtIO/SCSI hard disk driver and NetKVM network driver. Without the former, the VM will not boot; without the latter, the VM will lose network connectivity.

    2. Uninstall the QEMU guest agent and guest tools from the list of installed applications.
    3. Stop and delete Guest Tools Monitor:
      > sc stop VzGuestToolsMonitor
      > sc delete VzGuestToolsMonitor
      
    4. Unregister Guest Tools Monitor from Event Log:
      > reg delete HKLMSYSTEMCurrentControlSetserviceseventlogApplication\
      VzGuestToolsMonitor
      
    5. Delete the autorun registry key for RebootNotifier:
      > reg delete HKLMSOFTWAREMicrosoftWindowsCurrentVersionRun /v 
      VzRebootNotifier
      
    6. Delete the C:Program FilesQemu-ga directory.
      If VzGuestToolsMonitor.exe is locked, close all the Event Viewer windows. If it remains locked, restart the eventlog service:

      > sc stop eventlog
      > sc start eventlog
      

    After removing the guest tools, restart the virtual machine.

  • Inside a Linux VM:

    1. 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.

    2. 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
      
    3. Reload the udev rules:
      # udevadm control --reload
      

    After removing guest tools, restart the virtual machine.

Share this:
FacebookTwitterWhatsAppViberCopy LinkTelegramLinkedIn
Updated on June 28, 2022
Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support