Changeset 340 for trunk/packages/sipb-xen-www/code/controls.py
- Timestamp:
- Mar 30, 2008, 4:28:10 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-www/code/controls.py
r265 r340 69 69 lvcreate(machine, disk) 70 70 71 def lvcopy(machine_orig_name, machine, rootpw): 72 """Copy a golden image onto a machine's disk""" 73 remctl('web', 'lvcopy', machine_orig_name, machine.name, rootpw) 74 71 75 def bootMachine(machine, cdtype): 72 76 """Boot a machine with a given boot CD. … … 96 100 remctl('web', 'unregister', machine.name) 97 101 98 def createVm(owner, contact, name, memory, disk_size, is_hvm, cdrom ):102 def createVm(owner, contact, name, memory, disk_size, is_hvm, cdrom, clone_from): 99 103 """Create a VM and put it in the database""" 100 104 # put stuff in the table … … 137 141 registerMachine(machine) 138 142 makeDisks(machine) 143 if clone_from: 144 lvcopy(clone_from, machine, 'password') 139 145 # tell it to boot with cdrom 140 146 bootMachine(machine, cdrom)
Note: See TracChangeset
for help on using the changeset viewer.