03 March 2013

Debian BUG XEN: NameError: name 'output_directory' is not defined

On a new Debian Squeeze installation I got the following errors when starting a VM:
Using to parse /boot/grub/menu.lst
Traceback (most recent call last):
File "/usr/lib/xen-default/bin/pygrub", line 705, in
output_directory, not_really)
NameError: name 'output_directory' is not defined

[2013-03-03 05:52:58 1270] DEBUG (XendDomainInfo:101) XendDomainInfo.create(['vm', ['name', 'not_relevant'], ['memory', '1024'], ['on_poweroff', 'destroy'], ['on_reboot', 'restart'], ['on_crash', 'restart'], ['on_xend_start', 'ignore'], ['on_xend_stop', 'ignore'], ['vcpus', '2'], ['oos', 1], ['bootloader', '/usr/lib/xen-default/bin/pygrub'], ['bootloader_args', '-q'], ['image', ['linux', ['root', '/dev/xvda1 ro'], ['videoram', 4], ['tsc_mode', 0], ['nomigrate', 0]]], ['s3_integrity', 1], ['device', ['vbd', ['uname', 'phy:/dev/vg00/not_relevant-disk'], ['dev', 'xvda1'], ['mode', 'w']]], ['device', ['vif', ['ip', '1.2.3.4'], ['mac', '00:16:3E:F6:31:8C'], ['bridge', 'br0']]]])
[2013-03-03 05:52:58 1270] DEBUG (XendDomainInfo:2508) XendDomainInfo.constructDomain
[2013-03-03 05:52:58 1270] DEBUG (balloon:220) Balloon: 32145744 KiB free; need 16384; done.
[2013-03-03 05:52:58 1270] DEBUG (XendDomain:464) Adding Domain: 15
[2013-03-03 05:52:58 1270] DEBUG (XendDomainInfo:2818) XendDomainInfo.initDomain: 15 256
[2013-03-03 05:52:58 18007] DEBUG (XendBootloader:113) Launching bootloader as ['/usr/lib/xen-default/bin/pygrub', '--args=root=/dev/xvda1 ro ', '--output=/var/run/xend/boot/xenbl.29813', '-q', '/dev/vg00/not_relevant-disk'].
[2013-03-03 05:52:58 1270] ERROR (XendBootloader:214) Boot loader didn't return any data!
[2013-03-03 05:52:58 1270] ERROR (XendDomainInfo:483) VM start failed
Traceback (most recent call last):
File "/usr/lib/xen-4.0/lib/python/xen/xend/XendDomainInfo.py", line 469, in start
XendTask.log_progress(31, 60, self._initDomain)
File "/usr/lib/xen-4.0/lib/python/xen/xend/XendTask.py", line 209, in log_progress
retval = func(*args, **kwds)
File "/usr/lib/xen-4.0/lib/python/xen/xend/XendDomainInfo.py", line 2820, in _initDomain
self._configureBootloader()
File "/usr/lib/xen-4.0/lib/python/xen/xend/XendDomainInfo.py", line 3266, in _configureBootloader
bootloader_args, kernel, ramdisk, args)
File "/usr/lib/xen-4.0/lib/python/xen/xend/XendBootloader.py", line 215, in bootloader
raise VmError, msg
VmError: Boot loader didn't return any data!


It seems this is a BUG and it took me only couple of hours to find it. For some reasons google didn't show it when searching for "NameError: name 'output_directory' is not defined".

The fix in my case is to add the following to the /usr/lib/xen-default/bin/pygrub:
not_really = False
output_directory = "/var/run/xend/boot"

No comments:

Post a Comment