Forcing Xen ACPI shutdown

Software

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#
# ruben-moose.pl birdistheword --force

Author bio and support

Me!

Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person. Hi!

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

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.