Signed-off-by: Yu Mingfei<[email protected]>
---
client/virt/libvirt_vm.py | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/client/virt/libvirt_vm.py b/client/virt/libvirt_vm.py
index 996a185..559bb9e 100644
--- a/client/virt/libvirt_vm.py
+++ b/client/virt/libvirt_vm.py
@@ -658,6 +658,20 @@ def virsh_pool_create_as(name, _type, target, extra="",
uri=""):
return False
+def virsh_setmem(name, size, options="", uri="",
+ ignore_status=False, print_info=False):
+ """
+ Change the current memory allocation in the guest domain.
+
+ @param name: name of domain.
+ @param size: the memory size to set.
+ @param options: options of command virsh setmem, it can be
+ --config/--live/--current or mix them.
+ """
+ cmd = "setmem --domain %s %s %s" % (name, size, options)
+ return virsh_cmd(cmd, uri, ignore_status, print_info)
+
+
class VM(virt_vm.BaseVM):
"""
This class handles all basic VM operations for libvirt.
-- 1.7.1
--
Best Regards
Yu Mingfei
_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel