From d1fbb6237b6916d333cb03defd30d76c27fcb45f Mon Sep 17 00:00:00 2001 From: Kevin Wang Date: Mon, 12 Oct 2026 23:51:00 -0700 Subject: [PATCH] feat(vmm): enable the QMP socket by default Without a QMP socket a running CVM has no runtime control channel, so fixing a disk option or compacting a bloated hda.img requires stopping the CVM. With qmp.sock the host can use blockdev-mirror to move the disk to a compact image live. The socket lives in the VM work dir and is only reachable by the VMM user. The host is outside the TDX trust boundary, so this does not widen what a CVM has to trust. Signed-off-by: Kevin Wang --- CHANGELOG.md | 3 +++ docs/tutorials/vmm-configuration.md | 2 +- dstack/crates/dstack-cli-core/src/config.rs | 2 +- dstack/vmm/vmm.toml | 5 +++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd2d15c68..0d80200b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed +- vmm: `qmp_socket` now defaults to `true`. Each CVM's QEMU exposes `qmp.sock` in its work dir, so the host can change disk options or compact a bloated `hda.img` (`blockdev-mirror`) without stopping the CVM. Applies to CVMs started after the change; set `qmp_socket = false` to opt out + ## [0.6.1] - 2026-10-12 dstack 0.6.1 is a security release. Upgrade the guest OS, KMS, and verifier. diff --git a/docs/tutorials/vmm-configuration.md b/docs/tutorials/vmm-configuration.md index b3dede9e2..b4a0beced 100644 --- a/docs/tutorials/vmm-configuration.md +++ b/docs/tutorials/vmm-configuration.md @@ -113,7 +113,7 @@ cid_start = 1000 cid_pool_size = 1000 max_allocable_vcpu = 124 # Adjust: total cores - 4 max_allocable_memory_in_mb = 990616 # Adjust: total MB - 16384 -qmp_socket = false +qmp_socket = true use_mrconfigid = true qemu_pci_hole64_size = 0 qemu_hotplug_off = true diff --git a/dstack/crates/dstack-cli-core/src/config.rs b/dstack/crates/dstack-cli-core/src/config.rs index cb0855ce3..2618bc6d9 100644 --- a/dstack/crates/dstack-cli-core/src/config.rs +++ b/dstack/crates/dstack-cli-core/src/config.rs @@ -340,7 +340,7 @@ cid_start = {cid_start} cid_pool_size = {cid_pool_size} max_allocable_vcpu = 20 max_allocable_memory_in_mb = 100_000 -qmp_socket = false +qmp_socket = true user = "" use_mrconfigid = {use_mrconfigid} qemu_pci_hole64_size = 0 diff --git a/dstack/vmm/vmm.toml b/dstack/vmm/vmm.toml index cde5397fc..dc5dbf2d9 100644 --- a/dstack/vmm/vmm.toml +++ b/dstack/vmm/vmm.toml @@ -43,8 +43,9 @@ cid_start = 1000 cid_pool_size = 1000 max_allocable_vcpu = 20 max_allocable_memory_in_mb = 100_000 # MB -# Enable QMP socket -qmp_socket = false +# Expose a QMP socket (qmp.sock in each VM work dir) for host-side runtime +# operations such as live disk migration +qmp_socket = true # The user to run the VM as. If empty, the VM will be run as the current user. # Unique namespace when multiple dstack-vmm instances share one host. When # empty, a stable value is derived from run_path. It is what netd records on