Tuesday, September 02, 2008

Xen Error (22, "Invaid argument")

Occasionally, with enough regularity to be very annoying, a Xen guest that installs fails to start, throwing the error:
libvir: Xen Daemon error : POST operation failed: (xend.err "Error creating domain: (22, 'Invalid argument')")
error: Failed to start domain valhalla
I had little luck finding the nature of Error 22, until I hacked the code.

The error descriptions are listed in the phython control script, but are not passed to the user. All we get is Invalid argument. Gee, thanks.
# tail -70 /usr/lib/python2.4/site-packages/libvirt.py
--------- snip ---------
VIR_ERR_NO_SOURCE = 19
VIR_ERR_NO_TARGET = 20
VIR_ERR_NO_NAME = 21
VIR_ERR_NO_OS = 22
VIR_ERR_NO_DEVICE = 23
VIR_ERR_NO_XENSTORE = 24
VIR_ERR_DRIVER_FULL = 25
--- output truncated ---
Notice number 22: No OS. Okay, that I can deal with. It can't find the boot sector. All we need is a virtual rescue disk.

Stay tuned.

No comments:

Post a Comment