[libvirt] [PATCH sandbox 10/24] virt-builder: disable setup of network for virt-builder

Daniel P. Berrange berrange at redhat.com
Fri Jul 15 13:08:02 UTC 2016


When getting the pristine image, we don't customize it or
run any scripts, so we can safely disable use of the network.
This avoids a possible failure scenario that virt-builder
cannot report upfront, where is not configured virbr0.

Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
---
 libvirt-sandbox/image/sources/virtbuilder.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libvirt-sandbox/image/sources/virtbuilder.py b/libvirt-sandbox/image/sources/virtbuilder.py
index 28fbffb..6e71b36 100644
--- a/libvirt-sandbox/image/sources/virtbuilder.py
+++ b/libvirt-sandbox/image/sources/virtbuilder.py
@@ -45,7 +45,7 @@ class VirtBuilderSource(base.Source):
         templatename = self._get_template_name(template)
         imagepath_original = "%s/%s-original.qcow2" % (templatedir, templatename)
         imagepath = "%s/%s.qcow2" % (templatedir, templatename)
-        cmd = ["virt-builder", templatename,
+        cmd = ["virt-builder", templatename, "--no-network",
                "-o", imagepath_original, "--format", "qcow2"]
         subprocess.check_call(cmd)
 
-- 
2.7.4




More information about the libvir-list mailing list