From 96555186b3eb42b5cb81171c36fc076e8e91696a Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Wed, 8 Mar 2023 15:47:54 +0000 Subject: [PATCH] runtime-rs: ch: Honour debug setting Enable Cloud Hypervisor debug based on the specified configuration rather than hard-coding debug to be disabled. Signed-off-by: James O. D. Hunt --- .../crates/hypervisor/src/ch/inner_hypervisor.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/runtime-rs/crates/hypervisor/src/ch/inner_hypervisor.rs b/src/runtime-rs/crates/hypervisor/src/ch/inner_hypervisor.rs index 3a2631c35e..04fd72494c 100644 --- a/src/runtime-rs/crates/hypervisor/src/ch/inner_hypervisor.rs +++ b/src/runtime-rs/crates/hypervisor/src/ch/inner_hypervisor.rs @@ -229,7 +229,13 @@ impl CloudHypervisorInner { async fn cloud_hypervisor_launch(&mut self, _timeout_secs: i32) -> Result<()> { self.cloud_hypervisor_ensure_not_launched().await?; - let debug = false; + let cfg = self + .config + .as_ref() + .ok_or("no hypervisor config for CH") + .map_err(|e| anyhow!(e))?; + + let debug = cfg.debug_info.enable_debug; let disable_seccomp = true;