Forcing Xen ACPI shutdown


Xen's Panda mascot

If you’ve got a Xen domU misbehaving, you can force an ACPI shutdown with the -F option.

For example, say you have the following:

Name                  ID   Mem VCPUs  State Time(s)

location: sydney

location: sydney

To force shutdown domain 32:

# xl shutdown -F 32  
==> /usr/lib/xen-4.9/bin/xl: invalid option -- 'F'
==> unknown global option

Or at least, I thought we could. Since when was -F an invalid option? Surely it wasn’t a regression, or compatibility issue between the xm and xl toolstacks. I thought xl was broadly a drop-in replacement?

Hey, wait a minute:

# xl -F shutdown 32
==> Shutting down domain 32

I swear half my problems stem from misordered parameters. You should see me with dd when I’m alone at night, it’s late, and the decaf coffee failed to placebo effectavise. I’m fairly sure that isn’t a word.

In my defence, force is an action to be applied to shutdown, so it looks like it should follow. There’s also precedent for this order, for example:

# diskutil unmount force
# zfs umount -f
# luxadm remove_device -F enclosurename,[f|r]slot#
# birdistheword --force

Author bio and support


Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!