* src/qemu_conf.c (qemuBuildHostNetStr): Do not remove the type_sep=','
dead store, since not having it would be a problem if we ever add a
new attribute=VAL option.
* src/esx/esx_vi.[ch]: convert esxVI_RemoteRequest_Execute() to a
simpler esxVI_Context_Execute() version, remove esxVI_RemoteRequest
and convert esxVI_RemoteResponse to esxVI_Response
* src/esx/esx_vi_methods.c: update and simplify callers to use
esxVI_Context_Execute() instead of esxVI_RemoteRequest_Execute()
* src/esx/esx_vi.[ch]: use virXPathNode*() in
esxVI_RemoteRequest_Execute() and remove
esxVI_RemoteResponse_DeserializeXPathObject*()
* src/esx/esx_vi_methods.c: update callers to use the new syntax of
esxVI_RemoteRequest_Execute()
* src/esx/esx_driver.c: add configStatus to the requested properties
to check it in esxVI_GetVirtualMachineIdentity()
* src/esx/esx_vi.[ch]: add esxVI_GetManagedEntityStatus()
and use it in esxVI_GetVirtualMachineIdentity()
* src/esx/esx_vi_types.[ch]: add VI type esxVI_ManagedEntityStatus
* src/esx/esx_driver.c: handle spaces in VMX file path and use a
virBuffer to encode spaces correctly in the resulting URL
* src/esx/esx_vi.c: include the URL in the error message in case
of a download error
* configure.in src/Makefile.am: change detection and flags
* src/phyp/phyp_driver.c src/phyp/phyp_driver.h: connection now
need to be done as part of the driver code, cleaned up by DV
* src/qemu_driver.c: Free the vm->monitor_chr field at VM shutdown.
Unlink the UNIX domain socket at VM shutdown to avoid littering
FS with old sockets
Separate the guest created QEMU monitor socket location
from the libvirtd create XML / PID data files, to improve
security separation when running QEMU non-root
* libvirt.spec.in: Leave /var/run/libvirt/qemu as root:root
* src/qemu_conf.h: Add libDir and cacheDir directory paths
* src/qemu_driver.c: Move QEMU monitor socket from
stateDir to libDir to avoid making security critical directory
accessible to QEMU guests.
* src/util.c: Delay running hook till after damonizing to
ensure pidfile is still written before changing UID/GID
If a file descriptor with events=0 was added to the libvirtd
event loop, it would still be added to the poll() fds' array.
While it wouldn't see any POLLIN/OUT events, it'd still get
triggered for HANGUP/ERROR events which was not in compliance
with the libvirt events API contract.
* qemud/event.c: Don't poll on FDs with events=0
* tests/eventtest.c: Add test case to validate fix to event.c
* python/libvir.c (libvirt_virConnectDomainEventCallback): Return 0
when successful, rather than always returning -1.
clang flagged this function for its dead-store of "ret=0".
Once "ret" was set to 0, it was never used, and
the function would always return -1.
* src/openvz_conf.c (openvzReadNetworkConf): Initialize "net".
Otherwise, upon openvzRead... failure, we would "goto error;"
where an uninitialized "net" could be dereferenced.
* src/test.c (testOpenVolumesForPool): Upon early virAsprintf or
virXPathNodeSet failure, "goto error" would take us to
virStorageVolDefFree(def), but with "def" not defined.
Initialize it to NULL.
* src/storage_backend.c: Include "internal.h".
(virStorageBackendCopyToFD): Mark inputvol parameter as "nonnull".
Remove test for non-NULL inputvol. Both callers ensure it's non-NULL.
* src/libvirt.c (virStoragePoolSetAutostart): Return -1 if the pool
argument is invalid, rather than "goto error" where we could dereference
that possibly-NULL "pool".
(virConnectFindStoragePoolSources): Likewise.
(virConnectNumOfDomains): Likewise.
Daniel P. Berrange spotted that the two latter functions
needed the same treatment.
* docs/schemas/domain.rng: Add <serial> element to disks
* src/domain_conf.h, src/domain_conf.c: XML parsing and
formatting for disk serial numbers
* src/qemu_conf.c: Set serial number when launching guests
* tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.args,
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml: Add
serial number to XML test
Add option to domain XML for
<memoryBacking>
<hugepages/>
</memoryBacking>
* configure.in: Add check for mntent.h
* qemud/libvirtd_qemu.aug, qemud/test_libvirtd_qemu.aug, src/qemu.conf
Add 'hugetlbfs_mount' config parameter
* src/qemu_conf.c, src/qemu_conf.h: Check for -mem-path flag in QEMU,
and pass it when hugepages are requested.
Load hugetlbfs_mount config parameter, search for mount if not given.
* src/qemu_driver.c: Free hugetlbfs_mount/path parameter in driver shutdown.
Create directory for QEMU hugepage usage, chowning if required.
* docs/formatdomain.html.in: Document memoryBacking/hugepages elements
* docs/schemas/domain.rng: Add memoryBacking/hugepages elements to schema
* src/util.c, src/util.h, src/libvirt_private.syms: Add virFileFindMountPoint
helper API
* tests/qemuhelptest.c: Add -mem-path constants
* tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c: Add tests for hugepage
handling
* tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml,
tests/qemuxml2argvdata/qemuxml2argv-hugepages.args: Data files for
hugepage tests
* tests/testutils.c: Run test function twice, once to prime it for
static allocations, once to count the non-static allocations.
* tests/testutilsqemu.c: Initialize variable correctl
* src/capabilities.c: Don't free machines variable upon failure
since caller must do that
* src/xm_internal.c: Add missing check for OOM in building VIF
config param
* docs/schemas/domain.rng: augment the video model with an optional
acceleration element with optional accel2d and accel3d flags
* src/domain_conf.c src/domain_conf.h: exten the virDomainVideoDef
structure with an optional accel field, virDomainVideoAccelDefParseXML
and virDomainVideoAccelDefFormat functions to parse and serialize
the structure.
Paolo Bonzini points out that in my refactoring of the code for
virDomainMigrate(), I added a check for the return value from
virDomainMigratePerform(). The problem is that we don't want to
exit if we fail, we actually want to go on and do
virDomainMigrateFinish2() with a non-0 return code to clean things
up. Remove the check.
While reproducing this issue, I also noticed that we wouldn't
always properly propagate an error message. In particular, I
found that if you blocked off the migration ports (with iptables)
and then tried the migration, it would actually fail but we would
get no failure output from Qemu. Therefore, we would think we
succeeded, and leave a huge mess behind us. Execute the monitor
command "info migrate", and look for a failure string in there
as well.
Signed-off-by: Chris Lalancette <clalance@redhat.com>