[Libvir] Add 'setvcpus', 'setmem', 'setmaxmem' to virsh

The attached patch adds three new commands to virsh: setmem change memory allocation setmaxmem change maximum memory limit setvcpus change number of virtual CPUs It also ensures then when using the 'test' hypervisor driver, it always opens a read-write connection even as non-root. The test hypervisor does not have any distinction between privileged / unprivileged users, so this test for 'uuid == 0' was bogus. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

On Wed, Aug 16, 2006 at 03:26:33PM +0100, Daniel P. Berrange wrote:
The attached patch adds three new commands to virsh:
setmem change memory allocation setmaxmem change maximum memory limit setvcpus change number of virtual CPUs
It also ensures then when using the 'test' hypervisor driver, it always opens a read-write connection even as non-root. The test hypervisor does not have any distinction between privileged / unprivileged users, so this test for 'uuid == 0' was bogus.
Looks fine to me. Maybe it's time to block operations with side effect on read-only connections in libvirt. I'm tempted to add th checks now, especially since we use the proxy for non-root users on Xen. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
participants (2)
-
Daniel P. Berrange
-
Daniel Veillard