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)
63 <td><input type="checkbox" name="clone_from" id="clone_from" value="ice3" onchange="onclone(event)"/>
64 (experimental; 1-2 minutes, and you have an etch machine; root pw is 'password'.)
65 <script type='text/javascript'>function onclone(e){ document.getElementById('cdromlist').value = ''; }</script></td>
68 $errorRow('autoinstall', $err)
73 $helppopup('autoinstall')#slurp
76 <td><input type="radio" name="cd_or_auto" id="cd_or_auto_auto">
78 $autoList($defaults.cdrom, "document.getElementById('cd_or_auto_auto').checked = true;document.getElementById('cdromlist').value = ''")
79 (experimental; 1-2 minutes, and you have a machine; root pw is 'password'.)
85 <td><input type="radio" name="cd_or_auto" id="cd_or_auto_cd" checked>
87 $cdromList($defaults.cdrom, "document.getElementById('cd_or_auto_cd').checked = true;document.getElementById('autoinstalllist').value = ''")
92 $errorRow('cdrom', $err)
93 $errorRow('cdrom', $err)
96 <td><input type="text" name="owner" value="$defaults.owner"/></td>
99 $errorRow('owner', $err)
102 <input type="submit" class="button" value="Create it!"/>
107 #def machineRow($machine)
109 <td><a href="info?machine_id=$machine.machine_id">$machine.name</a></td>
110 <td>${machine.memory}M</td>
111 <td>$machine.owner</td>
112 <td>$machine.administrator</td>
114 #set $nic = $machine.nics[0]
121 $machine.uptime#slurp
125 #if $has_vnc[$machine] == True
126 <a href="vnc?machine_id=$machine.machine_id">Console</a>#slurp
127 #else if $has_vnc[$machine] != 'Off'
134 <form action="command" method="post">
135 <input type="hidden" name="back" value="list"/>
136 <input type="hidden" name="machine_id"
137 value="$machine.machine_id"/>
138 <input type="submit" class="button" name="action" value="#slurp
139 #if $machine.uptime then 'Power off' else 'Power on'
146 #def machineList($machines)
153 $helppopup('owner')#slurp
156 <th>Administrator#slurp
158 $helppopup('administrator')#slurp
166 #for $machine in $machines:
168 $machineRow($machine)
176 <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>
178 <p>You don't currently control any VMs.</p>
180 <p><a href="list">refresh</a></p>
181 <div id="machinelist">
183 $machineList($machines)