diff --git a/dom0/qvm-tools/qvm-ls b/dom0/qvm-tools/qvm-ls index d4e4e0ee..ac94a71d 100755 --- a/dom0/qvm-tools/qvm-ls +++ b/dom0/qvm-tools/qvm-ls @@ -76,6 +76,9 @@ fields = { "label" : {"func" : "vm.label.name"}, + "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 ''"} } @@ -102,6 +105,10 @@ def main(): action="store_true", default=False, help="Show VM disk utilization statistics") + parser.add_option ("-k", "--kernel", dest="kernel", + action="store_true", default=False, + help="Show VM kernel options") + parser.add_option ("-i", "--ids", dest="ids", action="store_true", default=False, help="Show Qubes and Xen id#s") @@ -141,6 +148,9 @@ def main(): fields_to_display.remove ("netvm") fields_to_display += ["priv-curr", "priv-max", "root-curr", "root-max", "disk" ] + if (options.kernel): + fields_to_display += ["kernel", "kernelopts" ] + vms_list = [vm for vm in qvm_collection.values()] no_vms = len (vms_list)