From 7843a554b02a86d3bc5e2c02e414d630a4be6e27 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Tue, 29 Jan 2013 14:30:00 +0000 Subject: allow disabling file injection completely With the libvirt_injection_partition config set to -2, file injection is avoided completely. This can be required if you want to make user specified files available from the metadata server (and config drive is not enabled), then you would want to avoid injection completely for performance reasons, but also to avoid boot failure if the injection itself failed. Flags: DocImpact Change-Id: I604f4189114515c70c58cf183622542c4633e44a --- nova/virt/libvirt/driver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 0607e2df9..757e8a037 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -115,8 +115,8 @@ libvirt_opts = [ cfg.IntOpt('libvirt_inject_partition', default=1, help='The partition to inject to : ' - '-1 => inspect (libguestfs only), 0 => not partitioned, ' - '>0 => partition number'), + '-2 => disable, -1 => inspect (libguestfs only), ' + '0 => not partitioned, >0 => partition number'), cfg.BoolOpt('use_usb_tablet', default=True, help='Sync virtual and real mouse cursors in Windows VMs'), @@ -1513,7 +1513,7 @@ class LibvirtDriver(driver.ComputeDriver): raise # File injection - else: + elif CONF.libvirt_inject_partition != -2: target_partition = None if not instance['kernel_id']: target_partition = CONF.libvirt_inject_partition -- cgit