[libvirt] [PATCH v2 0/9] test: Mock snapshot APIs and misc improvements
by Cole Robinson
This series implements snapshot and managed save APIs for the test driver,
and adds some misc improvements, like specifying domain state in the passed
in driver XML.
v2:
Use a separate XML namespace for the custom XML additions
Add snapshot REDEFINE support, sharing the generic logic with qemu
Cole Robinson (9):
test: Allow specifying object runstate in driver XML
test: Allow specifying object transient state in driver XML
test: Wire up managed save APIs
test: Implement readonly snapshot APIs
test: Implement snapshot create/delete/revert APIs
qemu: snapshots: Simplify REDEFINE flag check
qemu: snapshot: Break out redefine preparation to shared function
test: snapshot: Add REDEFINE support
test: Allow specifying domainsnapshot XML
src/conf/domain_conf.c | 3 +-
src/conf/snapshot_conf.c | 150 ++++++
src/conf/snapshot_conf.h | 7 +
src/libvirt_private.syms | 1 +
src/qemu/qemu_driver.c | 145 +-----
src/test/test_driver.c | 1236 +++++++++++++++++++++++++++++++++++++++++++++-
tests/virshtest.c | 2 +-
7 files changed, 1399 insertions(+), 145 deletions(-)
--
1.8.3.1
11 years, 2 months
[libvirt] [PATCH] spec: Only distribute ChangeLog in -devel package
by Cole Robinson
Helps save space on the Fedora livecd, as requested here:
https://bugzilla.redhat.com/show_bug.cgi?id=977099
---
libvirt.spec.in | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index e94901a..a327eab 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1739,7 +1739,6 @@ fi
%files daemon
%defattr(-, root, root)
-%doc AUTHORS ChangeLog.gz NEWS README COPYING COPYING.LESSER TODO
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
%if %{with_network}
@@ -2011,7 +2010,6 @@ fi
%files client -f %{name}.lang
%defattr(-, root, root)
-%doc AUTHORS ChangeLog.gz NEWS README COPYING COPYING.LESSER TODO
%config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf
%config(noreplace) %{_sysconfdir}/libvirt/virt-login-shell.conf
@@ -2081,6 +2079,7 @@ fi
%{_datadir}/libvirt/api/libvirt-qemu-api.xml
%{_datadir}/libvirt/api/libvirt-lxc-api.xml
+%doc AUTHORS ChangeLog.gz NEWS README COPYING COPYING.LESSER TODO
%doc docs/*.html docs/html docs/*.gif
%doc docs/libvirt-api.xml
%doc examples/hellolibvirt
--
1.8.3.1
11 years, 2 months
[libvirt] [PATCH 0/3] Refactor feature handling and add support for pvticketlocks
by Peter Krempa
The kernel recently added support for paravirtual spinlocks and
qemu will be following up soon. This series adds the support to libvirt.
Peter Krempa (3):
schema: Rename option to make it reusable
conf: Refactor storing and usage of feature flags
qemu: Add support for paravirtual spinlocks in the guest
docs/formatdomain.html.in | 7 +
docs/schemas/domaincommon.rng | 18 +-
src/conf/domain_conf.c | 186 ++++++++++++++-------
src/conf/domain_conf.h | 3 +-
src/libxl/libxl_conf.c | 9 +-
src/lxc/lxc_container.c | 6 +-
src/qemu/qemu_command.c | 30 +++-
src/vbox/vbox_tmpl.c | 45 +++--
src/xenapi/xenapi_driver.c | 10 +-
src/xenapi/xenapi_utils.c | 22 ++-
src/xenxs/xen_sxpr.c | 20 +--
src/xenxs/xen_xm.c | 30 ++--
.../qemuxml2argv-pv-spinlock-disabled.args | 5 +
.../qemuxml2argv-pv-spinlock-disabled.xml | 26 +++
.../qemuxml2argv-pv-spinlock-enabled.args | 5 +
.../qemuxml2argv-pv-spinlock-enabled.xml | 26 +++
tests/qemuxml2argvtest.c | 2 +
tests/qemuxml2xmltest.c | 2 +
18 files changed, 311 insertions(+), 141 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pv-spinlock-disabled.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pv-spinlock-disabled.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pv-spinlock-enabled.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pv-spinlock-enabled.xml
--
1.8.3.2
11 years, 2 months
[libvirt] [PATCH] virsh: Fix domdisplay when domain only uses TLS
by Christophe Fergeau
It's possible to create a domain which will only use a TLS port
and will not have a non-TLS port set by using:
<graphics type='spice' autoport='yes' defaultMode='secure'/>
In such a setup, the 'graphics' node for the running domain will be:
<graphics type='spice' tlsPort='5900'
autoport='yes' listen='127.0.0.1'
defaultMode='secure'>
However, cmdDomDisplay loops over all the 'graphics' node, and it
ignores nodes which don't have a 'port' attribute. This means
'virsh domdisplay' will only return an empty string for domains
as the one above.
This commit looks for both 'port' and 'tlsPort' before deciding
to ignore a graphics node. It also makes sure 'port' is not printed
when it's not set.
This makes 'virsh domdisplay' return
'spice://127.0.0.1?tls-port=5900' for domains using only a TLS
port.
Signed-off-by: Christophe Fergeau <cfergeau(a)redhat.com>
---
tools/virsh-domain.c | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 856e888..5e9d784 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -9073,6 +9073,20 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
/* If there is no port number for this type, then jump to the next
* scheme */
if (tmp)
+ port = 0;
+
+ /* Create our XPATH lookup for TLS Port (automatically skipped
+ * for unsupported schemes */
+ if (virAsprintf(&xpath, xpath_fmt, scheme[iter], "tlsPort") < 0)
+ goto cleanup;
+
+ /* Attempt to get the TLS port number */
+ tmp = virXPathInt(xpath, ctxt, &tls_port);
+ VIR_FREE(xpath);
+ if (tmp)
+ tls_port = 0;
+
+ if (!port && !tls_port)
continue;
/* Create our XPATH lookup for the current display's address */
@@ -9103,17 +9117,6 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
port -= 5900;
}
- /* Create our XPATH lookup for TLS Port (automatically skipped
- * for unsupported schemes */
- if (virAsprintf(&xpath, xpath_fmt, scheme[iter], "tlsPort") < 0)
- goto cleanup;
-
- /* Attempt to get the TLS port number */
- tmp = virXPathInt(xpath, ctxt, &tls_port);
- VIR_FREE(xpath);
- if (tmp)
- tls_port = 0;
-
/* Build up the full URI, starting with the scheme */
virBufferAsprintf(&buf, "%s://", scheme[iter]);
@@ -9128,7 +9131,8 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
virBufferAsprintf(&buf, "%s", listen_addr);
/* Add the port */
- virBufferAsprintf(&buf, ":%d", port);
+ if (port)
+ virBufferAsprintf(&buf, ":%d", port);
/* TLS Port */
if (tls_port) {
--
1.8.3.1
11 years, 2 months
[libvirt] [PATCH] virsh-domain: Add a missing check and fix leak in cmdScreenshot
by Hongwei Bi
---
tools/virsh-domain.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 856e888..7fe42df 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -4610,7 +4610,8 @@ cmdScreenshot(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, &name)))
return false;
- st = virStreamNew(ctl->conn, 0);
+ if (!(st = virStreamNew(ctl->conn, 0)))
+ goto cleanup;
mime = virDomainScreenshot(dom, st, screen, flags);
if (!mime) {
@@ -4620,7 +4621,7 @@ cmdScreenshot(vshControl *ctl, const vshCmd *cmd)
if (!file) {
if (!(file=vshGenFileName(ctl, dom, mime)))
- return false;
+ goto cleanup;
generated = true;
}
--
1.7.1
11 years, 2 months
[libvirt] [PATCH 0/6] Several Q35 related tweaks
by Laine Stump
These patches are all in response to the issues that Gerd Hoffman
raised in
https://bugzilla.redhat.com/show_bug.cgi?id=1003983
Three of the six are simple refactoring of existing code, done
separately so that the patches that change functionality would be
simpler to review. None of them is very long.
Laine Stump (6):
qemu: eliminate redundant if clauses in qemuCollectPCIAddress
qemu: allow some PCI devices to be attached to PCIe slots
qemu: replace multiple strcmps with a switch on an enum
qemu: support ich9-intel-hda audio device
qemu: turn if into switch in qemuDomainValidateDevicePCISlotsQ35
qemu: prefer to put a Q35 machine's dmi-to-pci-bridge at 00:1E.0
docs/schemas/domaincommon.rng | 1 +
src/conf/domain_conf.c | 6 +-
src/conf/domain_conf.h | 1 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 197 +++++++++++++++------
src/qemu/qemu_command.h | 4 +
tests/qemuxml2argvdata/qemuxml2argv-pcie-root.args | 2 +-
.../qemuxml2argv-pcihole64-q35.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-q35.args | 2 +-
.../qemuxml2argv-sound-device.args | 7 +-
.../qemuxml2argvdata/qemuxml2argv-sound-device.xml | 5 +
tests/qemuxml2argvtest.c | 3 +-
13 files changed, 175 insertions(+), 58 deletions(-)
--
1.8.3.1
11 years, 2 months
[libvirt] regarding libvirt development.
by cooldharma06
hi,
i wish to give my contribution for the libvirt development.
Any guide or documentation available for libvirt development.
Or Any suggestions you have about the development means, please guide me.
Regards
cooldharma06
11 years, 2 months
[libvirt] [PATCH] virsh-domain: Free dom before return false in cmdDump
by Hongwei Bi
---
tools/virsh-domain.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 856e888..f6d4edd 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -4487,8 +4487,10 @@ cmdDump(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, &name)))
return false;
- if (vshCommandOptStringReq(ctl, cmd, "file", &to) < 0)
+ if (vshCommandOptStringReq(ctl, cmd, "file", &to) < 0) {
+ virDomainFree(dom);
return false;
+ }
if (vshCommandOptBool(cmd, "verbose"))
verbose = true;
--
1.7.1
11 years, 3 months
Re: [libvirt] [PATCH] virsh-domain: Free dom before return false in cmdDump
by Hongwei Bi
Yes, 'goto cleanup' would be better.
2013/9/25 Hongwei Bi <hwbi2008(a)gmail.com>
> Yes, 'goto cleanup' would be better.
>
>
> 2013/9/25 Ján Tomko <jtomko(a)redhat.com>
>
>> On 09/25/2013 07:49 AM, Hongwei Bi wrote:
>> >
>> >
>> > ---
>> > tools/virsh-domain.c | 4 +++-
>> > 1 files changed, 3 insertions(+), 1 deletions(-)
>> >
>> > diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
>> > index 856e888..f6d4edd 100644
>> > --- a/tools/virsh-domain.c
>> > +++ b/tools/virsh-domain.c
>> > @@ -4487,8 +4487,10 @@ cmdDump(vshControl *ctl, const vshCmd *cmd)
>> > if (!(dom = vshCommandOptDomain(ctl, cmd, &name)))
>> > return false;
>> >
>> > - if (vshCommandOptStringReq(ctl, cmd, "file", &to) < 0)
>> > + if (vshCommandOptStringReq(ctl, cmd, "file", &to) < 0) {
>> > + virDomainFree(dom);
>> > return false;
>> > + }
>>
>> 'goto cleanup' would do the same and it's easier to read.
>>
>> Alternatively, if we moved vshCommandOptStringReq before
>> vshCommandOptDomain,
>> 'return false' would be enough.
>>
>> Jan
>>
>
>
11 years, 3 months
[libvirt] [PATCH v4 0/2] don't masquerade local broadcast/multicast packets
by Laszlo Ersek
v2->v4 changes (v3 went in a different direction):
- Rename iptables(Add|Remove)ForwardDontMasquerade to
iptables(Add|Remove)DontMasquerade [Laine].
Masquerading local broadcast breaks DHCP replies for some clients.
There has been a report about broken local multicast too.
(See references in the patches.)
Testing:
Chain POSTROUTING (policy ACCEPT 2 packets, 134 bytes)
pkts bytes target prot opt in out source destination
0 0 RETURN all -- * * 192.168.122.0/24 224.0.0.0/24
0 0 RETURN all -- * * 192.168.122.0/24 255.255.255.255
0 0 MASQUERADE tcp -- * * 192.168.122.0/24 !192.168.122.0/24 masq ports: 1024-65535
0 0 MASQUERADE udp -- * * 192.168.122.0/24 !192.168.122.0/24 masq ports: 1024-65535
0 0 MASQUERADE all -- * * 192.168.122.0/24 !192.168.122.0/24
+ make check, make syntax-check, virsh net-start / net-destroy.
Laszlo Ersek (2):
util/viriptables: add/remove rules that short-circuit masquerading
bridge driver: don't masquerade local subnet broadcast/multicast
packets
src/util/viriptables.h | 8 ++++
src/network/bridge_driver_linux.c | 70 +++++++++++++++++++++++++++++--
src/util/viriptables.c | 88 +++++++++++++++++++++++++++++++++++++++
src/libvirt_private.syms | 2 +
4 files changed, 164 insertions(+), 4 deletions(-)
--
1.8.3.1
11 years, 3 months