MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / resolve_launch_plan_backend

Method resolve_launch_plan_backend

crates/openshell-driver-vm/src/driver.rs:1377–1402  ·  view source on GitHub ↗
(
        &self,
        sandbox_id: &str,
        is_gpu: bool,
        gpu_bdf: Option<String>,
        plan: &mut LaunchPlan,
    )

Source from the content-addressed store, hash-verified

1375
1376 #[allow(clippy::result_large_err)]
1377 fn resolve_launch_plan_backend(
1378 &self,
1379 sandbox_id: &str,
1380 is_gpu: bool,
1381 gpu_bdf: Option<String>,
1382 plan: &mut LaunchPlan,
1383 ) -> Result<(), Status> {
1384 if plan.kernel_image.is_some() {
1385 plan.require_backend_feature(BackendFeature::ExternalKernelImage);
1386 }
1387 if !plan.guest_init_dropins.is_empty() {
1388 plan.require_backend_feature(BackendFeature::GuestInitDropins);
1389 }
1390
1391 if plan.required_backends.contains(&VmBackend::Qemu)
1392 || plan.backend == VmBackend::Qemu
1393 || plan
1394 .required_backend_features
1395 .iter()
1396 .any(|feature| feature.requires_qemu())
1397 {
1398 self.configure_qemu_launch_plan(sandbox_id, is_gpu, gpu_bdf, plan)?;
1399 }
1400
1401 Ok(())
1402 }
1403
1404 #[allow(clippy::result_large_err)]
1405 fn configure_qemu_launch_plan(

Calls 4

requires_qemuMethod · 0.80
is_emptyMethod · 0.45