diff --git a/qvm-tools/qvm-ls b/qvm-tools/qvm-ls index 90d9e9d9..adc4eb9f 100755 --- a/qvm-tools/qvm-ls +++ b/qvm-tools/qvm-ls @@ -80,7 +80,10 @@ fields = { "kernel" : {"func" : "('*' if vm.uses_default_kernel else '') + str(vm.kernel) if hasattr(vm, 'kernel') else 'n/a'"}, "kernelopts" : {"func" : "('*' if vm.uses_default_kernelopts else '') + str(vm.kernelopts) if hasattr(vm, 'kernelopts') else 'n/a'"}, - "on" : {"func" : "'*' if vm.is_running() else ''"} + "on" : {"func" : "'*' if vm.is_running() else ''"}, + + "last backup" : {"func": "str(vm.backup_timestamp.date()) if " + "vm.backup_timestamp else '-'"}, } @@ -114,6 +117,10 @@ def main(): action="store_true", default=False, help="Show Qubes and Xen id#s") + parser.add_option("-b", "--last-backup", dest="backup", + action="store_true", default=False, + help="Show date of last VM backup") + (options, args) = parser.parse_args () @@ -137,6 +144,9 @@ def main(): if (options.mem): fields_to_display += ["mem"] + if options.backup: + fields_to_display += ["last backup"] + if (options.network): if 'template' in fields_to_display: fields_to_display.remove ("template") diff --git a/qvm-tools/qvm-prefs b/qvm-tools/qvm-prefs index 7482eac7..c8df775d 100755 --- a/qvm-tools/qvm-prefs +++ b/qvm-tools/qvm-prefs @@ -45,6 +45,7 @@ def do_list(vm): print fmt.format ("autostart", vm.autostart) print fmt.format ("installed_by_rpm", vm.installed_by_rpm) print fmt.format ("include_in_backups", vm.include_in_backups) + print fmt.format ("last_backup", vm.backup_timestamp) print fmt.format ("dir", vm.dir_path) print fmt.format ("config", vm.conf_file) print fmt.format ("pcidevs", vm.pcidevs)