summaryrefslogtreecommitdiff
path: root/kvm.write
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
commit0b1db252d61c3aa02ae7c865314ee07e96244be3 (patch)
tree8e3212560d6e2132b553e8b1727503f47fce4f36 /kvm.write
parent5e664629324a2cab7b4b79c01d458cc00c38e9c4 (diff)
downloaddefinitions-0b1db252d61c3aa02ae7c865314ee07e96244be3.tar.gz
kvm.write uses NIC_CONFIG
Diffstat (limited to 'kvm.write')
-rwxr-xr-xkvm.write5
1 files changed, 5 insertions, 0 deletions
diff --git a/kvm.write b/kvm.write
index f2683d8e..52768042 100755
--- a/kvm.write
+++ b/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',