X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/24bbf8e59bf6b9b0066a5db02cfbd2bb48f83a1f..bf27ca1d371e1bb6b49c7e7d47438985e1399d24:/code/controls.py diff --git a/code/controls.py b/code/controls.py index 86c23c2..d21eb7a 100644 --- a/code/controls.py +++ b/code/controls.py @@ -78,10 +78,13 @@ def getswap(disksize, memsize): def lvinstall(machine, autoinstall): disksize = machine.disks[0].size memsize = machine.memory - imagesize = disksize - getswap(disksize, memsize) + swapsize = getswap(disksize, memsize) + imagesize = disksize - swapsize ip = machine.nics[0].ip - remctl('web', 'install', machine.name, autoinstall.distribution, - autoinstall.mirror, str(imagesize), ip) + remctl('control', machine.name, 'install', + 'dist=%s' % autoinstall.distribution, + 'mirror=%s' % autoinstall.mirror, + 'imagesize=%s' % imagesize) def lvcopy(machine_orig_name, machine, rootpw): """Copy a golden image onto a machine's disk""" @@ -141,8 +144,9 @@ def createVm(username, state, owner, contact, name, description, memory, disksiz makeDisks(machine) if autoinstall: lvinstall(machine, autoinstall) - # tell it to boot with cdrom - bootMachine(machine, cdrom) + else: + # tell it to boot with cdrom + bootMachine(machine, cdrom) return machine def getList():