Update libvirt/KVM guest virtual machine templates

March 1, 2020 in memos.

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.

Tags: