summaryrefslogtreecommitdiff
path: root/morphlib/exts
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2013-06-19 12:23:11 +0000
committerJonathan Maw <jonathan.maw@codethink.co.uk>2013-06-19 12:55:29 +0000
commit041211d22c20fd92aba31c5f6efdb253ae982aeb (patch)
tree85986779a61660cb89bd1a66ff878095d93c462b /morphlib/exts
parentec88a049476df20e12b49cfb9b8477e088d0d8ae (diff)
downloadmorph-041211d22c20fd92aba31c5f6efdb253ae982aeb.tar.gz
kvm.write uses NIC_CONFIG
Diffstat (limited to 'morphlib/exts')
-rwxr-xr-xmorphlib/exts/kvm.write5
1 files changed, 5 insertions, 0 deletions
diff --git a/morphlib/exts/kvm.write b/morphlib/exts/kvm.write
index f2683d8e..52768042 100755
--- a/morphlib/exts/kvm.write
+++ b/morphlib/exts/kvm.write
@@ -106,6 +106,11 @@ class KvmPlusSshWriteExtension(morphlib.writeexts.WriteExtension):
for disk in attach_disks:
attach_opts.extend(['--disk', 'path=%s' % disk])
+ if 'NIC_CONFIG' in os.environ:
+ nics = os.environ['NIC_CONFIG'].split()
+ for nic in nics:
+ attach_opts.extend(['--network', nic])
+
ram_mebibytes = str(self.get_ram_size() / (1024**2))
cmdline = ['virt-install', '--connect', 'qemu:///system', '--import',