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"/>
22 $errorRow('create', $err)
25 <td><input type="text" name="name" value="$defaults.name"/></td>
27 $errorRow('name', $err)
30 <td><input type="text" name="memory" value="$defaults.memory" size=3/> MiB ($max_memory max)</td>
32 $errorRow('memory', $err)
35 <td><input type="text" name="disk" value="$defaults.disk" size=3/> GiB (${"%0.1f" % ($max_disk-0.05)} max)</td>
37 $errorRow('disk', $err)
39 <td>HVM/ParaVM$helppopup('hvm_paravm')</td>
40 <td>$vmTypeList($defaults.type)</td>
42 $errorRow('vmtype', $err)
45 <td>$cdromList($cdroms, $defaults.cdrom)</td>
47 $errorRow('cdrom', $err)
50 <td><input type="checkbox" name="clone_from" id="clone_from" value="ice3" onchange="onclone(event)"/>
51 (experimental; 1-2 minutes, and you have an etch machine; root pw is 'password'.)
52 <script type='text/javascript'>function onclone(e){ document.getElementById('cdromlist').value = ''; }</script></td>
54 $errorRow('cdrom', $err)
57 <td><input type="text" name="owner" value="$defaults.owner"/></td>
59 $errorRow('owner', $err)
61 <input type="submit" class="button" value="Create it!"/>
66 #def machineRow($machine)
68 <td><a href="info?machine_id=$machine.machine_id">$machine.name</a></td>
69 <td>${machine.memory}M</td>
70 <td>$machine.owner</td>
71 <td>$machine.administrator</td>
73 #set $nic = $machine.nics[0]
84 #if $has_vnc[$machine] == True
85 <a href="vnc?machine_id=$machine.machine_id">Console</a>#slurp
86 #else if $has_vnc[$machine] != 'Off'
91 <form action="command" method="post">
92 <input type="hidden" name="back" value="list"/>
93 <input type="hidden" name="machine_id"
94 value="$machine.machine_id"/>
95 <input type="submit" class="button" name="action" value="#slurp
96 #if $machine.uptime then 'Power off' else 'Power on'
103 #def machineList($machines)
108 <th>Owner$helppopup('owner')</th>
109 <th>Administrator$helppopup('administrator')</th>
115 #for $machine in $machines:
116 $machineRow($machine)
123 <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>
125 <p>You don't currently control any VMs.</p>
127 <p><a href="list">refresh</a></p>
128 <div id="machinelist">
129 $machineList($machines)