[libvirt] cpulimit and kvm process

2010-10-01 Thread Mihamina Rakotomandimby
Manao ahoana, Hello, Bonjour, I would like to launch several KVM guests on a multicore CPU. The number of the KVM process is over the number of physical cores. I would like to limit each KVM process to say... 10% of CPU I first use cpulimit Would you know some better way to limit them? it's

[libvirt] Ejecting ISO from cdrom

2010-10-01 Thread Jaromír Červenka
Hello, how can I remove ISO image from cdrom in running domain, please? I tried procedure which is described on your wiki ( http://wiki.libvirt.org/page/QEMUSwitchToLibvirt#eject_DEV) but it doesn't work for me: divinus:/kvm/iso # virsh attach-disk --type cdrom --mode readonly leon.i-tux.cz hdc

Re: [libvirt] [PATCH] phyp: Verify that domain XML contains at least one disk element

2010-10-01 Thread Matthias Bolte
2010/9/30 Eric Blake ebl...@redhat.com: On 09/30/2010 01:18 PM, Matthias Bolte wrote: phypBuildLpar expects that at least one disk element is provided. ---  src/phyp/phyp_driver.c |   18 +++---  1 files changed, 11 insertions(+), 7 deletions(-) diff --git

Re: [libvirt] Ejecting ISO from cdrom

2010-10-01 Thread Zdenek Styblik
On 10/01/2010 09:37 AM, Zdenek Styblik wrote: On 10/01/2010 09:17 AM, Jaromír Červenka wrote: Hello, how can I remove ISO image from cdrom in running domain, please? I tried procedure which is described on your wiki ( http://wiki.libvirt.org/page/QEMUSwitchToLibvirt#eject_DEV) but it doesn't

Re: [libvirt] [PATCH 12/12] food for thought

2010-10-01 Thread Daniel Veillard
On Wed, Sep 29, 2010 at 06:09:22PM -0600, Eric Blake wrote: Here's where I ran out of time for the day. I'm much less familiar with xen than with qemu, so I have no idea how to tell if xen's documented domain/vcpu_avail (which is what we want for current vcpus) is usable in contrast to

Re: [libvirt] [PATCH 01/12] vcpu: improve cpuset attribute

2010-10-01 Thread Daniel Veillard
On Wed, Sep 29, 2010 at 06:02:05PM -0600, Eric Blake wrote: The vcpu cpuset=... attribute has been available since commit e193b5dd, but without documentation or RNG validation. * docs/schemas/domain.rng (vcpu): Further validate cpuset. * docs/formatdomain.html.in: Document it. *

Re: [libvirt] [PATCH 03/12] vcpu: add new public API

2010-10-01 Thread Daniel Veillard
On Wed, Sep 29, 2010 at 06:02:07PM -0600, Eric Blake wrote: API agreed on in https://www.redhat.com/archives/libvir-list/2010-September/msg00456.html * include/libvirt/libvirt.h.in (virDomainVcpuFlags) (virDomainSetVcpusFlags, virDomainGetVcpusFlags): New declarations. *

Re: [libvirt] [PATCH 04/12] vcpu: define internal driver API

2010-10-01 Thread Daniel Veillard
On Wed, Sep 29, 2010 at 06:02:08PM -0600, Eric Blake wrote: * src/driver.h (virDrvDomainSetVcpusFlags) (virDrvDomainGetVcpusFlags): New typedefs. (_virDriver): New callback members. * src/esx/esx_driver.c (esxDriver): Add stub for driver. * src/lxc/lxc_driver.c (lxcDriver): Likewise. *

Re: [libvirt] [PATCH 05/12] vcpu: implement the public APIs

2010-10-01 Thread Daniel Veillard
On Wed, Sep 29, 2010 at 06:02:09PM -0600, Eric Blake wrote: * src/libvirt.c (virDomainSetVcpusFlags, virDomainGetVcpusFlags): New functions. --- Pretty mechanical. src/libvirt.c | 125 +++- 1 files changed, 122 insertions(+), 3

Re: [libvirt] [PATCH 06/12] vcpu: implement the remote protocol

2010-10-01 Thread Daniel Veillard
On Wed, Sep 29, 2010 at 06:02:10PM -0600, Eric Blake wrote: * daemon/remote.c (remoteDispatchDomainSetVcpusFlags) (remoteDispatchDomainGetVcpusFlags): New functions. * src/remote/remote_driver.c (remoteDomainSetVcpusFlags) (remoteDomainGetVcpusFlags, remote_driver): Client side serialization.

Re: [libvirt] [PATCH 07/12] vcpu: make old API trivially wrap to new API

2010-10-01 Thread Daniel Veillard
On Wed, Sep 29, 2010 at 06:02:11PM -0600, Eric Blake wrote: * src/esx/esx_driver.c (esxDomainSetVcpus, escDomainGetMaxVpcus): Move guts... (esxDomainSetVcpusFlags, esxDomainGetVcpusFlags): ...to new functions. (esxDriver): Trivially support the new API. * src/openvz/openvz_driver.c

Re: [libvirt] [PATCH 08/12] vcpu: support maxvcpu in domain_conf

2010-10-01 Thread Daniel Veillard
On Wed, Sep 29, 2010 at 06:02:12PM -0600, Eric Blake wrote: * src/conf/domain_conf.h (_virDomainDef): Adjust vcpus to unsigned short, to match virDomainGetInfo limit. Add maxvcpus member. [...] Two tightly-related changes. One: virDomainGetInfo implicitly limits vcpus to a 16-bit number;

Re: [libvirt] [PATCH 08/12] vcpu: support maxvcpu in domain_conf

2010-10-01 Thread Daniel Veillard
On Thu, Sep 30, 2010 at 01:27:27PM -0600, Eric Blake wrote: [self-review] On 09/29/2010 06:02 PM, Eric Blake wrote: Two tightly-related changes. One: virDomainGetInfo implicitly limits vcpus to a 16-bit number; so there's no need to pretend otherwise through the rest of the code. Two:

Re: [libvirt] [PATCH 09/12] vcpu: add virsh support

2010-10-01 Thread Daniel Veillard
On Wed, Sep 29, 2010 at 06:02:13PM -0600, Eric Blake wrote: * tools/virsh.c (cmdSetvcpus): Add new flags. Let invalid commands through to driver, to ease testing of hypervisor argument validation. (cmdVcpucount): New command. (commands): Add new command. * tools/virsh.pod (setvcpus,

Re: [libvirt] [PATCH 07/12] vcpu: make old API trivially wrap to new API

2010-10-01 Thread Matthias Bolte
2010/9/30 Eric Blake ebl...@redhat.com: * src/esx/esx_driver.c (esxDomainSetVcpus, escDomainGetMaxVpcus): Move guts... (esxDomainSetVcpusFlags, esxDomainGetVcpusFlags): ...to new functions. (esxDriver): Trivially support the new API. * src/openvz/openvz_driver.c (openvzDomainSetVcpus)

Re: [libvirt] [PATCH 10/12] vcpu: improve vcpu support in qemu command line

2010-10-01 Thread Daniel Veillard
On Wed, Sep 29, 2010 at 06:02:14PM -0600, Eric Blake wrote: * src/qemu/qemu_conf.c (qemuParseCommandLineSmp): Distinguish between vcpus and maxvcpus, for new enough qemu. * tests/qemuargv2xmltest.c (mymain): Add new test. * tests/qemuxml2argvtest.c (mymain): Likewise. *

Re: [libvirt] [PATCH 07/12] vcpu: make old API trivially wrap to new API

2010-10-01 Thread Eric Blake
On 10/01/2010 09:26 AM, Matthias Bolte wrote: @@ -2392,6 +2393,11 @@ esxDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus) esxVI_ManagedObjectReference *task = NULL; esxVI_TaskInfoState taskInfoState; +if (flags != VIR_DOMAIN_VCPU_ACTIVE) { +

Re: [libvirt] [PATCH 11/12] vcpu: complete vcpu support in qemu driver

2010-10-01 Thread Daniel Veillard
On Wed, Sep 29, 2010 at 06:09:21PM -0600, Eric Blake wrote: * src/qemu/qemu_driver.c (qemudDomainSetVcpusFlags) (qemudDomainGetVcpusFlags): Support all feasible flag combinations. --- Aargh - my ISP SMTP server said that 11 emails is the limit for one session, so I have to resend the last

Re: [libvirt] [PATCH 12/12] food for thought

2010-10-01 Thread Paolo Bonzini
On 10/01/2010 04:18 PM, Daniel Veillard wrote: I would think augmenting the sexpr should be sufficient for this but the problem is really to find out when the feature is available, and I don't know how to do this reliably either (except trying and if there is an identifiable error keep it

Re: [libvirt] [PATCH 01/12] vcpu: improve cpuset attribute

2010-10-01 Thread Eric Blake
On 10/01/2010 08:19 AM, Daniel Veillard wrote: On Wed, Sep 29, 2010 at 06:02:05PM -0600, Eric Blake wrote: Thevcpu cpuset=... attribute has been available since commit e193b5dd, but without documentation or RNG validation. * docs/schemas/domain.rng (vcpu): Further validate cpuset. *

[libvirt] RFC: automatic setting of ip_forwarding (or not)

2010-10-01 Thread Laine Stump
Currently libvirt will turn on net.ipv4.ip_forward by writing 1\n to /proc/sys/net/ipv4/ip_forward whenever a virtual network of with a forward mode of nat or route is started. This is problematic for two reasons: 1) /etc/sysctl.conf is not updated with this information, so any other process

[libvirt] [PATCH 3/4] xen: xenXMDomain*DeviceFlags should obey all flags

2010-10-01 Thread Jiri Denemark
xenXMDomain*DeviceFlags() silently ignores requests to modify live configuration of an active guest while still touching its persistent configuration. --- src/xen/xm_internal.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/xen/xm_internal.c

[libvirt] [PATCH 2/4] xen: Fix logic bug in xenDaemon*DeviceFlags

2010-10-01 Thread Jiri Denemark
--- src/xen/xend_internal.c | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index 1318bd4..4fba6af 100644 --- a/src/xen/xend_internal.c +++ b/src/xen/xend_internal.c @@ -3904,8 +3904,9 @@

[libvirt] [PATCH 4/4] xen: Fix virDomain{At,De}tachDevice

2010-10-01 Thread Jiri Denemark
According to API documentation virDomain{At,De}tachDevice calls are supposed to only work on active guests for device hotplug. For anything beyond that, their *Flags variants have to be used. Despite the variant which was acked on libvirt mailing list

[libvirt] [PATCH 1/4] xen: Make xenDaemon*DeviceFlags errors less confusing

2010-10-01 Thread Jiri Denemark
When a user calls to virDomain{Attach,Detach,Update}DeviceFlags() with flags == VIR_DOMAIN_DEVICE_MODIFY_LIVE on an inactive guest running on an old Xen hypervisor (such as RHEL-5) xend_internal driver reports: Xend version does not support modifying persistent config which is pretty

[libvirt] virt-install feature request

2010-10-01 Thread Stanley, Jon [Tech]
So virt-install is a really nice piece of software, but it's a bit too complicated for our use case :). We would want some mode of it to simply generate XML and go home :). The use case is that we have a script which carries out a number of other actions in addition to creating a guest, and

[libvirt] indentation (was: [PATCH 11/12] vcpu: complete vcpu support in qemu driver)

2010-10-01 Thread Eric Blake
On 10/01/2010 09:31 AM, Daniel Veillard wrote: -ret = qemudDomainHotplugVcpus(vm, nvcpus); +switch (flags) { +case VIR_DOMAIN_VCPU_MAXIMUM | VIR_DOMAIN_VCPU_PERSISTENT: hum I usually indent the cases 4 spaces from the switch, minor nit I just used what emacs gave by default,

Re: [libvirt] [PATCH 03/12] vcpu: add new public API

2010-10-01 Thread Eric Blake
On 10/01/2010 10:13 AM, Matthias Bolte wrote: However, in implementing things, I'm wondering if I should use the names: VIR_DOMAIN_VCPU_CONFIG (instead of VIR_DOMAIN_VCPU_PERSISTENT) VIR_DOMAIN_VCPU_LIVE (instead of VIR_DOMAIN_VCPU_ACTIVE) to match virDomainDeviceModifyFlags, where _CONFIG and

Re: [libvirt] RFC: automatic setting of ip_forwarding (or not)

2010-10-01 Thread Eric Blake
On 10/01/2010 12:46 PM, Laine Stump wrote: 3) Whenever a virtual network that would require ip_forward = 1 to operate properly is started (ie at libvirtd start time, and when a network is newly defined), check if it's currently on, and if not log a warning message, informing the admin that they

Re: [libvirt] RFC: automatic setting of ip_forwarding (or not)

2010-10-01 Thread Zdenek Styblik
Uh huh, hi? On 10/01/2010 08:46 PM, Laine Stump wrote: [...] to /etc/sysctl.conf and calling sysctl -a -p. This gives us the same behavior as currently, but with the advantages that a) our change to the config is documented in /etc/sysctl.conf and b) virtual networked guests won't suddenly

