bugfixes in vm

This commit is contained in:
Dominique Roux 2020-01-24 14:34:34 +01:00
parent 93d7a409b1
commit 5711bf4770

View file

@ -54,7 +54,7 @@ class VM(object):
self.vm['owner']= "nico"
self.vm['memory'] = self.config.arguments['memory']
self.vm['cores'] = self.config.arguments['cores']
self.vm['os_image'] = os.path.join(self.hackprefix, "alpine-virt-3.11.2-x86_64.iso")
self.vm['os_image'] = os.path.join(self.hackprefix, "alpine-virt-3.11.3-x86_64.iso")
self.create_template()
# mimics api call = this will already be in etcd
#self.vm['os_image'] = self.db.get("os_image")
@ -84,7 +84,7 @@ class VM(object):
"-smp", "{}".format(self.vm['cores']),
"-uuid", "{}".format(self.vm['uuid']),
"-drive", "file={},media=cdrom".format(self.vm['os_image']),
"-netdev", "tap,id=netmain,script={},downscript={},ifname={}".format(self.ifup, self.ifdown, self.mac),
"-netdev", "tap,id=netmain,script={},downscript={},ifname={}".format(self.ifup, self.ifdown, self.vm['ifname']),
"-device", "virtio-net-pci,netdev=netmain,id=net0,mac={}".format(self.mac)
]