mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Remove FsConfig from VmConfig when unplugging fs device
All hotpluggable devices were properly removed from the VmConfig when a
remove-device command was issued, except for the "fs" type. Fix this
lack of support as it is causing the integration tests to fail with the
recent addition of verifying that identifiers are unique.
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
(cherry picked from commit a5a2e591c9)
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
1e557fdb3c
commit
e2eb59bcc8
@@ -1477,6 +1477,11 @@ impl Vm {
|
|||||||
disks.retain(|dev| dev.id.as_ref() != Some(&id));
|
disks.retain(|dev| dev.id.as_ref() != Some(&id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove if fs device
|
||||||
|
if let Some(fs) = config.fs.as_mut() {
|
||||||
|
fs.retain(|dev| dev.id.as_ref() != Some(&id));
|
||||||
|
}
|
||||||
|
|
||||||
// Remove if net device
|
// Remove if net device
|
||||||
if let Some(net) = config.net.as_mut() {
|
if let Some(net) = config.net.as_mut() {
|
||||||
net.retain(|dev| dev.id.as_ref() != Some(&id));
|
net.retain(|dev| dev.id.as_ref() != Some(&id));
|
||||||
|
|||||||
Reference in New Issue
Block a user