1 <%page expression_filter="h"/>
2 <%inherit file="skeleton.mako" />
5 Info on ${machine.name}
8 %if os.path.exists("/etc/invirt/motd.html"):
10 <p class="error">${open('/etc/invirt/motd.html').read()|n}</p>
14 <%def name="infoTable()">
17 % for key, value in fields:
18 <tr><td>${key}:</td><td>${value}</td></tr>
21 % if 'monitoring' in config and len(config.monitoring) and 'baseuri' in config.monitoring[0]:
22 <tr><td>CPU history:</td><td><img src="${config.monitoring[0].baseuri}usage.cgi?type=cpu;uuid=${machine.uuid}" alt="Domain CPU usage" /></td></tr>
28 <%def name="commands()">
30 % if not machine.type.hvm:
32 <tt>ssh ${machine.name}@${config.console.hostname}</tt>
33 on Athena. <a href="https://xvm.scripts.mit.edu/wiki/SerialConsole">(more info)</a>
35 <strong><a href="machine/${machine.machine_id}/vnc">Get Console</a></strong>
37 VNC console not enabled; still booting?
40 <%def name="command_button(title, value, cdrom=False, extra='')">
41 <form action="machine/${machine.machine_id}/command/${value}" method="POST">
42 <input type="hidden" name="back" value="info" />
43 <input type="submit" class="button" name="action" value="${title}" ${extra | n}/>
45 Boot CD: ${self.fn.cdromList()}
51 ${command_button("Power off", "destroy")}
52 ${command_button("Shutdown", "shutdown")}
53 ${command_button("Reboot", "reboot", cdrom=True)}
55 ${command_button("Power on", "create", cdrom=True)}
59 ${command_button("Delete VM", "delete", extra='''onclick="return confirm('Are you sure that you want to delete this VM (\\\'%s\\\')?');"''' % (machine.name))}
63 <%def name="modifyForm()">
65 <p class="error">We had a problem with your request:</p>
67 <p>Successfully modified.</p>
70 (To edit ram, disk size, or machine name, turn off the machine first.)
72 <form action="machine/${machine.machine_id}/modify" method="POST">
74 <tr><td>Description:</td><td colspan="2"><textarea name="description" rows="4" cols="60">${defaults.description}</textarea></td></tr>
75 <tr><td>Owner${self.fn.helppopup("Owner")}:</td><td><input type="text" name="owner", value="${defaults.owner}"/></td></tr>
76 ${self.fn.errorRow('owner', err)}
77 <tr><td>Administrator${self.fn.helppopup("Administrator")}:</td><td><input type="text" name="admin", value="${defaults.administrator}"/></td></tr>
78 ${self.fn.errorRow('administrator', err)}
79 <tr><td>Contact email:</td><td><input type="text" name="contact" value="${defaults.contact}"/></td></tr>
80 ${self.fn.errorRow('contact', err)}
82 <tr><td>Machine Name:</td><td><input type="text" name="name" value="${defaults.name}"/>.${config.dns.domains[0]}</td></tr>
83 ${self.fn.errorRow('name', err)}
85 <td>HVM/ParaVM${self.fn.helppopup('HVM/ParaVM')}</td>
86 <td>${self.fn.vmTypeList(defaults.type)}</td>
88 <tr><td>Ram:</td><td><input type="text" size=3 name="memory" value="${defaults.memory}"/>MiB (max ${max_mem})</td></tr>
89 ${self.fn.errorRow('memory', err)}
90 <tr><td>Disk:</td><td><input type="text" size=3 name="disksize" value="${defaults.disk}"/>GiB (max ${max_disk})</td><td>WARNING: Modifying disk size may corrupt your data.</td></tr>
91 ${self.fn.errorRow('disk', err)}
93 ${self.fn.errorRow('name', err)}
94 ${self.fn.errorRow('memory', err)}
95 ${self.fn.errorRow('disk', err)}
97 <tr><td><input type="submit" class="button" name="action" value="Change"/></td></tr>