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>
23 <tr><td>Network history:</td><td><img src="${config.monitoring[0].baseuri}usage.cgi?type=net;uuid=${machine.uuid}" alt="Domain network usage" /></td></tr>
29 <%def name="commands()">
31 % if not machine.type.hvm:
33 <tt>ssh ${machine.name}@${config.console.hostname}</tt>
34 on Athena. <a href="https://xvm.scripts.mit.edu/wiki/SerialConsole">(more info)</a>
36 <strong><a href="machine/${machine.machine_id}/vnc">Get Console</a></strong>
38 VNC console not enabled; still booting?
41 <%def name="command_button(title, value, cdrom=False, extra='')">
42 <form action="machine/${machine.machine_id}/command/${value}" method="POST">
43 <input type="hidden" name="back" value="info" />
44 <input type="submit" class="button" name="action" value="${title}" ${extra | n}/>
46 Boot CD: ${self.fn.cdromList()}
52 <p>This machine's IP address is slated for removal. Your machine's new IP address, netmask, and gateway are shown above. Please configure your machine for DHCP or update the machine's configuration and then press this button:</p>
54 ${command_button("Power cycle and renumber", "renumber")
56 ${command_button("Renumber", "renumber")
62 ${command_button("Power off", "destroy")}
63 ${command_button("Shutdown", "shutdown")}
64 ${command_button("Reboot", "reboot", cdrom=True)}
66 ${command_button("Power on", "create", cdrom=True)}
70 ${command_button("Delete VM", "delete", extra='''onclick="return confirm('Are you sure that you want to delete this VM (\\\'%s\\\')?');"''' % (machine.name))}
74 <%def name="modifyForm()">
76 <p class="error">We had a problem with your request:</p>
78 <p>Successfully modified.</p>
81 (To edit ram, disk size, or machine name, turn off the machine first.)
83 <form action="machine/${machine.machine_id}/modify" method="POST">
85 <tr><td>Description:</td><td colspan="2"><textarea name="description" rows="4" cols="60">${defaults.description}</textarea></td></tr>
86 <tr><td>Owner${self.fn.helppopup("Owner")}:</td><td><input type="text" name="owner", value="${defaults.owner}"/></td></tr>
87 ${self.fn.errorRow('owner', err)}
88 <tr><td>Administrator${self.fn.helppopup("Administrator")}:</td><td><input type="text" name="admin", value="${defaults.administrator}"/></td></tr>
89 ${self.fn.errorRow('administrator', err)}
90 <tr><td>Contact email:</td><td><input type="text" name="contact" value="${defaults.contact}"/></td></tr>
91 ${self.fn.errorRow('contact', err)}
93 <tr><td>Machine Name:</td><td><input type="text" name="name" value="${defaults.name}"/>.${config.dns.domains[0]}</td></tr>
94 ${self.fn.errorRow('name', err)}
96 <td>HVM/ParaVM${self.fn.helppopup('HVM/ParaVM')}</td>
97 <td>${self.fn.vmTypeList(defaults.type)}</td>
99 <tr><td>Ram:</td><td><input type="text" size=3 name="memory" value="${defaults.memory}"/>MiB (max ${max_mem})</td></tr>
100 ${self.fn.errorRow('memory', err)}
101 <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>
102 ${self.fn.errorRow('disk', err)}
104 ${self.fn.errorRow('name', err)}
105 ${self.fn.errorRow('memory', err)}
106 ${self.fn.errorRow('disk', err)}
108 <tr><td><input type="submit" class="button" name="action" value="Change"/></td></tr>