X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-database.git/blobdiff_plain/a347eb06ed1ad34c376b5867a558ed4049f74981..cfa1e6d3ec32474c0c6e5e4f62bc1393ee7386d3:/conf.py diff --git a/conf.py b/conf.py new file mode 100644 index 0000000..c7656b6 --- /dev/null +++ b/conf.py @@ -0,0 +1,29 @@ +import sipb_xen_database.models as models + +# `name' gets passed in from the xm create call + +machine = models.Machine.get_by(name=name) + + +memory = machine.memory +maxmem = memory +name = machine.name +uuid = machine.uuid + +vcpus = machine.cpus + +# XXX TODO deal with vifs + +disk = [] + +for d in machine.disks: + dspec = 'phy:xenvg/%s,%s,w' % (???, d.guest_device_name) + disk.append(dspec) + +restart = 'destroy' +if machine.autorestart: + restart = 'restart' + +on_poweroff = 'destroy' +on_reboot = 'restart' +on_crash = restart