7.3. Updating Software in Virtual Machines

To keep software in your virtual machines up to date, you can use the same means you would use on standalone computers running the corresponding operating systems:

  • In Linux-based virtual machines, you can use the native Linux updaters (up2date, yum, or yast).
  • In Windows-based virtual machines, you can use the native Windows updaters (e.g., the Windows Update tool).

7.3.1. Updating Virtuozzo Guest Tools in Virtual Machines

Starting from Virtuozzo 7.0.4 (Update 4), Virtuozzo guest tools in virtual machines are updated automatically via a weekly cron job that starts the vz-guest-tools-updater tool.

The following requirements must be met:

  • The vz-guest-tools-updater package must be installed on the node.
  • The virtual machine must have the --tools-autoupdate parameter set to on (this is the default behavior).

Note

Starting from Virtuozzo 7.0.7 (Update 7), guest tools are also automatically installed in virtual machines on their next start (see Installing Virtuozzo Guest Tools). To disable automatic installation of guest tools, set the InstallTools parameter to false in the /etc/vz/tools-update.conf configuration file.

The vz-guest-tools-updater tool builds a list of VMs with the enabled --tools-autoupdate parameter and outdated guest tools. After that, a 5-minute timer triggers simultaneous guest tools update in a configurable number of VMs. If an update attempt fails, the tool will queue that VM for another try. If the second attempt fails, the VM’s guest tools will be left outdated.

Warning

During the update, Virtuozzo guest tools image is forcibly mounted to VM’s optical disk drive even if it is already in use.

Windows virtual machines need to be restarted to complete the update of guest tools. On every such update, administrators inside these VMs receive a reboot notification upon login or immediately if they are logged in.

You can configure the number of VMs whose guest tools are to be updated simultaneously by changing the value of the MaxVMs parameter in the /etc/vz/tools-update.conf configuration file.

To check the update status of guest tools in one or more VMs, use the --get-state option for the vz-guest-tools-updater tool and specify VM names in a sequence. For example:

# vz-guest-tools-updater --get-state <VM1_name> [<VM2_name> ...]

If the guest tools in the given virtual machine are up to date, the command output will be as follows:

{<VM_UUID>} (<VM_name>): Tools are up to date

To disable automatic updating of Virtuozzo guest tools for a VM, run the following command:

# prlctl set <VM_name> --tools-autoupdate off

To manually update guest tools in one or more VMs, start the vz-guest-tools-updater script by specifying VM names in a sequence. For example:

# vz-guest-tools-updater <VM1_name> [<VM2_name> ...]