From 3d60c4fb6f182baf61f55d293cdca49ae9e4ea85 Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Tue, 20 Nov 2012 18:20:11 -0600 Subject: Don't hard code the xen hvmloader path. Both Ubuntu and Debian place the hvmloader in a different path which depends on the version is installed. The reason why this done is so you can different versions of Xen installed. As a result change the hvmloader to a configurable option for libvirt called xen_hvmloader_path. Change-Id: Ic407d14f56a2518de4cd4ab8872ac2055d20adcd Signed-off-by: Chuck Short --- nova/virt/libvirt/driver.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 14e8a75d2..88c136c21 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -180,6 +180,9 @@ libvirt_opts = [ default='$instances_path/snapshots', help='Location where libvirt driver will store snapshots ' 'before uploading them to image service'), + cfg.StrOpt('xen_hvmloader_path', + default='/usr/lib/xen/boot/hvmloader', + help='Location where the Xen hvmloader is kept'), ] CONF = cfg.CONF @@ -1721,7 +1724,7 @@ class LibvirtDriver(driver.ComputeDriver): guest.os_type = vm_mode.HVM if CONF.libvirt_type == "xen" and guest.os_type == vm_mode.HVM: - guest.os_loader = '/usr/lib/xen/boot/hvmloader' + guest.os_loader = CONF.xen_hvmloader_path if CONF.libvirt_type == "lxc": guest.os_type = vm_mode.EXE -- cgit