Virtualization security
Run mlab-agent with virtsec on every Proxmox VE node and follow the cluster from the workspace: guest isolation risks, VM escape signals, posture checks, and the vulnerabilities of the code that really runs in each container and VM.
The Virtualization tab of a workspace follows your Proxmox VE clusters. On every node, mlab-agent runs virtsec as its tool. virtsec reports what runs in every LXC container and VM, the isolation risks in their config, what the guests do (programs run, outbound connections, sensitive writes, VM escape signals), the PVE logins and tasks, and the packages of each guest, tagged by what is really loaded in memory. mlab.sh matches those packages against known vulnerabilities, audits each node's configuration, and shows you, per cluster, what to fix first.
virtsec holds no mlab.sh key and opens no connection of its own: the node's agent owns the identity and the only outbound link, as on any other host.
Proxmox VE 8 and 9, x86_64. Other hypervisors (VMware ESXi, plain libvirt/KVM) are not supported. Like every workspace tool, virtsec is part of the Team and Enterprise plans.
Set it up
One agent per Proxmox node. Nodes of the same PVE cluster are grouped by the cluster's name (corosync); a standalone node is its own cluster, named after the node.
Get a code. In the workspace, Agents › Enrol an agent › Proxmox VE nodes (virtsec), with the number of nodes (1 to 200). For one node the code works once, for 15 minutes. For several nodes it works that many times, for 24 hours, and each agent is named after its node. The dialog also shows the mlab.sh key fingerprint.
Install the packages on each node, as root (the mlab.sh APT repository must be set up first: see The agent › Install):
apt install mlab-agent virtsecEnrol each node, as root, with the command the dialog shows:
mlab-agent enroll --server https://mlab.sh \
--code <code> \
--expect-fingerprint <fingerprint> \
--label "$(hostname)"The agent refuses to enrol if mlab.sh's key does not match the fingerprint.
Write the policy in /etc/mlab-agent/policy.toml. The agent's Policy editor drafts it for you; it bounds what the workspace may ever turn on (see The node policy). VM inspection is off by default.
Run the agent as root. The package's service runs as the unprivileged mlab-agent user, and virtsec refuses to start without the access it needs. Add a systemd drop-in, /etc/systemd/system/mlab-agent.service.d/virtsec.conf:
[Service]
User=root
Group=root
CapabilityBoundingSet=CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH CAP_SYS_PTRACE CAP_BPF CAP_PERFMON CAP_SYS_RESOURCE CAP_NET_ADMIN
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINKThen:
systemctl daemon-reload
systemctl enable --now mlab-agent
mlab-agent tools checkOpen the Virtualization tab. It shows once an agent of the workspace reports virtsec, and a node appears with its first heartbeat (within a minute).
More on virtsec itself (deployment, what it watches, known limits): the virtsec wiki.
Updating
The Tools tab shows the version each node runs, whether a newer one is published, and the commands:
sudo apt update && sudo apt install --only-upgrade virtsecOn RPM-based systems: sudo dnf upgrade virtsec. An update changes the binary's SHA-256, which the policy pins: get the new one with sudo mlab-agent tools hash /usr/bin/virtsec, put it in the policy, then sudo systemctl restart mlab-agent.
The node policy
/etc/mlab-agent/policy.toml is each node's ceiling: the workspace chooses within it, never beyond.
enabled = true # kill switch
upload_hosts = ["<upload host from the Policy editor>"] # inventories and SBOMs go there
[tools.virtsec]
path = "/usr/bin/virtsec"
sha256 = "<mlab-agent tools hash /usr/bin/virtsec>"
enabled = true
allowed_ops = ["status", "configure", "events_since", "inventory", "sbom", "audit"]
[tools.virtsec.settings]
allow_ebpf = true
allow_journal = true
allow_config = true
allow_inventory = true
allow_guest_exec = false
vmids = []| Operation | What mlab.sh may ask |
|---|---|
status | The node, the sources running and what was captured (the heartbeat). |
configure | Apply the sources, guests and severity chosen in mlab.sh, within the settings below. |
events_since | Send again the runtime events mlab.sh missed (they are numbered). |
inventory | Send the guests, their isolation risks and their packages, with what is loaded in memory. |
sbom | Send the CycloneDX SBOM of one guest or of the node. |
audit | Send the node's posture audit. Without it, the Posture tab shows the node as not audited. |
| Setting | Default | What it allows |
|---|---|---|
allow_ebpf | true | Program executions in guests, outbound connections, writes to sensitive paths (eBPF), and the VM escape signals. |
allow_journal | true | API logins, authentication failures, PVE tasks and SSH logins. |
allow_config | true | Guests created, removed, started, stopped, and isolation risks added to their config. |
allow_inventory | true | The packages of the guests and of the node (matched against CVEs on mlab.sh's side). |
allow_guest_exec | false | Two read-only commands run in VMs through qemu-guest-agent (their mapped files and a copy of their package databases). Off: VMs report their OS only. |
vmids | [] | The only guests mlab.sh may see. Empty: all. |
backlog_events | 50000 | Runtime events held on the node so mlab.sh can fetch what it missed (2,000 to 1,000,000). |
Unknown keys are refused when virtsec starts (invalid [tools.virtsec.settings]).
The Virtualization tab
The tab lists one card per Proxmox cluster: nodes online, guests running (LXC and VMs), vulnerabilities in loaded code, and a badge for the most urgent thing (critical events in the last 24 hours, known-exploited vulnerabilities loaded, risky guests, critical vulnerabilities loaded, or "nothing urgent"). Click a cluster for its dashboard.
| Part | What it shows |
|---|---|
| Stats | Critical events in 24 hours (VM escape signals and the like), known-exploited (KEV) and critical (CVSS 9+) vulnerabilities in loaded code, guests with weakened isolation, guests running / configured, nodes online. |
| Leads | What to look at first, up to 10: critical events, failed critical posture checks (or posture warnings), guests with KEV loaded, privileged or risky running guests, guests with critical vulnerabilities loaded, silent nodes. Red means look now, amber worth a look. |
| Overview | The nodes: state (online, silent, revoked), sources and their state, VM inspection allowed when the policy allows it, versions of virtsec, the agent, Proxmox and the kernel, events received (and how many were dropped or lost), last heartbeat. Then the guests to look at first. Inventory again asks every node for a fresh inventory; guests update within a minute. |
| Guests | Every guest and node: kind, status, OS, node, isolation risks, vulnerabilities, packages loaded / total. Filter by kind (containers, VMs, nodes) and running only. Click a row for its findings: reachability, KEV, severity, CVSS, CVE, package and version, fixed version; Only loaded (on by default), KEV only and severity narrow them. A migrated guest shows once. |
| Posture | The checks that failed on each node, most severe first, each with its fix. Filter: all, warning and above, critical. |
| Runtime | Runtime events, newest first (below). |
| Inventory | The packages of a guest or node, by reachability, and its SBOM (CycloneDX) to download, read live from the node. |
| Config | What the cluster reports (below). |
A node sends a heartbeat every minute and shows silent after 3 minutes without one.
Isolation risks
From each guest's config: privileged container, host bind mounts, device passthrough, unconfined AppArmor, raw lxc.* lines or QEMU args, hookscripts, and the like. Red badges (privileged, passthrough, unconfined, raw, host) weaken isolation the most.
Reachability
| Tag | Meaning |
|---|---|
| Loaded | A file of the package is mapped by a running process of the guest: its code runs. |
| Dormant | Installed, never loaded since the inventory. |
| Unknown | Reachability cannot be seen (interpreted code). |
Containers are read live from their filesystem. VMs are inspected from the inside through qemu-guest-agent, only when the node's policy (allow_guest_exec) and the cluster's config both allow it; otherwise they report their OS only and show not inspected. Nodes report their own packages, the Proxmox stack matched by CPE. Vulnerabilities are matched again every day.
Runtime events
| Source | Events |
|---|---|
Executions (exec) | Programs started in a guest (exec), programs started at boot (boot_execs). |
eBPF (ebpf) | Outbound connections (connect), writes to sensitive paths (file_write), and the VM escape signals: a program run (vm_cgroup_exec), a connection (vm_cgroup_connect) or a sensitive write (vm_cgroup_write) from a VM's QEMU process. |
PVE journal (pve) | API logins (login), authentication failures (auth_failure), tasks (task), SSH logins and failures (ssh_login, ssh_failure). |
Config changes (config) | Guests created, removed, started, stopped (guest_created, guest_removed, started, stopped), isolation risks added or removed (risk_added, risk_removed), listening ports on the node (listen). |
Severities are info, warning and critical. Anything run or written from a VM's QEMU process is critical. Filter by source, kind, severity, guest (vmid) or text (message, guest name). The page loads 200 events at a time and stops at 1,000: narrow the filters to go further back. Connection targets carry their reputation (country, organization, proxy) from mlab.sh's existing knowledge; no new lookup is made and no quota is used.
virtsec reports what happens after it starts. Events are numbered by each node: if some are missed (a lost connection), mlab.sh asks the node for them again; what the node no longer holds is counted as lost.
Posture checks
Each node is audited from its configuration with every inventory. Nothing is changed on the node. The checks of virtsec 0.2:
| Check | Severity | Fails when |
|---|---|---|
firewall.datacenter | warning | The datacenter firewall is off. |
firewall.node | warning | The node's firewall is off while the datacenter's is on. |
firewall.guest | warning | A guest's firewall, or one of its network cards, is off while the datacenter's is on. |
users.no_second_factor | critical for root@pam, warning otherwise | An enabled user has no second factor and the realm enforces none. |
users.token_privsep | warning | An API token has privilege separation off. |
ssh.root_password | warning | root may log in over SSH with a password. |
ssh.password | info | Anyone may log in over SSH with a password. |
webui.open | info | The web interface is not restricted (ALLOW_FROM or LISTEN_IP in /etc/default/pveproxy). |
apt.test_repo | warning | The pve-test repository is enabled. |
apt.no_subscription | info | The pve-no-subscription repository is enabled. |
apt.enterprise_unreachable | warning | The enterprise repository is enabled but its index was never fetched. |
apt.stale | warning | The package lists are older than 7 days. |
corosync.unencrypted | warning | Cluster traffic is not encrypted or authenticated. |
backup.no_job | warning | No enabled backup job on this node. |
backup.missing | warning | A guest no backup job covers. |
backup.stale | warning | A guest's newest backup is older than 7 days, or there is none. |
backup.unencrypted | info | A Proxmox Backup Server storage without client-side encryption. |
backup.on_node | info | Backups go to a local, non-shared storage. |
restart_needed | warning | Old code is still running after an upgrade. |
reboot_needed | warning | A reboot is pending, or a newer kernel is installed than the one running. |
guest.risk | per risk | One per isolation risk of a guest: critical for a privileged container with nesting, unconfined AppArmor, no capability dropped or a writable host bind mount. |
A node shows not audited when its virtsec predates the audit, or its policy does not allow the audit operation.
What the cluster reports
The Config tab chooses, for the whole cluster: the sources (kernel events, PVE journal, guest config changes, inventory and vulnerabilities), whether VMs are inspected from the inside, the guests (vmids, one per line, up to 1,000; empty means all), and the lowest severity reported. Push to the Proxmox cluster sends it to every node, which applies it at once. Each node keeps its policy: what it does not allow stays off (the form says "not allowed by the nodes' policy"), and the table below shows what is in force on each node. Only owners and admins can push a configuration.
By default every source is on, VM inspection is off, all guests are reported, from severity info.
Who can do what
Same rules as the rest of the workspace: owners and admins see every workspace; members and viewers only the ones they were added to.
| Owner, Admin | Members and viewers of the workspace | |
|---|---|---|
| See clusters, guests, events, posture, config | yes | yes |
| Download an SBOM, Inventory again | yes | yes |
| Push a cluster's configuration | yes | no |
Pushing a configuration and downloading an SBOM are in the organization audit log.
Data
| What | Kept | How |
|---|---|---|
| Runtime events | The workspace's data holding period, counted from when each event arrived | Expire on their own |
| Inventories, findings, posture checks | Until a guest or node is not reported for the holding period | Sealed (encrypted) at rest |
| Guests a node no longer lists (removed or migrated away) | Deleted at the next inventory | |
| Nodes | Until silent for the holding period |
AI agents (MCP)
Six read-only tools, when the workspace's Settings allow AI agents: workspace_virt_list, workspace_virt_guests, workspace_virt_guest, workspace_virt_events, workspace_virt_config and workspace_virt_audit. Pushing a configuration, downloading an SBOM and Inventory again stay in the browser. See MCP server.
Limits
- Proxmox VE only. One virtsec per node: it sees the guests running on that node.
- VMs need qemu-guest-agent and
allow_guest_execto be inspected from the inside; stopped guests on block storage are not inspected. - Reachability is a snapshot, taken at each inventory: interpreted daemons look dormant.
- No UDP and no file reads are reported; config changes are polled every 2 seconds.
Troubleshooting
| Symptom | Cause |
|---|---|
| No Virtualization tab | No agent of the workspace reports virtsec yet: check the policy declares [tools.virtsec], then Test the agent. |
| "No Proxmox node reported yet" | Wait for the first heartbeat (a minute). Check the agent runs as root (journalctl -u mlab-agent) and mlab-agent tools check. |
| A tool shows failed in the Tools tab | Its path or SHA-256 in the policy is wrong, often after an update: mlab-agent tools hash /usr/bin/virtsec. |
| A node shows silent | No heartbeat for 3 minutes: the agent is stopped or cannot reach mlab.sh. |
| No packages, no vulnerabilities | upload_hosts is missing or wrong in the policy, or allow_inventory is off. Then Inventory again. |
| VMs show not inspected | allow_guest_exec is off in the policy or the config, or qemu-guest-agent is not running in the VM. |
| Posture shows not audited | Update virtsec, and add audit to allowed_ops. |
| A source stays off after a push | The node's policy does not allow it: the push result says "the node's policy cut" it. |
| "The node did not answer. Try again in a moment." on an SBOM | The node is busy or offline; SBOMs are read live from it. |
Cluster security
Run mlab-agent with k3sec on every node of a Kubernetes cluster and follow it from the workspace: runtime events, eBPF and YARA detections, and the vulnerabilities of the code that really runs.
Overview
RedKit flows chain HTTP, DNS, port and TLS checks on your verified domains, then act on what they find: alert, open a case or an incident, file a ticket, page on-call, call a webhook or write a report. By hand or on a schedule.