diff --git a/src/runtime-rs/crates/hypervisor/src/dragonball/inner_device.rs b/src/runtime-rs/crates/hypervisor/src/dragonball/inner_device.rs index 4e16cd070e..d4b9b0a8a6 100644 --- a/src/runtime-rs/crates/hypervisor/src/dragonball/inner_device.rs +++ b/src/runtime-rs/crates/hypervisor/src/dragonball/inner_device.rs @@ -359,6 +359,7 @@ impl DragonballInner { queue_size: Some(config.queue_size as u16), backend: dragonball::api::v1::Backend::VhostUser(DragonballVhostUserConfig { sock_path: config.socket_path.clone(), + ..Default::default() }), guest_mac, use_shared_irq: None, diff --git a/src/runtime-rs/crates/resource/src/network/endpoint/vhost_user_endpoint.rs b/src/runtime-rs/crates/resource/src/network/endpoint/vhost_user_endpoint.rs index 15d47f46c1..4ecdda99d9 100644 --- a/src/runtime-rs/crates/resource/src/network/endpoint/vhost_user_endpoint.rs +++ b/src/runtime-rs/crates/resource/src/network/endpoint/vhost_user_endpoint.rs @@ -58,6 +58,10 @@ impl VhostUserEndpoint { fn get_network_config(&self) -> VhostUserConfig { VhostUserConfig { + // Name the device after the virt interface, as the virtio-net and + // vhost-net paths do, so the hypervisor identifies it by a name + // the runtime knows rather than by its socket path. + dev_id: self.name.clone(), socket_path: self.socket_path.clone(), mac_address: self.guest_mac.clone(), device_type: VhostUserType::Net,