Update libvirt/KVM guest virtual machine templates

Published: 01 March 2020

Note: this article is old and may contain outdated or incorrect information.

virt-customize can be used to customize a virtual machine image by installing packages, editing configuration files, and so on. This is done by modifying the disk image in place.

Update the template

Run yum update to update the packages already installed in the template to their latest versions.

$ virt-customize --connect qemu:///system \
  -d centos7-gold \
  --selinux-relabel \
  --update

Adding --selinux-relabel is important if the guest image is using SELinux.