1 #from skeleton import skeleton
13 <h2>Create a new VM</h2>
15 <p class="error">We had a problem with your request:</p>
16 #else if $varExists('new_machine')
17 <p>Congratulations! You successfully created a new VM called $new_machine.</p>
19 <form action="create" method="POST">
20 <input type="hidden" name="back" value="list"/>
23 $errorRow('create', $err)
27 <td><input type="text" name="name" value="$defaults.name"/></td>
30 $errorRow('name', $err)
34 <td><input type="text" name="memory" value="$defaults.memory" size=3/> MiB ($max_memory max)</td>
37 $errorRow('memory', $err)
41 <td><input type="text" name="disk" value="$defaults.disk" size=3/> GiB (${"%0.1f" % ($max_disk-0.05)} max)</td>
44 $errorRow('disk', $err)
49 $helppopup('hvm_paravm')#slurp
54 $vmTypeList($defaults.type)
59 $errorRow('vmtype', $err)
64 $helppopup('autoinstall')#slurp
67 <td><input type="radio" name="cd_or_auto" id="cd_or_auto_auto">
69 $autoList($defaults.cdrom, "document.getElementById('cd_or_auto_auto').checked = true;document.getElementById('cdromlist').value = ''")
70 (experimental; 1-2 minutes, and you have a machine; root pw is 'password'.)
76 <td><input type="radio" name="cd_or_auto" id="cd_or_auto_cd" checked>
78 $cdromList($defaults.cdrom, "document.getElementById('cd_or_auto_cd').checked = true;document.getElementById('autoinstalllist').value = ''")
83 $errorRow('cdrom', $err)
84 $errorRow('cdrom', $err)
87 <td><input type="text" name="owner" value="$defaults.owner"/></td>
90 $errorRow('owner', $err)
93 <input type="submit" class="button" value="Create it!"/>
98 #def machineRow($machine)
100 <td><a href="info?machine_id=$machine.machine_id">$machine.name</a></td>
101 <td>${machine.memory}M</td>
102 <td>$machine.owner</td>
103 <td>$machine.administrator</td>
105 #set $nic = $machine.nics[0]
112 $machine.uptime#slurp
116 #if $has_vnc[$machine] == True
117 <a href="vnc?machine_id=$machine.machine_id">Console</a>#slurp
118 #else if $has_vnc[$machine] != 'Off'
125 <form action="command" method="post">
126 <input type="hidden" name="back" value="list"/>
127 <input type="hidden" name="machine_id"
128 value="$machine.machine_id"/>
129 <input type="submit" class="button" name="action" value="#slurp
130 #if $machine.uptime then 'Power off' else 'Power on'
137 #def machineList($machines)
144 $helppopup('owner')#slurp
147 <th>Administrator#slurp
149 $helppopup('administrator')#slurp
157 #for $machine in $machines:
159 $machineRow($machine)
167 <p style="font-size: 125%;">SIPB Virtual Servers is an <strong>alpha service</strong>. <a href="/static/about.html">What does this mean?</a></p>
169 <p>You don't currently control any VMs.</p>
171 <p><a href="list">refresh</a></p>
172 <div id="machinelist">
174 $machineList($machines)