On 26.02.2016 14:02, Martin Kletzander wrote:
Per-domain directories were introduced in order to be able to
completely separate security labels for each domain (commit
f1f68ca33433825ce0deed2d96f1990200bc6618). However when the domain
name is long (let's say a ridiculous 110 characters), we cannot
connect to the monitor socket because on length of UNIX socket address
is limited. In order to get around this, let's shorten it in similar
fashion and in order to avoid conflicts, throw in an ID there as well.
Also save that into the status XML and load the old status XMLs
properly (to clean up after older domains). That way we can change it
in the future.
The shortening can be seen in qemuxml2argv tests, for example in the
hugepages-pages2 case.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
It would be nice to have this in this release, but the problem exists
since 1.2.19, so it's not a hard requirement.
src/qemu/qemu_command.c | 21 +++---
src/qemu/qemu_command.h | 11 ++--
src/qemu/qemu_domain.c | 75 ++++++++++++++++++++++
src/qemu/qemu_domain.h | 8 +++
src/qemu/qemu_driver.c | 16 ++++-
src/qemu/qemu_process.c | 46 ++++++-------
src/qemu/qemu_process.h | 5 +-
.../qemuxml2argv-aarch64-aavmf-virtio-mmio.args | 2 +-
.../qemuxml2argv-aarch64-cpu-passthrough.args | 2 +-
.../qemuxml2argv-aarch64-gic-host.args | 2 +-
.../qemuxml2argv-aarch64-gic-v2.args | 2 +-
.../qemuxml2argv-aarch64-gic-v3.args | 2 +-
.../qemuxml2argv-aarch64-kvm-32-on-64.args | 2 +-
.../qemuxml2argv-aarch64-virt-default-nic.args | 2 +-
.../qemuxml2argv-aarch64-virt-virtio.args | 2 +-
.../qemuxml2argv-aarch64-virtio-pci-default.args | 2 +-
...l2argv-aarch64-virtio-pci-manual-addresses.args | 2 +-
.../qemuxml2argv-arm-vexpressa9-basic.args | 2 +-
.../qemuxml2argv-arm-vexpressa9-nodevs.args | 2 +-
.../qemuxml2argv-arm-vexpressa9-virtio.args | 2 +-
.../qemuxml2argv-arm-virt-virtio.args | 2 +-
.../qemuxml2argv-balloon-ccw-deflate.args | 2 +-
.../qemuxml2argv-balloon-device-auto.args | 2 +-
.../qemuxml2argv-balloon-device-deflate-off.args | 2 +-
.../qemuxml2argv-balloon-device-deflate.args | 2 +-
.../qemuxml2argv-balloon-device-period.args | 2 +-
.../qemuxml2argv-balloon-device.args | 2 +-
.../qemuxml2argv-balloon-mmio-deflate.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-bios-nvram.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-bios.args | 2 +-
.../qemuxml2argv-blkdeviotune-max.args | 2 +-
.../qemuxml2argv-blkdeviotune.args | 2 +-
.../qemuxml2argv-blkiotune-device.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-blkiotune.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-boot-cdrom.args | 2 +-
.../qemuxml2argv-boot-complex-bootindex.args | 2 +-
.../qemuxml2argv-boot-complex.args | 2 +-
.../qemuxml2argv-boot-floppy-q35.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-boot-floppy.args | 2 +-
...xml2argv-boot-menu-disable-drive-bootindex.args | 2 +-
.../qemuxml2argv-boot-menu-disable-drive.args | 2 +-
.../qemuxml2argv-boot-menu-disable.args | 2 +-
...qemuxml2argv-boot-menu-enable-with-timeout.args | 2 +-
.../qemuxml2argv-boot-menu-enable.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-boot-multi.args | 2 +-
.../qemuxml2argv-boot-network.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-boot-order.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-boot-strict.args | 2 +-
.../qemuxml2argv-bootindex-floppy-q35.args | 2 +-
.../qemuxml2argv-channel-guestfwd.args | 3 +-
.../qemuxml2argv-channel-spicevmc-old.args | 2 +-
.../qemuxml2argv-channel-spicevmc.args | 2 +-
.../qemuxml2argv-channel-virtio-auto.args | 3 +-
.../qemuxml2argv-channel-virtio-autoadd.args | 3 +-
.../qemuxml2argv-channel-virtio-autoassign.args | 3 +-
.../qemuxml2argv-channel-virtio-default.args | 3 +-
.../qemuxml2argv-channel-virtio-state.args | 3 +-
.../qemuxml2argv-channel-virtio-unix.args | 15 +++--
.../qemuxml2argv-channel-virtio.args | 3 +-
.../qemuxml2argv-clock-catchup.args | 2 +-
.../qemuxml2argv-clock-france.args | 2 +-
.../qemuxml2argv-clock-hpet-off.args | 2 +-
...muxml2argv-clock-localtime-basis-localtime.args | 2 +-
.../qemuxml2argv-clock-localtime.args | 2 +-
.../qemuxml2argv-clock-timer-hyperv-rtc.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args | 2 +-
.../qemuxml2argv-clock-variable.args | 2 +-
.../qemuxml2argv-console-compat-auto.args | 2 +-
.../qemuxml2argv-console-compat-chardev.args | 3 +-
.../qemuxml2argv-console-compat.args | 2 +-
.../qemuxml2argv-console-sclp.args | 3 +-
.../qemuxml2argv-console-virtio-ccw.args | 3 +-
.../qemuxml2argv-console-virtio-many.args | 3 +-
.../qemuxml2argv-console-virtio-s390.args | 3 +-
.../qemuxml2argv-console-virtio.args | 3 +-
.../qemuxml2argv-controller-order.args | 3 +-
.../qemuxml2argv-cpu-Haswell-noTSX.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-Haswell.args | 2 +-
.../qemuxml2argv-cpu-Haswell2.args | 2 +-
.../qemuxml2argv-cpu-Haswell3.args | 2 +-
.../qemuxml2argv-cpu-eoi-disabled.args | 2 +-
.../qemuxml2argv-cpu-eoi-enabled.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-exact1.args | 2 +-
.../qemuxml2argv-cpu-exact2-nofallback.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-exact2.args | 2 +-
.../qemuxml2argv-cpu-fallback.args | 2 +-
.../qemuxml2argv-cpu-host-kvmclock.args | 2 +-
.../qemuxml2argv-cpu-host-model-fallback.args | 2 +-
.../qemuxml2argv-cpu-host-model-vendor.args | 2 +-
.../qemuxml2argv-cpu-host-model.args | 2 +-
...qemuxml2argv-cpu-host-passthrough-features.args | 2 +-
.../qemuxml2argv-cpu-host-passthrough.args | 2 +-
.../qemuxml2argv-cpu-kvmclock.args | 2 +-
.../qemuxml2argv-cpu-minimum1.args | 2 +-
.../qemuxml2argv-cpu-minimum2.args | 2 +-
.../qemuxml2argv-cpu-numa-disjoint.args | 2 +-
.../qemuxml2argv-cpu-numa-no-memory-element.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-cpu-numa1.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-cpu-numa2.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-strict1.args | 2 +-
.../qemuxml2argv-cpu-topology1.args | 2 +-
.../qemuxml2argv-cpu-topology2.args | 2 +-
.../qemuxml2argv-cpu-topology3.args | 2 +-
.../qemuxml2argv-cputune-numatune.args | 2 +-
.../qemuxml2argv-cputune-zero-shares.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-cputune.args | 2 +-
.../qemuxml2argv-default-kvm-host-arch.args | 2 +-
.../qemuxml2argv-default-qemu-host-arch.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args | 2 +-
.../qemuxml2argv-disk-blockio.args | 2 +-
.../qemuxml2argv-disk-cdrom-empty.args | 2 +-
.../qemuxml2argv-disk-cdrom-network-ftp.args | 2 +-
.../qemuxml2argv-disk-cdrom-network-ftps.args | 2 +-
.../qemuxml2argv-disk-cdrom-network-http.args | 2 +-
.../qemuxml2argv-disk-cdrom-network-https.args | 2 +-
.../qemuxml2argv-disk-cdrom-network-tftp.args | 2 +-
...qemuxml2argv-disk-cdrom-tray-no-device-cap.args | 2 +-
.../qemuxml2argv-disk-cdrom-tray.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-disk-cdrom.args | 2 +-
.../qemuxml2argv-disk-copy_on_read.args | 2 +-
.../qemuxml2argv-disk-drive-boot-cdrom.args | 2 +-
.../qemuxml2argv-disk-drive-boot-disk.args | 2 +-
.../qemuxml2argv-disk-drive-cache-directsync.args | 2 +-
.../qemuxml2argv-disk-drive-cache-unsafe.args | 2 +-
.../qemuxml2argv-disk-drive-cache-v2-none.args | 2 +-
.../qemuxml2argv-disk-drive-cache-v2-wb.args | 2 +-
.../qemuxml2argv-disk-drive-cache-v2-wt.args | 2 +-
.../qemuxml2argv-disk-drive-copy-on-read.args | 2 +-
.../qemuxml2argv-disk-drive-discard.args | 2 +-
...uxml2argv-disk-drive-error-policy-enospace.args | 2 +-
.../qemuxml2argv-disk-drive-error-policy-stop.args | 2 +-
...gv-disk-drive-error-policy-wreport-rignore.args | 2 +-
.../qemuxml2argv-disk-drive-fat.args | 2 +-
.../qemuxml2argv-disk-drive-fmt-qcow.args | 2 +-
.../qemuxml2argv-disk-drive-network-gluster.args | 2 +-
...qemuxml2argv-disk-drive-network-iscsi-auth.args | 2 +-
.../qemuxml2argv-disk-drive-network-iscsi-lun.args | 2 +-
.../qemuxml2argv-disk-drive-network-iscsi.args | 2 +-
...qemuxml2argv-disk-drive-network-nbd-export.args | 2 +-
...ml2argv-disk-drive-network-nbd-ipv6-export.args | 2 +-
.../qemuxml2argv-disk-drive-network-nbd-ipv6.args | 2 +-
.../qemuxml2argv-disk-drive-network-nbd-unix.args | 2 +-
.../qemuxml2argv-disk-drive-network-nbd.args | 2 +-
.../qemuxml2argv-disk-drive-network-rbd-auth.args | 2 +-
.../qemuxml2argv-disk-drive-network-rbd-ipv6.args | 2 +-
.../qemuxml2argv-disk-drive-network-rbd.args | 2 +-
.../qemuxml2argv-disk-drive-network-sheepdog.args | 2 +-
.../qemuxml2argv-disk-drive-no-boot.args | 2 +-
.../qemuxml2argv-disk-drive-readonly-disk.args | 2 +-
...qemuxml2argv-disk-drive-readonly-no-device.args | 2 +-
.../qemuxml2argv-disk-drive-shared.args | 2 +-
...emuxml2argv-disk-floppy-tray-no-device-cap.args | 2 +-
.../qemuxml2argv-disk-floppy-tray.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-disk-floppy.args | 2 +-
.../qemuxml2argv-disk-geometry.args | 2 +-
.../qemuxml2argv-disk-ide-drive-split.args | 2 +-
.../qemuxml2argv-disk-ide-wwn.args | 2 +-
.../qemuxml2argv-disk-ioeventfd.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-disk-iscsi.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-many.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-disk-order.args | 2 +-
.../qemuxml2argv-disk-sata-device.args | 2 +-
.../qemuxml2argv-disk-scsi-device-auto.args | 2 +-
.../qemuxml2argv-disk-scsi-device.args | 2 +-
.../qemuxml2argv-disk-scsi-disk-split.args | 2 +-
.../qemuxml2argv-disk-scsi-disk-vpd.args | 2 +-
.../qemuxml2argv-disk-scsi-disk-wwn.args | 2 +-
.../qemuxml2argv-disk-scsi-lun-passthrough.args | 2 +-
.../qemuxml2argv-disk-scsi-megasas.args | 2 +-
.../qemuxml2argv-disk-scsi-mptsas1068.args | 2 +-
.../qemuxml2argv-disk-scsi-virtio-scsi.args | 2 +-
.../qemuxml2argv-disk-scsi-vscsi.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-disk-serial.args | 2 +-
.../qemuxml2argv-disk-snapshot.args | 2 +-
.../qemuxml2argv-disk-source-pool-mode.args | 2 +-
.../qemuxml2argv-disk-source-pool.args | 2 +-
.../qemuxml2argv-disk-usb-device-removable.args | 2 +-
.../qemuxml2argv-disk-usb-device.args | 2 +-
.../qemuxml2argv-disk-virtio-ccw-many.args | 2 +-
.../qemuxml2argv-disk-virtio-ccw.args | 2 +-
.../qemuxml2argv-disk-virtio-s390.args | 2 +-
.../qemuxml2argv-disk-virtio-scsi-ccw.args | 2 +-
.../qemuxml2argv-disk-virtio-scsi-cmd_per_lun.args | 2 +-
.../qemuxml2argv-disk-virtio-scsi-ioeventfd.args | 2 +-
.../qemuxml2argv-disk-virtio-scsi-max_sectors.args | 2 +-
.../qemuxml2argv-disk-virtio-scsi-num_queues.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-disk-virtio.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-disk-xenvbd.args | 2 +-
.../qemuxml2argv-eoi-disabled.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-eoi-enabled.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-event_idx.args | 2 +-
.../qemuxml2argv-fips-enabled.args | 2 +-
.../qemuxml2argv-floppy-drive-fat.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-fs9p-ccw.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-fs9p.args | 2 +-
.../qemuxml2argv-graphics-sdl-fullscreen.args | 2 +-
.../qemuxml2argv-graphics-sdl.args | 2 +-
...emuxml2argv-graphics-spice-agent-file-xfer.args | 2 +-
.../qemuxml2argv-graphics-spice-agentmouse.args | 2 +-
.../qemuxml2argv-graphics-spice-compression.args | 2 +-
.../qemuxml2argv-graphics-spice-qxl-vga.args | 2 +-
.../qemuxml2argv-graphics-spice-sasl.args | 2 +-
.../qemuxml2argv-graphics-spice-timeout.args | 2 +-
.../qemuxml2argv-graphics-spice-usb-redir.args | 3 +-
.../qemuxml2argv-graphics-spice.args | 2 +-
.../qemuxml2argv-graphics-vnc-policy.args | 2 +-
.../qemuxml2argv-graphics-vnc-sasl.args | 2 +-
.../qemuxml2argv-graphics-vnc-socket.args | 2 +-
.../qemuxml2argv-graphics-vnc-tls.args | 2 +-
.../qemuxml2argv-graphics-vnc-websocket.args | 2 +-
.../qemuxml2argv-graphics-vnc.args | 2 +-
.../qemuxml2argv-hostdev-pci-address-device.args | 2 +-
.../qemuxml2argv-hostdev-pci-address.args | 2 +-
.../qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.args | 2 +-
.../qemuxml2argv-hostdev-scsi-lsi-iscsi.args | 2 +-
.../qemuxml2argv-hostdev-scsi-lsi.args | 2 +-
.../qemuxml2argv-hostdev-scsi-readonly.args | 2 +-
...emuxml2argv-hostdev-scsi-virtio-iscsi-auth.args | 2 +-
.../qemuxml2argv-hostdev-scsi-virtio-iscsi.args | 2 +-
.../qemuxml2argv-hostdev-scsi-virtio-scsi.args | 2 +-
...muxml2argv-hostdev-usb-address-device-boot.args | 2 +-
.../qemuxml2argv-hostdev-usb-address-device.args | 2 +-
.../qemuxml2argv-hostdev-usb-address.args | 2 +-
.../qemuxml2argv-hostdev-vfio-multidomain.args | 2 +-
.../qemuxml2argv-hostdev-vfio.args | 2 +-
.../qemuxml2argv-hotplug-base.args | 2 +-
.../qemuxml2argv-hugepages-numa.args | 2 +-
.../qemuxml2argv-hugepages-pages.args | 2 +-
.../qemuxml2argv-hugepages-pages2.args | 2 +-
.../qemuxml2argv-hugepages-pages3.args | 2 +-
.../qemuxml2argv-hugepages-pages5.args | 2 +-
.../qemuxml2argv-hugepages-pages6.args | 3 +-
.../qemuxml2argv-hugepages-shared.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-hugepages.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-hyperv-off.args | 2 +-
.../qemuxml2argv-hyperv-panic.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-hyperv.args | 2 +-
.../qemuxml2argv-input-usbmouse-addr.args | 2 +-
.../qemuxml2argv-input-usbmouse.args | 2 +-
.../qemuxml2argv-input-usbtablet.args | 2 +-
.../qemuxml2argv-iothreads-disk-virtio-ccw.args | 2 +-
.../qemuxml2argv-iothreads-disk.args | 2 +-
.../qemuxml2argv-iothreads-ids-partial.args | 2 +-
.../qemuxml2argv-iothreads-ids.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-iothreads.args | 2 +-
.../qemuxml2argv-kvm-features-off.args | 2 +-
.../qemuxml2argv-kvm-features.args | 2 +-
.../qemuxml2argv-kvm-pit-delay.args | 2 +-
.../qemuxml2argv-kvm-pit-device.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-kvm.args | 2 +-
.../qemuxml2argv-kvmclock+eoi-disabled.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-kvmclock.args | 2 +-
.../qemuxml2argv-machine-aeskeywrap-off-cap.args | 2 +-
.../qemuxml2argv-machine-aeskeywrap-off-caps.args | 2 +-
.../qemuxml2argv-machine-aeskeywrap-on-cap.args | 2 +-
.../qemuxml2argv-machine-aeskeywrap-on-caps.args | 2 +-
.../qemuxml2argv-machine-aliases1.args | 2 +-
.../qemuxml2argv-machine-aliases2.args | 2 +-
.../qemuxml2argv-machine-core-off.args | 2 +-
.../qemuxml2argv-machine-core-on.args | 2 +-
.../qemuxml2argv-machine-deakeywrap-off-cap.args | 2 +-
.../qemuxml2argv-machine-deakeywrap-off-caps.args | 2 +-
.../qemuxml2argv-machine-deakeywrap-on-cap.args | 2 +-
.../qemuxml2argv-machine-deakeywrap-on-caps.args | 2 +-
.../qemuxml2argv-machine-keywrap-none-caps.args | 2 +-
.../qemuxml2argv-machine-keywrap-none.args | 2 +-
.../qemuxml2argv-machine-usb-opt.args | 2 +-
.../qemuxml2argv-machine-vmport-opt.args | 2 +-
.../qemuxml2argv-memory-hotplug-dimm-addr.args | 2 +-
.../qemuxml2argv-memory-hotplug-dimm.args | 2 +-
.../qemuxml2argv-memory-hotplug-ppc64-nonuma.args | 2 +-
.../qemuxml2argv-memory-hotplug.args | 2 +-
.../qemuxml2argv-memtune-unlimited.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-memtune.args | 2 +-
.../qemuxml2argv-migrate-numa-unaligned.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-migrate.args | 2 +-
.../qemuxml2argv-minimal-msg-timestamp.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-minimal.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.args | 2 +-
.../qemuxml2argv-misc-disable-s3.args | 2 +-
.../qemuxml2argv-misc-disable-suspends.args | 2 +-
.../qemuxml2argv-misc-enable-s4.args | 2 +-
.../qemuxml2argv-misc-no-reboot.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-mlock-off.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-mlock-on.args | 2 +-
.../qemuxml2argv-mlock-unsupported.args | 2 +-
.../qemuxml2argv-monitor-json.args | 3 +-
.../qemuxml2argv-multifunction-pci-device.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-net-client.args | 2 +-
.../qemuxml2argv-net-eth-ifname.args | 2 +-
.../qemuxml2argv-net-eth-names.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-net-eth.args | 2 +-
.../qemuxml2argv-net-hostdev-multidomain.args | 2 +-
.../qemuxml2argv-net-hostdev-vfio-multidomain.args | 2 +-
.../qemuxml2argv-net-hostdev-vfio.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-net-hostdev.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-net-mcast.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-net-server.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-net-udp.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-net-user.args | 2 +-
.../qemuxml2argv-net-vhostuser-multiq.args | 2 +-
.../qemuxml2argv-net-vhostuser.args | 2 +-
.../qemuxml2argv-net-virtio-ccw.args | 2 +-
.../qemuxml2argv-net-virtio-device.args | 2 +-
.../qemuxml2argv-net-virtio-disable-offloads.args | 2 +-
.../qemuxml2argv-net-virtio-netdev.args | 2 +-
.../qemuxml2argv-net-virtio-s390.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-net-virtio.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-no-shutdown.args | 3 +-
.../qemuxml2argv-nographics-vga.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-nographics.args | 2 +-
.../qemuxml2argv-nosharepages.args | 2 +-
...qemuxml2argv-numad-auto-memory-vcpu-cpuset.args | 2 +-
...d-auto-memory-vcpu-no-cpuset-and-placement.args | 2 +-
...muxml2argv-numad-auto-vcpu-static-numatune.args | 2 +-
...qemuxml2argv-numad-static-memory-auto-vcpu.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-numad.args | 2 +-
...qemuxml2argv-numatune-auto-nodeset-invalid.args | 2 +-
.../qemuxml2argv-numatune-auto-prefer.args | 2 +-
.../qemuxml2argv-numatune-memnode-no-memory.args | 2 +-
.../qemuxml2argv-numatune-memnode.args | 2 +-
.../qemuxml2argv-numatune-memory.args | 2 +-
.../qemuxml2argv-panic-double.args | 2 +-
.../qemuxml2argv-panic-no-address.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-panic.args | 2 +-
.../qemuxml2argv-parallel-parport-chardev.args | 3 +-
.../qemuxml2argv-parallel-tcp-chardev.args | 3 +-
.../qemuxml2argv-parallel-tcp.args | 2 +-
.../qemuxml2argv-pci-autoadd-addr.args | 2 +-
.../qemuxml2argv-pci-autoadd-idx.args | 2 +-
.../qemuxml2argv-pci-bridge-many-disks.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-pci-many.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-pci-rom.args | 2 +-
.../qemuxml2argv-pci-serial-dev-chardev.args | 3 +-
.../qemuxml2argv-pcie-root-port.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-pcie-root.args | 2 +-
.../qemuxml2argv-pcie-switch-downstream-port.args | 2 +-
.../qemuxml2argv-pcie-switch-upstream-port.args | 2 +-
.../qemuxml2argv-pcihole64-q35.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-pcihole64.args | 2 +-
.../qemuxml2argv-pmu-feature-off.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-pmu-feature.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args | 2 +-
.../qemuxml2argv-ppc64-usb-controller-legacy.args | 2 +-
.../qemuxml2argv-ppc64-usb-controller.args | 2 +-
.../qemuxml2argv-ppce500-serial.args | 3 +-
.../qemuxml2argv-pseries-basic.args | 3 +-
.../qemuxml2argv-pseries-cpu-compat.args | 3 +-
.../qemuxml2argv-pseries-cpu-exact.args | 3 +-
.../qemuxml2argv-pseries-cpu-le.args | 3 +-
.../qemuxml2argv-pseries-nvram.args | 2 +-
.../qemuxml2argv-pseries-panic-missing.args | 3 +-
.../qemuxml2argv-pseries-panic-no-address.args | 3 +-
.../qemuxml2argv-pseries-usb-default.args | 3 +-
.../qemuxml2argv-pseries-usb-kbd.args | 3 +-
.../qemuxml2argv-pseries-usb-multi.args | 3 +-
.../qemuxml2argv-pseries-vio-user-assigned.args | 3 +-
.../qemuxml2argvdata/qemuxml2argv-pseries-vio.args | 3 +-
.../qemuxml2argv-pv-spinlock-disabled.args | 2 +-
.../qemuxml2argv-pv-spinlock-enabled.args | 2 +-
.../qemuxml2argv-q35-pm-disable-fallback.args | 2 +-
.../qemuxml2argv-q35-pm-disable.args | 2 +-
.../qemuxml2argv-q35-usb2-multi.args | 2 +-
.../qemuxml2argv-q35-usb2-reorder.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-q35.args | 2 +-
.../qemuxml2argv-qemu-ns-commandline-ns0.args | 2 +-
.../qemuxml2argv-qemu-ns-commandline-ns1.args | 2 +-
.../qemuxml2argv-qemu-ns-commandline.args | 2 +-
...emuxml2argv-qemu-ns-domain-commandline-ns0.args | 2 +-
.../qemuxml2argv-qemu-ns-domain-commandline.args | 2 +-
.../qemuxml2argv-qemu-ns-domain-ns0.args | 2 +-
.../qemuxml2argv-qemu-ns-no-env.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-qemu-ns.args | 2 +-
.../qemuxml2argv-reboot-timeout-disabled.args | 2 +-
.../qemuxml2argv-reboot-timeout-enabled.args | 2 +-
.../qemuxml2argv-restore-v2-fd.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-restore-v2.args | 2 +-
...muxml2argv-s390-allow-bogus-usb-controller.args | 3 +-
.../qemuxml2argv-s390-allow-bogus-usb-none.args | 3 +-
.../qemuxml2argv-seclabel-dac-none.args | 2 +-
.../qemuxml2argv-seclabel-dynamic-baselabel.args | 2 +-
.../qemuxml2argv-seclabel-dynamic-labelskip.args | 2 +-
.../qemuxml2argv-seclabel-dynamic-override.args | 2 +-
.../qemuxml2argv-seclabel-dynamic-relabel.args | 2 +-
.../qemuxml2argv-seclabel-dynamic.args | 2 +-
.../qemuxml2argv-seclabel-none.args | 2 +-
.../qemuxml2argv-seclabel-static-labelskip.args | 2 +-
.../qemuxml2argv-seclabel-static-relabel.args | 2 +-
.../qemuxml2argv-seclabel-static.args | 2 +-
.../qemuxml2argv-serial-dev-chardev-iobase.args | 3 +-
.../qemuxml2argv-serial-dev-chardev.args | 3 +-
.../qemuxml2argvdata/qemuxml2argv-serial-dev.args | 2 +-
.../qemuxml2argv-serial-file-chardev.args | 3 +-
.../qemuxml2argvdata/qemuxml2argv-serial-file.args | 2 +-
.../qemuxml2argv-serial-many-chardev.args | 3 +-
.../qemuxml2argvdata/qemuxml2argv-serial-many.args | 2 +-
.../qemuxml2argv-serial-pty-chardev.args | 3 +-
.../qemuxml2argvdata/qemuxml2argv-serial-pty.args | 2 +-
.../qemuxml2argv-serial-spiceport-nospice.args | 2 +-
.../qemuxml2argv-serial-spiceport.args | 3 +-
.../qemuxml2argv-serial-tcp-chardev.args | 3 +-
.../qemuxml2argv-serial-tcp-telnet-chardev.args | 3 +-
.../qemuxml2argv-serial-tcp-telnet.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-serial-tcp.args | 2 +-
.../qemuxml2argv-serial-udp-chardev.args | 3 +-
.../qemuxml2argvdata/qemuxml2argv-serial-udp.args | 2 +-
.../qemuxml2argv-serial-unix-chardev.args | 3 +-
.../qemuxml2argvdata/qemuxml2argv-serial-unix.args | 2 +-
.../qemuxml2argv-serial-vc-chardev.args | 3 +-
tests/qemuxml2argvdata/qemuxml2argv-serial-vc.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-shmem.args | 2 +-
.../qemuxml2argv-smartcard-controller.args | 3 +-
.../qemuxml2argv-smartcard-host-certificates.args | 3 +-
.../qemuxml2argv-smartcard-host.args | 3 +-
...emuxml2argv-smartcard-passthrough-spicevmc.args | 3 +-
.../qemuxml2argv-smartcard-passthrough-tcp.args | 3 +-
tests/qemuxml2argvdata/qemuxml2argv-smbios.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-smp.args | 2 +-
.../qemuxml2argv-sound-device.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-sound.args | 2 +-
.../qemuxml2argv-tpm-passthrough.args | 2 +-
.../qemuxml2argv-usb-controller-default-q35.args | 2 +-
.../qemuxml2argv-usb-controller-explicit-q35.args | 2 +-
.../qemuxml2argv-usb-controller.args | 3 +-
tests/qemuxml2argvdata/qemuxml2argv-usb-hub.args | 3 +-
.../qemuxml2argv-usb-ich9-companion.args | 3 +-
.../qemuxml2argv-usb-ich9-ehci-addr.args | 3 +-
tests/qemuxml2argvdata/qemuxml2argv-usb-none.args | 3 +-
.../qemuxml2argv-usb-piix3-controller.args | 3 +-
tests/qemuxml2argvdata/qemuxml2argv-usb-ports.args | 3 +-
.../qemuxml2argv-usb-redir-boot.args | 3 +-
.../qemuxml2argv-usb-redir-filter-version.args | 3 +-
.../qemuxml2argv-usb-redir-filter.args | 3 +-
tests/qemuxml2argvdata/qemuxml2argv-usb-redir.args | 3 +-
tests/qemuxml2argvdata/qemuxml2argv-usb1-usb2.args | 3 +-
.../qemuxml2argv-video-device-pciaddr-default.args | 2 +-
.../qemuxml2argv-video-qxl-device-vgamem.args | 2 +-
.../qemuxml2argv-video-qxl-device.args | 2 +-
.../qemuxml2argv-video-qxl-nodevice.args | 2 +-
.../qemuxml2argv-video-qxl-sec-device-vgamem.args | 2 +-
.../qemuxml2argv-video-qxl-sec-device.args | 2 +-
.../qemuxml2argv-video-vga-device-vgamem.args | 2 +-
.../qemuxml2argv-video-vga-device.args | 2 +-
.../qemuxml2argv-video-vga-nodevice.args | 2 +-
.../qemuxml2argv-video-virtio-gpu-device.args | 2 +-
.../qemuxml2argv-video-virtio-gpu-virgl.args | 2 +-
.../qemuxml2argv-virtio-input-passthrough.args | 2 +-
.../qemuxml2argv-virtio-input.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-virtio-lun.args | 2 +-
.../qemuxml2argv-virtio-rng-ccw.args | 3 +-
.../qemuxml2argv-virtio-rng-default.args | 2 +-
.../qemuxml2argv-virtio-rng-egd.args | 2 +-
.../qemuxml2argv-virtio-rng-multiple.args | 2 +-
.../qemuxml2argv-virtio-rng-random.args | 2 +-
.../qemuxml2argv-watchdog-device.args | 2 +-
.../qemuxml2argv-watchdog-diag288.args | 3 +-
.../qemuxml2argv-watchdog-dump.args | 2 +-
.../qemuxml2argv-watchdog-injectnmi.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-watchdog.args | 2 +-
tests/qemuxml2argvtest.c | 17 +++--
tests/qemuxml2xmltest.c | 4 +-
463 files changed, 682 insertions(+), 507 deletions(-)
diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h
index fb684d0a069b..c63c7bc9ee71 100644
--- a/src/qemu/qemu_command.h
+++ b/src/qemu/qemu_command.h
@@ -64,15 +64,18 @@ virCommandPtr qemuBuildCommandLine(virConnectPtr conn,
bool monitor_json,
virQEMUCapsPtr qemuCaps,
const char *migrateURI,
- virDomainSnapshotObjPtr current_snapshot,
+ virDomainSnapshotObjPtr snapshot,
virNetDevVPortProfileOp vmop,
qemuBuildCommandLineCallbacksPtr callbacks,
- bool forXMLToArgv,
+ bool standalone,
bool enableFips,
virBitmapPtr nodeset,
size_t *nnicindexes,
- int **nicindexes)
- ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(10);
+ int **nicindexes,
+ const char *domainLibDir,
+ const char *domainChannelTargetDir)
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(10)
+ ATTRIBUTE_NONNULL(16) ATTRIBUTE_NONNULL(17);
/* Generate '-device' string for chardev device */
int
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 3fc15130833f..5b7b38e29776 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -472,6 +472,63 @@ qemuDomainDiskPrivateNew(void)
}
+/* This is the old way of setting up per-domain directories */
+static int
+qemuDomainSetPrivatePathsOld(virQEMUDriverPtr driver,
+ virDomainObjPtr vm)
+{
+ qemuDomainObjPrivatePtr priv = vm->privateData;
+ virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
+ int ret = -1;
+
+ if (!priv->libDir &&
+ virAsprintf(&priv->libDir, "%s/domain-%s",
+ cfg->libDir, vm->def->name) < 0)
+ goto error;
+
+ if (!priv->channelTargetDir &&
+ virAsprintf(&priv->channelTargetDir, "%s/domain-%s",
+ cfg->channelTargetDir, vm->def->name) < 0)
+ goto error;
+
+ ret = 0;
+ error:
Consensus is that 'error' is called only on error paths, 'cleanup' can
be called for both.
+ virObjectUnref(cfg);
+ return ret;
+}
+
+
+/*
+ * The newer version uses a magic number for one reason. The thing is
+ * that we need a bit shorter name in order to be able to connect to
+ * it using UNIX sockets which have path length limitation. Since the
+ * length is not guaranteed to be constant and similarly the lib
+ * directory is configurable and so on, we need to rather choose an
+ * arbitrary maximum length of the domain name that will be used.
+ * Thanks to the fact that we are now saving it in the status XML, we
+ * can change it later on whenever we feel like so.
+ */
+int
+qemuDomainSetPrivatePaths(char **domainLibDir, char **domainChannelTargetDir,
+ const char *confLibDir, const char *confChannelDir,
+ const char *domainName, int domainId)
+{
+ const int dommaxlen = 20;
+
+ if (!*domainLibDir &&
+ virAsprintf(domainLibDir, "%s/domain-%d-%.*s",
+ confLibDir, domainId, dommaxlen, domainName) < 0)
+ return -1;
+
+ if (!*domainChannelTargetDir &&
+ virAsprintf(domainChannelTargetDir, "%s/domain-%d-%.*s",
+ confChannelDir, domainId, dommaxlen, domainName) < 0)
+ return -1;
+
+ return 0;
+}
+
+
diff --git
a/tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages6.args
b/tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages6.args
index 932da989c7ae..69f6ad08bd45 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages6.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages6.args
@@ -13,7 +13,8 @@ QEMU_AUDIO_DRV=none \
-uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \
-nographic \
-nodefaults \
--monitor unix:/tmp/test-monitor,server,nowait \
+-monitor unix:/tmp/lib/domain--1-SomeDummyHugepagesGu/monitor.sock,server,\
+nowait \
syntax-check thinks this is badly wrapped. Just put nowait onto the
previous line.
-no-acpi \
-boot c \
-usb \
ACK and safe for the freeze.
Michal