Re: [libvirt] [PATCH 1/4] xen: Make xenDaemon*DeviceFlags errors less confusing

2010-10-01 Thread Eric Blake
On 10/01/2010 02:09 PM, Jiri Denemark wrote: When a user calls to virDomain{Attach,Detach,Update}DeviceFlags() with flags == VIR_DOMAIN_DEVICE_MODIFY_LIVE on an inactive guest running on an old Xen hypervisor (such as RHEL-5) xend_internal driver reports: Xend version does not support

Re: [libvirt] [PATCH 2/4] xen: Fix logic bug in xenDaemon*DeviceFlags

2010-10-01 Thread Eric Blake
On 10/01/2010 02:09 PM, Jiri Denemark wrote: --- src/xen/xend_internal.c | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index 1318bd4..4fba6af 100644 --- a/src/xen/xend_internal.c +++

Re: [libvirt] [PATCH 3/4] xen: xenXMDomain*DeviceFlags should obey all flags

2010-10-01 Thread Jim Fehlig
Jiri Denemark wrote: xenXMDomain*DeviceFlags() silently ignores requests to modify live configuration of an active guest while still touching its persistent configuration. --- src/xen/xm_internal.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git

Re: [libvirt] [PATCH 2/4] xen: Fix logic bug in xenDaemon*DeviceFlags

