[gnome-boxes/improve-storage-management-ux: 5/7] libvirt-mavhine: Return domain_disk also for external disks
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/improve-storage-management-ux: 5/7] libvirt-mavhine: Return domain_disk also for external disks
- Date: Mon, 13 Dec 2021 15:06:42 +0000 (UTC)
commit b12c58ff5d348e31832de68de741bc22e4a728f4
Author: Felipe Borges <felipeborges gnome org>
Date: Mon Dec 13 16:01:34 2021 +0100
libvirt-mavhine: Return domain_disk also for external disks
We used to return a DomainDisk object only when the disk was internal
to Boxes (created by us).
This returns whatever disk is assigned to the virtual machine, be
it internal or external.
src/libvirt-machine.vala | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index d07d7cac..26d1fe12 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -419,14 +419,11 @@ public void try_shutdown () {
if (device_config is GVirConfig.DomainDisk) {
var disk_config = device_config as GVirConfig.DomainDisk;
var disk_type = disk_config.get_guest_device_type ();
- var storage_volume_path = (storage_volume != null)? storage_volume.get_path () : null;
- // Prefer Boxes' managed volume over other disks
- if (disk_type == GVirConfig.DomainDiskGuestDeviceType.DISK &&
- disk_config.get_source () == storage_volume_path) {
+ if (disk_type == GVirConfig.DomainDiskGuestDeviceType.DISK) {
disk = Object.new (typeof (GVir.DomainDisk),
"domain", domain,
- "config", device_config) as GVir.DomainDisk;
+ "config", disk_config) as GVir.DomainDisk;
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]