<%page expression_filter="h"/> <%inherit file="skeleton.mako" /> <%! import datetime %> <%def name="title()"> VM List %if os.path.exists("/etc/invirt/motd.html"):

${open('/etc/invirt/motd.html').read()|n}

%endif <%def name="createForm()"> % if cant_add_vm:

${cant_add_vm}

% else:

Create a new VM

% if err:

We had a problem with your request:

% elif new_machine:

Congratulations! You successfully created a new VM called ${new_machine}.

% endif
${self.fn.errorRow('create', err)} ${self.fn.errorRow('name', err)} ${self.fn.errorRow('description', err)} ${self.fn.errorRow('memory', err)} ${self.fn.errorRow('disk', err)} ${self.fn.errorRow('vmtype', err)} ${self.fn.errorRow('autoinstall', err)} ${self.fn.errorRow('cdrom', err)} ${self.fn.errorRow('cdrom', err)} ${self.fn.errorRow('owner', err)}
Name .${config.dns.domains[0]}
Description
Memory MiB (${max_memory} max)
Disk GiB (${"%0.1f" % (max_disk-0.05)} max)
HVM/ParaVM${self.fn.helppopup('HVM/ParaVM')} ${self.fn.vmTypeList(defaults.type)}
Autoinstall${self.fn.helppopup('Autoinstalls')}
Boot CD
Owner
\ % if disable_creation:  VM creation is currently disabled due to lack of disk space. \ %endif
Windows notes: ${self.fn.helppopup('Windows')}
% endif <%def name="machineRow(machine, dark)"> <% on = (machine.uptime is not None) %> % if on and installing[machine]: Installing... % else:
% endif ${machine.name} ${machine.memory}M ${machine.owner} ${machine.administrator} % if machine.nics: ${', '.join(nic.ip for nic in machine.nics)} % else: % endif \ % if on: ${datetime.timedelta(seconds=int(machine.uptime))}\ % endif \ % if has_vnc[machine] == True: Console\ % elif has_vnc[machine] == 'ParaVM': ParaVM${self.fn.helppopup("ParaVM Console")} % elif has_vnc[machine] != 'Off': ${has_vnc[machine]} % endif ${machine.description|self.fn.module.nl2br} <%def name="machineList(machines)"> % for n, machine in enumerate(machines): ${machineRow(machine, (n%2)==0)} % endfor
Name Memory Owner${self.fn.helppopup('Owner')} Administrator${self.fn.helppopup('Administrator')} IP Uptime VNC

What is XVM?

% if not machines:

You don't currently control any VMs.

% endif

refresh

${machineList(machines)}
${createForm()}