From 1be510f9529cb082f802408b472a77d074b394c0 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Sun, 14 Apr 2013 13:46:12 +0000 Subject: Add zarb MLs html archives --- .../20110330/35cf881a/attachment-0001.py | 98 ++++++++++++++++++++++ .../attachments/20110330/35cf881a/attachment.py | 98 ++++++++++++++++++++++ 2 files changed, 196 insertions(+) create mode 100644 zarb-ml/mageia-sysadm/attachments/20110330/35cf881a/attachment-0001.py create mode 100644 zarb-ml/mageia-sysadm/attachments/20110330/35cf881a/attachment.py (limited to 'zarb-ml/mageia-sysadm/attachments/20110330') diff --git a/zarb-ml/mageia-sysadm/attachments/20110330/35cf881a/attachment-0001.py b/zarb-ml/mageia-sysadm/attachments/20110330/35cf881a/attachment-0001.py new file mode 100644 index 000000000..5b26edab2 --- /dev/null +++ b/zarb-ml/mageia-sysadm/attachments/20110330/35cf881a/attachment-0001.py @@ -0,0 +1,98 @@ +#!/usr/bin/python +import libvirt +import sys + +c = libvirt.open("qemu:///system") +s = c.storagePoolLookupByName('default') + +mac_counter = 0 +for wm in ['kde','gnome','lxde']: + for arch in ['i686','x86_64']: + mac_counter += 1 + + name = 'mandriva_%s_%s' % (wm,arch) + # clean previous vm + if name in c.listDefinedDomains(): + c.lookupByName(name).undefine() + + boot = '/var/lib/libvirt/netboot/' + if arch == 'i686': + boot += 'mandriva_2010.1_i586_boot.iso' + else: + boot += 'mandriva_2010.1_x86_64_boot.iso' + + # faire un pool + vol_xml = """ + + %s.img + 5 + + + + 0 + 0 + 0744 + + +""" % name + if name + ".img" in s.listVolumes(): + s.storageVolLookupByName(name + ".img").delete(0) + v = s.createXML(vol_xml, 0) + + vm_xml = """ + + %s + 1048576 + 1048576 + 1 + + hvm + + + + + + + + destroy + restart + restart + + /usr/bin/qemu-kvm + + + + + + + + + + +
+ + + + + + + + + + + + + + +