{{define "vm_list_content"}}

Inspect lifecycle, capacity, and reachability for every VM.

Create VM
{{range .VMs}} {{else}} {{end}}
Name State Image IP vCPU Memory Disk Created
{{.Name}} {{.State}} {{$image := findImage $.Images .ImageID}}{{if $image.ID}}{{$image.Name}}{{else}}{{shortID .ImageID}}{{end}} {{if .Runtime.GuestIP}}{{.Runtime.GuestIP}}{{else}}-{{end}} {{.Spec.VCPUCount}} {{.Spec.MemoryMiB}} MiB {{formatBytes .Spec.WorkDiskSizeBytes}} {{relativeTime .CreatedAt}}
No VMs registered.
{{end}} {{define "vm_new_content"}}

Create a VM and wait until the guest is fully ready. The browser will follow live create progress automatically.

{{if .ErrorMessage}}
{{.ErrorMessage}}
{{end}}
{{template "csrf_field" .}}
Cancel
{{end}} {{define "vm_show_content"}}

{{.VM.Name}}

ID
{{.VM.ID}}
Image
{{if .VMImage.ID}}{{.VMImage.Name}}{{else}}{{shortID .VM.ImageID}}{{end}}
State
{{.VM.State}}
Guest IP
{{if .VM.Runtime.GuestIP}}{{.VM.Runtime.GuestIP}}{{else}}-{{end}}
Created
{{relativeTime .VM.CreatedAt}}

Configured Spec

vCPU
{{.VM.Spec.VCPUCount}}
Memory
{{.VM.Spec.MemoryMiB}} MiB
Disk
{{formatBytes .VM.Spec.WorkDiskSizeBytes}}
NAT
{{formatBool .VM.Spec.NATEnabled}}

Current Usage

CPU
{{formatPercent .VMStats.CPUPercent}}
RSS
{{formatBytes .VMStats.RSSBytes}}
Overlay
{{formatBytes .VMStats.SystemOverlayBytes}}
Work Disk
{{formatBytes .VMStats.WorkDiskBytes}}

Actions

Logs
{{if eq .VM.State "running"}}
{{template "csrf_field" .}}
{{template "csrf_field" .}}
{{else}}
{{template "csrf_field" .}}
{{end}}
{{template "csrf_field" .}}

Listening Ports

{{if .VMPortsError}}

{{.VMPortsError}}

{{else}} {{range .VMPorts.Ports}} {{else}} {{end}}
PortProcessEndpoint
{{.Proto}}/{{.Port}} {{if .Process}}{{.Process}}{{else}}-{{end}} {{if .Endpoint}}{{if endpointHref .Endpoint}}{{.Endpoint}}{{else}}{{.Endpoint}}{{end}}{{else}}-{{end}}
No host-reachable listeners reported.
{{end}}

Update Settings

{{template "csrf_field" .}}
Cancel
{{end}} {{define "vm_logs_content"}}

Showing the last 200 lines from the Firecracker log.

Refresh
{{.LogText}}
{{end}}