| Summary: | virDomainSetMaxMemory doesn't work | ||
|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | Preethi Ramesh <iampreethiramesh> |
| Component: | libvirt | Assignee: | Libvirt Maintainers <libvirt-maint> |
| Status: | CLOSED NOTABUG | QA Contact: | |
| Severity: | urgent | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | crobinso, eblake, xen-maint |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-04-28 15:57:20 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
That API is for changing the max memory value of a running VM, which requires hypervisor support, which isn't available in KVM. If you want to change the max memory value of the guest on it's next boot, you have to edit the guest XML and call conn.define_domain(newxml) Also, upstream libvirt 0.9.1 will be adding virDomainSetMemoryFlags, which can be used as an alternative to hand-editing the XML for modifying the persistent settings of both current and maximum memory, even while a domain is running. However, even with the new API, you cannot modify maximum memory of a running KVM guest, only the persistent settings which affect the next boot of the guest. |
Description of problem: libvirt.libvirtError: this function is not supported by the connection driver: virDomainSetMaxMemory Version-Release number of selected component (if applicable): 0.8.3 How reproducible: Easy Steps to Reproduce: 1.Execute the python attachment with the name of a VM and the new maximum memory as input parameters Actual results: pre@pre-Inspiron-N4010:~/pyth code$ python edit-vm-conf-dyn.py hda3 256000 524288 libvir: error : this function is not supported by the connection driver: virDomainSetMaxMemory Traceback (most recent call last): File "edit-vm-conf-dyn.py", line 11, in <module> dom.setMaxMemory(maxMemory) File "/usr/lib/python2.6/dist-packages/libvirt.py", line 627, in setMaxMemory if ret == -1: raise libvirtError ('virDomainSetMaxMemory() failed', dom=self) libvirt.libvirtError: this function is not supported by the connection driver: virDomainSetMaxMemory Expected results: Change the VM Memory configuration while VM is running Additional info: