[gnome-boxes/hide-snapshots-for-uefi] libvirt-machine-properties: Show Snapshot tab only when supported
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/hide-snapshots-for-uefi] libvirt-machine-properties: Show Snapshot tab only when supported
- Date: Fri, 4 Sep 2020 08:32:29 +0000 (UTC)
commit 80dbe58bb0e85a36dd54b81455516f4e56d620db
Author: Felipe Borges <felipeborges gnome org>
Date: Fri Sep 4 10:29:44 2020 +0200
libvirt-machine-properties: Show Snapshot tab only when supported
Unfortunately we can't snapshot EFI guests yet, see
https://gitlab.gnome.org/GNOME/gnome-boxes/-/commit/8b4eaf4a7f24
Although that is in the works and will likely be available in our
next stable version.
https://gitlab.gnome.org/GNOME/gnome-boxes/-/issues/199#note_862711
Fixes #592
src/libvirt-machine-properties.vala | 2 +-
src/libvirt-machine.vala | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 4661bd2b..93c59e9f 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -146,7 +146,7 @@ public string collect_logs () {
case PropertiesPage.SNAPSHOTS:
try {
var config = machine.domain.get_config (0);
- if (!VMConfigurator.is_install_config (config))
+ if (!VMConfigurator.is_install_config (config) && !machine.firmware_is_efi)
add_snapshots_property (ref list);
} catch (GLib.Error e) {
warning (e.message);
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index 28fa7878..fad51144 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -85,6 +85,14 @@
}
}
+ public bool firmware_is_efi {
+ get {
+ var os = domain_config.get_os ();
+
+ return (os.get_firmware () == GVirConfig.DomainOsFirmware.EFI);
+ }
+ }
+
public override bool is_local {
get {
// If the URI is prefixed by "qemu" or "qemu+unix" and the domain is "system" of "session" then
it is local.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]