[libvirt] Call for mentors and project ideas for Google Summer of Code 2016
by Stefan Hajnoczi
The QEMU wiki page for Google Summer of Code 2016 is now available here:
http://qemu-project.org/Google_Summer_of_Code_2016
QEMU will apply for Google Summer of Code 2016 (https://g.co/gsoc/).
If QEMU is accepted there will be funding for students to work on
12-week full-time open source projects remotely from May to August
2016. QEMU provides a mentor for each student who gives advice and
evaluates their progress.
If you have a project idea, especially if you are a regular
contributor to QEMU and are willing to mentor this summer, please go
to this wiki page and fill out the project idea template:
http://qemu-project.org/Google_Summer_of_Code_2016
The project ideas list is part of the application so that QEMU can
participate in GSoC. It's useful to have your project ideas on the
wiki by February 8th 2016.
If you have any questions about project ideas or QEMU applying to
GSoC, please reply to this thread.
Thanks,
Stefan
9 years, 2 months
[libvirt] [PATCH] util: fix build without macvtap
by Roman Bogorodskiy
Commit 370608b added new functions:
- virNetDevMacVLanReleaseName,
- virNetDevMacVLanReserveName.
Add stubbed versions of them to fix build without macvtap.
---
src/util/virnetdevmacvlan.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c
index da71eef..9293510 100644
--- a/src/util/virnetdevmacvlan.c
+++ b/src/util/virnetdevmacvlan.c
@@ -1330,4 +1330,21 @@ int virNetDevMacVLanVPortProfileRegisterCallback(const char *ifname ATTRIBUTE_UN
_("Cannot create macvlan devices on this platform"));
return -1;
}
+
+int
+virNetDevMacVLanReserveName(const char *name ATTRIBUTE_UNUSED,
+ bool quietFail ATTRIBUTE_UNUSED)
+{
+ virReportSystemError(ENOSYS, "%s",
+ _("The macvlan devices are not supported on this platform"));
+ return -1;
+}
+
+int
+virNetDevMacVLanReleaseName(const char *name ATTRIBUTE_UNUSED)
+{
+ virReportSystemError(ENOSYS, "%s",
+ _("The macvlan devices are not supported on this platform"));
+ return -1;
+}
#endif /* ! WITH_MACVTAP */
--
2.4.6
9 years, 2 months
[libvirt] [PATCH] Fix libvirtd free() segfault when migrating guest with deleted open vswitch port
by Jason J. Herne
libvirtd crashes on free()ing portData for an open vswitch port if that port
was deleted. To reproduce:
ovs-vsctl del-port vnet0
virsh migrate --live kvm1 qemu+ssh://dstHost/system
Error message:
libvirtd: *** Error in `/usr/sbin/libvirtd': free(): invalid pointer: 0x000003ff90001e20 ***
The problem is that virCommandRun can return an empty string in the event that
the port being queried does not exist. When this happens then we are
unconditionally overwriting a newline character at position strlen()-1. When
strlen is 0, we overwrite memory that does not belong to the string.
The fix: Only overwrite the newline if the string is not empty.
Reviewed-by: Bjoern Walk <bwalk(a)linux.vnet.ibm.com>
Signed-off-by: Jason J. Herne <jjherne(a)linux.vnet.ibm.com>
---
src/util/virnetdevopenvswitch.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c
index 6780fb5..0f640d0 100644
--- a/src/util/virnetdevopenvswitch.c
+++ b/src/util/virnetdevopenvswitch.c
@@ -222,8 +222,10 @@ int virNetDevOpenvswitchGetMigrateData(char **migrate, const char *ifname)
goto cleanup;
}
- /* Wipeout the newline */
- (*migrate)[strlen(*migrate) - 1] = '\0';
+ /* Wipeout the newline, if it exists */
+ if (strlen(*migrate) > 0) {
+ (*migrate)[strlen(*migrate) - 1] = '\0';
+ }
ret = 0;
cleanup:
virCommandFree(cmd);
--
1.9.1
9 years, 2 months
[libvirt] [PATCH] virnetdevmacvlan: Provide stubs for build without macvtap
by Michal Privoznik
In 370608b4c76f we have introduced two new internal APIs.
However, there are no stubs for build without macvtap. Therefore
build on systems lacking macvtap support (e.g. mingw or freebds)
fails when trying to link.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed under build breaker and trivial rules.
src/util/virnetdevmacvlan.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c
index da71eef..2409113 100644
--- a/src/util/virnetdevmacvlan.c
+++ b/src/util/virnetdevmacvlan.c
@@ -1330,4 +1330,19 @@ int virNetDevMacVLanVPortProfileRegisterCallback(const char *ifname ATTRIBUTE_UN
_("Cannot create macvlan devices on this platform"));
return -1;
}
+
+int virNetDevMacVLanReleaseName(const char *name ATTRIBUTE_UNUSED)
+{
+ virReportSystemError(ENOSYS, "%s",
+ _("Cannot create macvlan devices on this platform"));
+ return -1;
+}
+
+int virNetDevMacVLanReserveName(const char *name ATTRIBUTE_UNUSED,
+ bool quietFail ATTRIBUTE_UNUSED)
+{
+ virReportSystemError(ENOSYS, "%s",
+ _("Cannot create macvlan devices on this platform"));
+ return -1;
+}
#endif /* ! WITH_MACVTAP */
--
2.4.10
9 years, 2 months
[libvirt] high outage times for qemu virtio network links during live migration, trying to debug
by Chris Friesen
Hi,
I'm using libvirt (1.2.12) with qemu (2.2.0) in the context of OpenStack.
If I live-migrate a guest with virtio network interfaces, I see a ~1200msec
delay in processing the network packets, and several hundred of them get
dropped. I get the dropped packets, but I'm not sure why the delay is there.
I instrumented qemu and libvirt, and the strange thing is that this delay seems
to happen before qemu actually starts doing any migration-related work. (i.e.
before qmp_migrate() is called)
Looking at my timestamps, the start of the glitch seems to coincide with
libvirtd calling qemuDomainMigratePrepareTunnel3Params(), and the end of the
glitch occurs when the migration is complete and we're up and running on the
destination.
My question is, why doesn't qemu continue processing virtio packets while the
dirty page scanning and memory transfer over the network is proceeding?
Thanks,
Chris
(Please CC me on responses, I'm not subscribed to the lists.)
9 years, 2 months
[libvirt] [PATCH] vircgroup: Finish renaming of virCgroupIsolateMount
by Michal Privoznik
In dc576025c360 we renamed virCgroupIsolateMount function to
virCgroupBindMount. However, we forgot about one occurrence in
section of the code which provides stubs for platforms without
support for CGroups like *BSD for instance.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed under build-breaker and trivial rules.
src/util/vircgroup.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index d7f4065..9b56e27 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -4882,9 +4882,9 @@ virCgroupGetFreezerState(virCgroupPtr group ATTRIBUTE_UNUSED,
int
-virCgroupIsolateMount(virCgroupPtr group ATTRIBUTE_UNUSED,
- const char *oldroot ATTRIBUTE_UNUSED,
- const char *mountopts ATTRIBUTE_UNUSED)
+virCgroupBindMount(virCgroupPtr group ATTRIBUTE_UNUSED,
+ const char *oldroot ATTRIBUTE_UNUSED,
+ const char *mountopts ATTRIBUTE_UNUSED)
{
virReportSystemError(ENOSYS, "%s",
_("Control groups not supported on this platform"));
--
2.4.10
9 years, 2 months
[libvirt] [PATCH v2 0/4] various test fixes and handling of input devices
by Pavel Hrdina
Some of the patches from v1 series are already pushed, only those 4 left for
review.
Pavel Hrdina (4):
tests: use virtTestDifferenceFull in tests where we have output file
tests: add some missing tests to qemuxml2xmltest
device: cleanup input device code
tests: update test XML files to follow input changes
src/Makefile.am | 4 +-
src/conf/domain_conf.c | 82 +++-------------------
src/libxl/libxl_domain.c | 5 ++
src/qemu/qemu_domain.c | 23 ++++++
src/xen/xen_driver.c | 5 ++
src/xenapi/xenapi_driver.c | 5 ++
src/xenconfig/xen_common.c | 22 ++++++
src/xenconfig/xen_common.h | 2 +
.../disk_snapshot_redefine.xml | 2 +
.../external_vm_redefine.xml | 2 +
tests/domainsnapshotxml2xmlout/full_domain.xml | 2 +
tests/domainsnapshotxml2xmlout/metadata.xml | 2 +
tests/domainsnapshotxml2xmltest.c | 2 +-
tests/interfacexml2xmltest.c | 2 +-
tests/lxcconf2xmltest.c | 2 +-
tests/nodedevxml2xmltest.c | 2 +-
tests/qemuhotplugtest.c | 11 ++-
.../qemuhotplug-hotplug-base+disk-scsi.xml | 2 +
.../qemuhotplug-hotplug-base+disk-usb.xml | 2 +
.../qemuhotplug-hotplug-base+disk-virtio.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-bios-nvram.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-blkdeviotune.xml | 2 +
.../qemuxml2argv-blkiotune-device.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-blkiotune.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-boot-floppy.xml | 2 +
.../qemuxml2argv-boot-menu-disable.xml | 2 +
.../qemuxml2argv-boot-menu-enable-with-timeout.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-boot-network.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml | 2 +
.../qemuxml2argv-channel-guestfwd.xml | 2 +
.../qemuxml2argv-channel-virtio.xml | 2 +
.../qemuxml2argv-chardev-label.xml | 2 +
.../qemuxml2argv-clock-catchup.xml | 2 +
.../qemuxml2argv-clock-localtime.xml | 2 +
.../qemuxml2argv-clock-timer-hyperv-rtc.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml | 2 +
.../qemuxml2argv-console-compat.xml | 2 +
.../qemuxml2argv-console-virtio-many.xml | 2 +
.../qemuxml2argv-cpu-eoi-disabled.xml | 2 +
.../qemuxml2argv-cpu-eoi-enabled.xml | 2 +
.../qemuxml2argv-cpu-host-kvmclock.xml | 2 +
.../qemuxml2argv-cpu-host-model-features.xml | 2 +
.../qemuxml2argv-cpu-host-passthrough-features.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.xml | 2 +
.../qemuxml2argv-cpu-numa-disjoint.xml | 2 +
.../qemuxml2argv-cpu-numa-memshared.xml | 2 +
...xml2argv-cputune-iothreadsched-zeropriority.xml | 2 +
.../qemuxml2argv-cputune-numatune.xml | 2 +
.../qemuxml2argv-cputune-zero-shares.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-cputune.xml | 2 +
.../qemuxml2argv-disk-active-commit.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml | 2 +
.../qemuxml2argv-disk-cdrom-empty.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml | 2 +
.../qemuxml2argv-disk-copy_on_read.xml | 2 +
.../qemuxml2argv-disk-drive-boot-cdrom.xml | 3 +
.../qemuxml2argv-disk-drive-boot-disk.xml | 3 +
.../qemuxml2argv-disk-drive-cache-directsync.xml | 2 +
.../qemuxml2argv-disk-drive-cache-unsafe.xml | 2 +
.../qemuxml2argv-disk-drive-cache-v2-none.xml | 2 +
.../qemuxml2argv-disk-drive-cache-v2-wb.xml | 2 +
.../qemuxml2argv-disk-drive-cache-v2-wt.xml | 2 +
.../qemuxml2argv-disk-drive-copy-on-read.xml | 2 +
...muxml2argv-disk-drive-error-policy-enospace.xml | 2 +
.../qemuxml2argv-disk-drive-error-policy-stop.xml | 2 +
...rgv-disk-drive-error-policy-wreport-rignore.xml | 2 +
.../qemuxml2argv-disk-drive-fat.xml | 2 +
.../qemuxml2argv-disk-drive-fmt-qcow.xml | 2 +
.../qemuxml2argv-disk-drive-network-gluster.xml | 2 +
.../qemuxml2argv-disk-drive-network-iscsi-auth.xml | 2 +
.../qemuxml2argv-disk-drive-network-iscsi.xml | 2 +
.../qemuxml2argv-disk-drive-network-nbd-export.xml | 2 +
...xml2argv-disk-drive-network-nbd-ipv6-export.xml | 2 +
.../qemuxml2argv-disk-drive-network-nbd-ipv6.xml | 2 +
.../qemuxml2argv-disk-drive-network-nbd-unix.xml | 2 +
.../qemuxml2argv-disk-drive-network-nbd.xml | 2 +
.../qemuxml2argv-disk-drive-network-rbd-auth.xml | 2 +
...emuxml2argv-disk-drive-network-rbd-ceph-env.xml | 2 +
.../qemuxml2argv-disk-drive-network-rbd-ipv6.xml | 2 +
.../qemuxml2argv-disk-drive-network-rbd.xml | 2 +
.../qemuxml2argv-disk-drive-network-sheepdog.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-disk-floppy.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-disk-mirror.xml | 2 +
.../qemuxml2argv-disk-scsi-device.xml | 2 +
.../qemuxml2argv-disk-scsi-disk-vpd.xml | 2 +
...qemuxml2argv-disk-scsi-lun-passthrough-sgio.xml | 2 +
.../qemuxml2argv-disk-scsi-megasas.xml | 2 +
.../qemuxml2argv-disk-scsi-virtio-scsi.xml | 2 +
.../qemuxml2argv-disk-scsi-vscsi.xml | 2 +
.../qemuxml2argv-disk-source-pool-mode.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml | 2 +
.../qemuxml2argv-disk-virtio-scsi-cmd_per_lun.xml | 2 +
.../qemuxml2argv-disk-virtio-scsi-ioeventfd.xml | 2 +
.../qemuxml2argv-disk-virtio-scsi-max_sectors.xml | 2 +
.../qemuxml2argv-disk-virtio-scsi-num_queues.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-disk-virtio.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml | 2 +
.../qemuxml2argv-encrypted-disk.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-eoi-disabled.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-eoi-enabled.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml | 2 +
.../qemuxml2argv-floppy-drive-fat.xml | 2 +
.../qemuxml2argv-hostdev-pci-address.xml | 2 +
.../qemuxml2argv-hostdev-scsi-large-unit.xml | 2 +
.../qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.xml | 2 +
.../qemuxml2argv-hostdev-scsi-lsi-iscsi.xml | 2 +
.../qemuxml2argv-hostdev-scsi-lsi.xml | 2 +
.../qemuxml2argv-hostdev-scsi-rawio.xml | 2 +
.../qemuxml2argv-hostdev-scsi-readonly.xml | 2 +
.../qemuxml2argv-hostdev-scsi-sgio.xml | 2 +
.../qemuxml2argv-hostdev-scsi-shareable.xml | 2 +
...qemuxml2argv-hostdev-scsi-virtio-iscsi-auth.xml | 2 +
.../qemuxml2argv-hostdev-scsi-virtio-iscsi.xml | 2 +
.../qemuxml2argv-hostdev-scsi-virtio-scsi.xml | 2 +
.../qemuxml2argv-hostdev-usb-address.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-hostdev-vfio.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-hotplug-base.xml | 2 +
.../qemuxml2argv-hugepages-pages.xml | 2 +
.../qemuxml2argv-hugepages-pages2.xml | 2 +
.../qemuxml2argv-hugepages-pages3.xml | 2 +
.../qemuxml2argv-hugepages-shared.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-hyperv-off.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-hyperv-panic.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-hyperv.xml | 2 +
.../qemuxml2argv-input-usbmouse.xml | 2 +
.../qemuxml2argv-input-usbtablet.xml | 2 +
.../qemuxml2argv-interface-driver.xml | 2 +
.../qemuxml2argv-iothreads-disk.xml | 2 +
.../qemuxml2argv-iothreads-ids-partial.xml | 2 +
.../qemuxml2argv-iothreads-ids.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-iothreads.xml | 2 +
.../qemuxml2argv-kvm-features-off.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-kvm-features.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-lease.xml | 2 +
.../qemuxml2argv-machine-core-off.xml | 2 +
.../qemuxml2argv-machine-core-on.xml | 2 +
.../qemuxml2argv-memory-hotplug-dimm.xml | 2 +
.../qemuxml2argv-memory-hotplug-nonuma.xml | 2 +
.../qemuxml2argv-memory-hotplug.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-migrate.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-minimal.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml | 2 +
.../qemuxml2argv-misc-disable-s3.xml | 2 +
.../qemuxml2argv-misc-disable-suspends.xml | 2 +
.../qemuxml2argv-misc-enable-s4.xml | 2 +
.../qemuxml2argv-misc-no-reboot.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml | 2 +
.../qemuxml2argv-net-eth-ifname.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml | 2 +
.../qemuxml2argv-net-hostdev-vfio.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-net-hostdev.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-net-midonet.xml | 2 +
.../qemuxml2argv-net-openvswitch.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-net-udp.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-net-user.xml | 2 +
.../qemuxml2argv-net-vhostuser.xml | 2 +
.../qemuxml2argv-net-virtio-device.xml | 2 +
.../qemuxml2argv-net-virtio-disable-offloads.xml | 2 +
.../qemuxml2argv-net-virtio-network-portgroup.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml | 2 +
.../qemuxml2argv-nographics-vga.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-nosharepages.xml | 2 +
.../qemuxml2argv-numad-static-vcpu-no-numatune.xml | 2 +
.../qemuxml2argv-numatune-memnode-no-memory.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-panic-double.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-panic-isa.xml | 2 +
.../qemuxml2argv-panic-no-address.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-pci-rom.xml | 2 +
.../qemuxml2argv-pci-serial-dev-chardev.xml | 2 +
.../qemuxml2argv-pcie-root-port-too-many.xml | 2 +
.../qemuxml2argv-pcie-root-port.xml | 2 +
.../qemuxml2argv-pcie-switch-downstream-port.xml | 2 +
.../qemuxml2argv-pcie-switch-upstream-port.xml | 2 +
.../qemuxml2argv-pcihole64-none.xml | 2 +
.../qemuxml2argv-pcihole64-q35.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-pcihole64.xml | 2 +
.../qemuxml2argv-pmu-feature-off.xml | 2 +
.../qemuxml2argv-pv-spinlock-disabled.xml | 2 +
.../qemuxml2argv-pv-spinlock-enabled.xml | 2 +
.../qemuxml2argv-qemu-ns-no-env.xml | 2 +
.../qemuxml2argv-reboot-timeout-disabled.xml | 2 +
.../qemuxml2argv-reboot-timeout-enabled.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml | 2 +
.../qemuxml2argv-seclabel-dac-none.xml | 2 +
.../qemuxml2argv-seclabel-device-multiple.xml | 2 +
.../qemuxml2argv-seclabel-dynamic-baselabel.xml | 2 +
.../qemuxml2argv-seclabel-dynamic-none.xml | 2 +
.../qemuxml2argv-seclabel-dynamic-override.xml | 2 +
.../qemuxml2argv-seclabel-static-labelskip.xml | 2 +
.../qemuxml2argv-seclabel-static.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-serial-file.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-serial-many.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml | 2 +
.../qemuxml2argv-serial-spiceport-nospice.xml | 2 +
.../qemuxml2argv-serial-tcp-telnet.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-serial-unix.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-shmem.xml | 2 +
.../qemuxml2argv-smbios-multiple-type2.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-smbios.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-smp.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-sound-device.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-sound.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-tap-vhost.xml | 2 +
.../qemuxml2argv-tpm-passthrough.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-usb-redir.xml | 2 +
.../qemuxml2argv-vcpu-placement-static.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-vhost_queues.xml | 2 +
.../qemuxml2argv-video-virtio-gpu-device.xml | 2 +
.../qemuxml2argv-video-virtio-gpu-virgl.xml | 2 +
.../qemuxml2argv-virtio-input-passthrough.xml | 2 +
.../qemuxml2argvdata/qemuxml2argv-virtio-input.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml | 2 +
.../qemuxml2argv-virtio-rng-egd.xml | 2 +
.../qemuxml2argv-virtio-rng-random.xml | 2 +
tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml | 2 +
tests/qemuxml2argvtest.c | 1 +
.../qemuxml2xmlout-balloon-device-auto.xml | 2 +
.../qemuxml2xmlout-balloon-device-period.xml | 2 +
.../qemuxml2xmlout-bios-nvram-os-interleave.xml | 2 +
...muxml2xmlout-boot-menu-disable-with-timeout.xml | 2 +
.../qemuxml2xmlout-channel-virtio-auto.xml | 2 +
.../qemuxml2xmlout-channel-virtio-state-active.xml | 2 +
...emuxml2xmlout-channel-virtio-state-inactive.xml | 2 +
.../qemuxml2xmlout-console-compat-auto.xml | 2 +
.../qemuxml2xmlout-console-compat2.xml | 2 +
.../qemuxml2xmlout-console-virtio.xml | 2 +
.../qemuxml2xmlout-controller-usb-order.xml | 2 +
.../qemuxml2xmlout-cpu-empty.xml | 2 +
.../qemuxml2xmlout-cpu-numa-disordered.xml | 2 +
.../qemuxml2xmlout-cpu-numa-no-memory-element.xml | 2 +
.../qemuxml2xmlout-cpu-numa1.xml | 2 +
.../qemuxml2xmlout-cpu-numa2.xml | 2 +
.../qemuxml2xmlout-cputune-iothreads.xml | 2 +
.../qemuxml2xmlout-cputune-iothreadsched.xml | 2 +
.../qemuxml2xmlout-default-kvm-host-arch.xml | 2 +
.../qemuxml2xmlout-default-qemu-host-arch.xml | 2 +
.../qemuxml2xmlout-disk-backing-chains-active.xml | 2 +
...qemuxml2xmlout-disk-backing-chains-inactive.xml | 2 +
.../qemuxml2xmlout-disk-drive-discard.xml | 2 +
.../qemuxml2xmlout-disk-mirror-old-inactive.xml | 2 +
.../qemuxml2xmlout-disk-mirror-old.xml | 2 +
.../qemuxml2xmlout-disk-mirror.xml | 2 +
.../qemuxml2xmlout-disk-scsi-device-auto.xml | 2 +
.../qemuxml2xmlout-disk-source-pool.xml | 2 +
...qemuxml2xmlout-hostdev-scsi-autogen-address.xml | 2 +
.../qemuxml2xmlout-memtune-unlimited.xml | 2 +
.../qemuxml2xmloutdata/qemuxml2xmlout-memtune.xml | 2 +
.../qemuxml2xmlout-metadata-duplicate.xml | 2 +
.../qemuxml2xmloutdata/qemuxml2xmlout-metadata.xml | 2 +
...emuxml2xmlout-numad-auto-memory-vcpu-cpuset.xml | 2 +
...ad-auto-memory-vcpu-no-cpuset-and-placement.xml | 2 +
.../qemuxml2xmlout-numad-auto-vcpu-no-numatune.xml | 2 +
.../qemuxml2xmlout-numatune-auto-prefer.xml | 2 +
.../qemuxml2xmlout-numatune-memnode.xml | 2 +
tests/qemuxml2xmloutdata/qemuxml2xmlout-panic.xml | 2 +
.../qemuxml2xmlout-pci-autoadd-addr.xml | 2 +
.../qemuxml2xmlout-pci-autoadd-idx.xml | 2 +
.../qemuxml2xmlout-pci-bridge-many-disks.xml | 2 +
.../qemuxml2xmlout-pcie-root.xml | 2 +
.../qemuxml2xmlout-pcihole64-gib.xml | 2 +
.../qemuxml2xmlout-pmu-feature.xml | 2 +
tests/qemuxml2xmloutdata/qemuxml2xmlout-q35.xml | 2 +
.../qemuxml2xmlout-seclabel-dynamic-labelskip.xml | 2 +
.../qemuxml2xmlout-seclabel-dynamic-relabel.xml | 2 +
.../qemuxml2xmlout-seclabel-none.xml | 2 +
.../qemuxml2xmlout-serial-target-port-auto.xml | 2 +
.../qemuxml2xmlout-tap-vhost-incorrect.xml | 2 +
.../qemuxml2xmlout-usb-ich9-ehci-addr.xml | 2 +
.../qemuxml2xmlout-usb-redir-filter-version.xml | 2 +
.../qemuxml2xmlout-usb-redir-filter.xml | 2 +
tests/qemuxml2xmltest.c | 23 ++++++
tests/sexpr2xmldata/sexpr2xml-boot-grub.xml | 2 +
tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml | 2 +
.../sexpr2xml-disk-block-shareable.xml | 2 +
tests/sexpr2xmldata/sexpr2xml-disk-block.xml | 2 +
.../sexpr2xml-disk-drv-blktap-qcow.xml | 2 +
.../sexpr2xml-disk-drv-blktap-raw.xml | 2 +
.../sexpr2xml-disk-drv-blktap2-raw.xml | 2 +
tests/sexpr2xmldata/sexpr2xml-disk-file.xml | 2 +
tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml | 2 +
tests/sexpr2xmldata/sexpr2xml-net-bridged.xml | 2 +
tests/sexpr2xmldata/sexpr2xml-net-e1000.xml | 2 +
tests/sexpr2xmldata/sexpr2xml-net-routed.xml | 2 +
tests/sexpr2xmldata/sexpr2xml-pci-devs.xml | 2 +
.../sexpr2xml-pv-bootloader-cmdline.xml | 2 +
tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml | 2 +
tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml | 2 +
tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml | 2 +
tests/sexpr2xmldata/sexpr2xml-pv.xml | 2 +
tests/vmx2xmldata/vmx2xml-graphics-vnc.xml | 2 -
tests/xlconfigdata/test-paravirt-maxvcpus.xml | 2 +
tests/xmconfigdata/test-paravirt-maxvcpus.xml | 2 +
tests/xmconfigdata/test-paravirt-vcpu.xml | 2 +
303 files changed, 684 insertions(+), 85 deletions(-)
--
2.7.0
9 years, 2 months
[libvirt] [PATCH] lxc: don't try to hide parent cgroups inside container
by Daniel P. Berrange
On the host when we start a container, it will be
placed in a cgroup path of
/machine.slice/machine-lxc\x2ddemo.scope
under /sys/fs/cgroup/*
Inside the containers' namespace we need to setup
/sys/fs/cgroup mounts, and currently will bind
mount /machine.slice/machine-lxc\x2ddemo.scope on
the host to appear as / in the container.
While this may sound nice, it confuses applications
dealing with cgroups, because /proc/$PID/cgroup
now does not match the directory in /sys/fs/cgroup
This particularly causes problems for systems and
will make it create repeated path components in
the cgroup for apps run in the container eg
/machine.slice/machine-lxc\x2ddemo.scope/machine.slice/machine-lxc\x2ddemo.scope/user.slice/user-0.slice/session-61.scope
This also causes any systemd service that uses
sd-notify to fail to start, because when systemd
receives the notification it won't be able to
identify the corresponding unit it came from.
In particular this break rabbitmq-server startup
Future kernels will provide proper cgroup namespacing
which will handle this problem, but until that time
we should not try to play games with hiding parent
cgroups.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/libvirt_private.syms | 2 +-
src/lxc/lxc_container.c | 2 +-
src/util/vircgroup.c | 9 ++++-----
src/util/vircgroup.h | 6 +++---
4 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 5e05a98..1732421 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1194,6 +1194,7 @@ virCgroupAllowDevice;
virCgroupAllowDeviceMajor;
virCgroupAllowDevicePath;
virCgroupAvailable;
+virCgroupBindMount;
virCgroupControllerAvailable;
virCgroupControllerTypeFromString;
virCgroupControllerTypeToString;
@@ -1231,7 +1232,6 @@ virCgroupGetMemSwapUsage;
virCgroupGetPercpuStats;
virCgroupHasController;
virCgroupHasEmptyTasks;
-virCgroupIsolateMount;
virCgroupKill;
virCgroupKillPainfully;
virCgroupKillRecursive;
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index c5a70a1..a6805ac 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -1827,7 +1827,7 @@ static int lxcContainerSetupPivotRoot(virDomainDefPtr vmDef,
/* Now we can re-mount the cgroups controllers in the
* same configuration as before */
- if (virCgroupIsolateMount(cgroup, "/.oldroot/", sec_mount_options) < 0)
+ if (virCgroupBindMount(cgroup, "/.oldroot/", sec_mount_options) < 0)
goto cleanup;
/* Mounts /dev */
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 7584ee4..d7f4065 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -3917,8 +3917,8 @@ virCgroupGetFreezerState(virCgroupPtr group, char **state)
int
-virCgroupIsolateMount(virCgroupPtr group, const char *oldroot,
- const char *mountopts)
+virCgroupBindMount(virCgroupPtr group, const char *oldroot,
+ const char *mountopts)
{
int ret = -1;
size_t i;
@@ -3954,10 +3954,9 @@ virCgroupIsolateMount(virCgroupPtr group, const char *oldroot,
if (!virFileExists(group->controllers[i].mountPoint)) {
char *src;
- if (virAsprintf(&src, "%s%s%s",
+ if (virAsprintf(&src, "%s%s",
oldroot,
- group->controllers[i].mountPoint,
- group->controllers[i].placement) < 0)
+ group->controllers[i].mountPoint) < 0)
goto cleanup;
VIR_DEBUG("Create mount point '%s'",
diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h
index 63a9e1c..d754b1f 100644
--- a/src/util/vircgroup.h
+++ b/src/util/vircgroup.h
@@ -286,9 +286,9 @@ int virCgroupKill(virCgroupPtr group, int signum);
int virCgroupKillRecursive(virCgroupPtr group, int signum);
int virCgroupKillPainfully(virCgroupPtr group);
-int virCgroupIsolateMount(virCgroupPtr group,
- const char *oldroot,
- const char *mountopts);
+int virCgroupBindMount(virCgroupPtr group,
+ const char *oldroot,
+ const char *mountopts);
bool virCgroupSupportsCpuBW(virCgroupPtr cgroup);
--
2.5.0
9 years, 2 months
[libvirt] Compiling libvirt on Cygwin
by Maarten Jacobs
Hello,
I have been trying to get libvirt compiled on Cygwin but I have run into a rather perplexing issue.
I am running a 32-bit installation of Cygwin on Windows 10:
CYGWIN_NT-10.0-WOW dell-desktop 2.4.0(0.293/5/3) 2016-01-15 16:14 i686 Cygwin
I have had to "fix" a number of problems in the Makefile that prevented the code from linking properly. I am not sure if the fixes are entirely correct - but as long as the linker was ok I pressed on.
After applying those changes to the Makefile, I ran into the following issue when creating libvirtd.exe:
CCLD libvirtd.exe../src/.libs/libvirt_driver_remote.a(libvirt_net_rpc_la-virnetmessage.o): In function `virNetMessageNew':/home/maart/source/libvirt/src/rpc/virnetmessage.c:39: multiple definition of `virNetMessageNew'/home/maart/source/libvirt/src/.libs/libvirt.dll.a(d002143.o):(.text+0x0): first defined here...collect2: error: ld returned 1 exit statusMakefile:2152: recipe for target 'libvirtd.exe' failedmake[3]: *** [libvirtd.exe] Error 1make[3]: Leaving directory '/cygdrive/c/cygwin64/home/maart/source/libvirt/daemon'Makefile:2050: recipe for target 'all' failedmake[2]: *** [all] Error 2make[2]: Leaving directory '/cygdrive/c/cygwin64/home/maart/source/libvirt/daemon'Makefile:1993: recipe for target 'all-recursive' failedmake[1]: *** [all-recursive] Error 1make[1]: Leaving directory '/cygdrive/c/cygwin64/home/maart/source/libvirt'Makefile:1887: recipe for target 'all' failedmake: *** [all] Error 2
It appears to me that somehow when the executable is linked together, it finds two separate definitions of the virNetMessageNew method, however I cannot figure out how that could be.
If anybody has any suggestions on how to debug this I'd appreciate it.
For clarity: my aim is to get the code to compile first, whether or not it will actually work under Cygwin. I do not believe there should be a specific reason why this code could not be made to compile/link - even if the end result may not work as intended... But I hope to find that out once I successfully create the resulting executables.
Thanks,
Maarten Jacobs
9 years, 2 months
[libvirt] [PATCH] qemu: turn on virtlockd by default
by Daniel P. Berrange
We have had virtlockd available for a long time now but
have always defaulted to the 'nop' lock driver which does
no locking. This gives users an unsafe deployment by
default unless they know to turn on lockd. virtlockd will
auto-activate via systemd when guests launch, so setting
it on by default will only cause upgrade pain for people
on non-systemd distros.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/qemu/qemu.conf | 3 ++-
src/qemu/qemu_driver.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index 4fa5e8a..73f4a0a 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -421,7 +421,8 @@
# share one writable disk, libvirt offers two approaches for
# locking files. The first one is sanlock, the other one,
# virtlockd, is then our own implementation. Accepted values
-# are "sanlock" and "lockd".
+# are "sanlock", "lockd" and "nop", with "lockd" being the
+# default.
#
#lock_manager = "lockd"
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index e46404b..36fb047 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -728,7 +728,7 @@ qemuStateInitialize(bool privileged,
if (!(qemu_driver->lockManager =
virLockManagerPluginNew(cfg->lockManagerName ?
- cfg->lockManagerName : "nop",
+ cfg->lockManagerName : "lockd",
"qemu",
cfg->configBaseDir,
0)))
--
2.5.0
9 years, 2 months