dom0/qvm-ls: add 'kernel' and 'kernelopts' columns
This commit is contained in:
parent
812264cfb0
commit
39b15033aa
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user