How to upgrade and/or reboot a KVM server.

How to upgrade the OS on a KVM server without messing everything up.

If you're also upgrading firmware, include the instructions in yellow boxes.
This guide assumes that you have already scheduled and agreed the downtime!

  • Pacify nagios for the KVM server and (as much as you can) for its guests.
  • A few guests may need to be stopped rather than suspended. Stop them now. Either shut them down as normal, or run:
    kvmtool shutdown --name guest
  • Check that the libvirt-guests service is running:
    systemctl status libvirt-guests
    The output should contain Active: active. If it doesn't, the libvirt-guests service isn't running, and you'll need to suspend the VMs yourself: list them with virsh list --all then suspend each one with virsh suspend, for instance virsh suspend monty.
  • If libvirt-guests is running then suspend the guests like this:
    systemctl stop libvirt-guests
    See the console for the individual suspend announcements. If you're just rebooting without significant software changes, there may be no need for this - just leave it to happen during the reboot.
  • Check that the guests are all down or suspended:
    virsh list --all
  • If you're expecting to need to do multiple reboots, adding this to the server's LCFG should stop the guests from automatically resuming or starting on subsequent boots:
    /* REMINDER: stop guests from resuming or starting automatically on server boot */
    !systemd.units mREMOVE(libvirtguests)
    !systemd.extraconfigs mREMOVE(waitlibvirtguests)
    !systemd.wanted_units_multiusertarget mREMOVE(libvirt-guests.service)
  • Make any LCFG changes needed to upgrade packages, e.g. upgrading to a new minor OS release.
  • Monitor /var/lcfg/log/client until the new profile has finished its configures.
  • Check that the pending software changes look right:
    om updaterpms run -- -t
  • Save a reboot by installing new software now:
    om updaterpms run -- -f
  • If you're upgrading iDRAC firmware, ensure that you are not connected to the serial console.
  • Boot the machine then do the firmware upgrades with dsu.
  • Edit the server's LCFG to remove the resources you added earlier.
  • Reboot.
  • Enter the BIOS.
  • Disable logical processors in the BIOS!
  • Make sure that all of the previously running VMs do resume properly. Their resume announcements should start appearing after the login prompt has appeared on the console at the end of the final reboot. If nothing happens, login and resume them with:
    systemctl start libvirt-guests
    The resume messages will appear on the console.
  • Start any previously stopped guests with
    kvmtool start guest
See also dsu, Lifecycle Controller and KVM service pages.
Topic revision: r23 - 12 Dec 2019 - 09:55:45 - StephenQuinney
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies