Skip to content

Commit c884dbb

Browse files
committed
fix(vmm): refresh swtpm decision on update
Signed-off-by: Kevin Wang <wy721@qq.com>
1 parent 7bf167e commit c884dbb

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

dstack/dstack-mr/src/acpi.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//! translated from an original Go implementation.
77
88
use anyhow::{bail, Context, Result};
9+
use fs_err as fs;
910
use log::debug;
1011
use scale::Decode;
1112
use std::os::unix::fs::FileTypeExt;

dstack/vmm/src/main_service.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,12 @@ impl VmmRpc for RpcHandler {
627627
vm_work_dir.clear_runtime_networks()?;
628628
}
629629
}
630+
let compose_file = fs::read_to_string(vm_work_dir.app_compose_path())
631+
.context("failed to read app compose for swtpm decision")?;
632+
manifest.qemu_swtpm = Some(needs_qemu_swtpm(
633+
key_provider_from_compose(&compose_file)?,
634+
manifest.simulated_tee,
635+
));
630636
vm_work_dir
631637
.put_manifest(&manifest)
632638
.context("Failed to put manifest")?;

0 commit comments

Comments
 (0)