2010-10-01 Thread Jim Fehlig
Eric Blake wrote: On 10/01/2010 02:09 PM, Jiri Denemark wrote: --- src/xen/xend_internal.c | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index 1318bd4..4fba6af 100644 --- a/src/xen/xend_internal.c +++

[libvirt] [PATCH] nwfilter: fix memory leaks

2010-10-01 Thread Stefan Berger
Fixing memory leak shown by valgrind and freeing buffer in two more places. Signed-off-by: Stefan Berger stef...@us.ibm.com Index: libvirt-acl/src/nwfilter/nwfilter_ebiptables_driver.c === ---

Re: [libvirt] RFC: automatic setting of ip_forwarding (or not)

2010-10-01 Thread Stefan Berger
On 10/01/2010 04:40 PM, Eric Blake wrote: On 10/01/2010 12:46 PM, Laine Stump wrote: 3) Whenever a virtual network that would require ip_forward = 1 to operate properly is started (ie at libvirtd start time, and when a network is newly defined), check if it's currently on, and if not log a

[libvirt] [patch 5/5] nwfilter: Extend docs with information about the comment attribute

2010-10-01 Thread Stefan Berger
I am adding a row with information about the newly supported state attribute to each of the tables describing supported attributes of protocols. Signed-off-by: Stefan Berger stef...@us.ibm.com --- docs/formatnwfilter.html.in | 30 ++ 1 file changed, 30

