virDomainSetMemory is documented to change only runtime configuration of running domain. This can't be implemented for vz driver as it always change persistent state too. Let's extend semantics of this function for changes to be hyperviror specific. As a result 'virsh setmem' without parameters (which ends up in virDomainSetMemory call) would be possible for a vz domain. By the way, virsh documentation for this case states that behaviour is hypervisor specific already. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx> --- src/libvirt-domain.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index de7eb04..56ab907 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -1882,8 +1882,9 @@ virDomainSetMaxMemory(virDomainPtr domain, unsigned long memory) * to Domain0 i.e. the domain where the application runs. * This function may require privileged access to the hypervisor. * - * This command only changes the runtime configuration of the domain, - * so can only be called on an active domain. + * This command is hypervisor-specific for whether active, persistent, + * or both configurations are changed; for more control, use + * virDomainSetMemoryFlags(). * * Returns 0 in case of success and -1 in case of failure. */ -- 1.7.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list