[libvirt] [patch 0/5] nwfilter: add a 'state' attribute to protocols

2010-10-01 Thread Stefan Berger
The following patch series introduces an attribute 'state' for iptables- supported protocols. This gives the user more control over the 'state match' of the underlying ip(6)tables implementation and allows to create filtering rules that are more efficient to evaluate. TCK test cases will be posted

[libvirt] [patch 2/5] nwfilter: Instantiate state match in ip(6)tables rules

2010-10-01 Thread Stefan Berger
In this patch I am extending the rule instantiator to create the state match according to the state attribute in the XML. Only one iptables rule in the incoming or outgoing direction will be created for a rule in direction 'in' or 'out' respectively. A rule in direction 'inout' does get iptables

[libvirt] [patch 4/5] nwfilter: Extend schema to accept state attribute

2010-10-01 Thread Stefan Berger
Extend the nwfilter.rng schema to accept state attributes. Signed-off-by: Stefan Berger stef...@us.ibm.com --- docs/schemas/nwfilter.rng | 11 +++ 1 file changed, 11 insertions(+) Index: libvirt-acl/docs/schemas/nwfilter.rng

[libvirt] [patch 3/5] nwfilter: Add test case for testing the state attribute

2010-10-01 Thread Stefan Berger
This patch adds a test case for testing the XML parser's and instantiator's support of the state attribute. The other test case tests existing capabilities. Both test cases will be used in TCK again. Signed-off-by: Stefan Berger stef...@us.ibm.com --- tests/nwfilterxml2xmlin/example-1.xml |