]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
15 years agoCompressed save image format for Qemu.
Chris Lalancette [Fri, 7 Aug 2009 11:34:05 +0000 (13:34 +0200)]
Compressed save image format for Qemu.

Implement a compressed save image format for qemu.  While ideally
we would have the choice between compressed/non-compressed
available to the libvirt API, unfortunately there is no "flags"
parameter to the virDomainSave() API.  Therefore, implement this
as a qemu.conf option.  gzip, bzip2, and lzma are implemented, and
it should be very easy to implement additional compression
methods.

One open question is if/how we should detect the compression
binaries.  One way to do it is to do compile-time setting of the
paths (via configure.in), but that doesn't seem like a great thing
to do.  My preferred solution is not to detect at all;
when we go to run the commands that need them, if they
aren't available, or aren't available in one of the standard paths,
then we'll fail.  That's also the solution implemented in this patch.

In the future, we'll have a more robust (managed) save/restore API,
at which time we can expose this functionality properly in the API.

V2: get rid of redundant dd command and just use >> to append data.
V3: Add back the missing pieces for the enum and bumping the save version.
V4: Make the compressed field in the save_header an int.
    Implement LZMA compression.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoRemove 'the the' typo in docs
Daniel P. Berrange [Fri, 14 Aug 2009 11:00:50 +0000 (12:00 +0100)]
Remove 'the the' typo in docs

15 years agoCheck active domain hostdevs before allowing PCI reset
Mark McLoughlin [Fri, 14 Aug 2009 07:31:11 +0000 (08:31 +0100)]
Check active domain hostdevs before allowing PCI reset

If a PCI device reset causes other devices to be reset, allow it so long
as those other devices are note assigned to another active domain.

Note, we need to take the driver lock qemudNodeDeviceReset() because the
check function will iterate over the domain list.

* src/qemu_conf.c: add qemuCheckPciHostDevice() to iterate over active
  domains checking whether the affected device is assigned

* src/pci.[ch]: add pciDeviceEquals() helper

15 years agoAllow pciResetDevice() to reset multiple devices
Mark McLoughlin [Fri, 14 Aug 2009 07:31:11 +0000 (08:31 +0100)]
Allow pciResetDevice() to reset multiple devices

When using a Secondary Bus Reset, all devices on the bus are reset.

Extend the pciResetDevice() API so that a 'check' callback can be
supplied which will verify that it is safe to reset the other devices
on the bus.

The virDomainObjPtr parameter is needed so that when the check function
iterates over the domain list, it can avoid double locking.

* src/pci.[ch]: add a 'check' callback to pciResetDevice(), re-work
  pciIterDevices() to pass the check function to the iter functions,
  use the check function in the bus iterator, return the first unsafe
  device from pciBusCheckOtherDevices() and include its details in
  the bus reset error message.

* src/qemu_driver.c, src/xen_uninified.c: just pass NULL as the
  check function for now

15 years agoImprove PCI host device reset error message
Mark McLoughlin [Fri, 14 Aug 2009 07:31:11 +0000 (08:31 +0100)]
Improve PCI host device reset error message

Currently, if we are unable to reset a PCI device we return a fairly
generic 'No PCI reset capability available' error message.

Fix that by returning an error from the individual reset messages and
using that error to construct the higher level error mesage.

* src/pci.c: set errors in pciTryPowerManagementReset() and
  pciTrySecondaryBusReset() on failure; use those error messages
  in pciResetDevice(), or explain that no reset support is available

15 years agoReset and re-attach PCI host devices on guest shutdown
Mark McLoughlin [Fri, 14 Aug 2009 07:31:11 +0000 (08:31 +0100)]
Reset and re-attach PCI host devices on guest shutdown

When the guest shuts down, we should attempt to restore all PCI host
devices to a sane state.

In the case of managed hostdevs, we should reset and re-attach the
devices. In the case of unmanaged hostdevs, we should just reset them.

Note, KVM will already reset assigned devices when the guest shuts
down using whatever means it can, so we are only doing it to cover the
cases the kernel can't handle.

* src/qemu_driver.c: add qemuDomainReAttachHostDevices() and call
  it from qemudShutdownVMDaemon()

15 years agoAllow PM reset on multi-function PCI devices
Mark McLoughlin [Fri, 14 Aug 2009 07:31:11 +0000 (08:31 +0100)]
Allow PM reset on multi-function PCI devices

It turns out that a PCI Power Management reset only affects individual
functions, and not the whole device.

The PCI Power Management spec talks about resetting the 'device' rather
than the 'function', but Intel's Dexuan Cui informs me that it is
actually a per-function reset.

Also, Yu Zhao has added pci_pm_reset() to the kernel, and it doesn't
reject multi-function devices, so it must be true! :-)

(A side issue is that we could defer the PM reset to the kernel if we
could detect that the kernel has PM reset support, but barring version
number checks we don't have a way to detect that support)

* src/pci.c: remove the pciDeviceContainsOtherFunctions() check from
  pciTryPowerManagementReset() and prefer PM reset over bus reset
  where both are available

Cc: Cui, Dexuan <dexuan.cui@intel.com>
Cc: Yu Zhao <yu.zhao@intel.com>
15 years agoDetect KVM's PCI device assignment support
Mark McLoughlin [Fri, 14 Aug 2009 07:31:11 +0000 (08:31 +0100)]
Detect KVM's PCI device assignment support

PCI device assignment is only supported in KVM's fork of qemu, so we
should really detect its availability and give a nice error if its
not supported.

* src/qemu_conf.[ch]: introduce QEMUD_CMD_FLAG_PCIDEVICE indicating
  that the -pcidevice command line option is available

* tests/*: update the tests

15 years agoAdd host PCI device hotplug support
Mark McLoughlin [Fri, 14 Aug 2009 07:31:10 +0000 (08:31 +0100)]
Add host PCI device hotplug support

Attaching a host PCI device to a qemu guest is done with a
straightforward 'pci_add auto host host=XX:XX.X' command.

Like with NIC and disk hotplug, we need to retain the guest PCI address
assigned by qemu so that we can use it for hot-unplug.

Identifying a device for detach is done using the host PCI address.

Managed mode is handled by detaching/resetting the device before
attaching it to the guest and re-attaching it after detaching it from
the guest.

* src/qemu_driver.c: add qemudDomainAttachHostPciDevice() and
  qemudDomainDetachHostPciDevice()

* src/domain_conf.h: add somewhere to store the guest PCI address

* src/domain_conf.c: handle formatting and parsing the guest PCI
  address

15 years agoRe-factor hostdev hotplug
Mark McLoughlin [Fri, 14 Aug 2009 07:31:10 +0000 (08:31 +0100)]
Re-factor hostdev hotplug

Re-factor the hostdev hotplug code so that we can easily add PCI
hostdev hotplug to qemudDomainAttachHostDevice().

* src/qemu_driver.c: rename qemudDomainAttachHostDevice() to
  qemudDomainAttachHostUsbDevice(); make qemudDomainAttachHostDevice()
  handle all hostdev types

* src/libvirt_private.syms: export a couple of hostdev related
  ToString() functions

15 years agoMake LXC / UML drivers robust against NUMA topology brokenness
Daniel P. Berrange [Thu, 13 Aug 2009 10:56:31 +0000 (11:56 +0100)]
Make LXC / UML drivers robust against NUMA topology brokenness

Some kernel versions expose broken NUMA topology for some machines.
This causes the LXC/UML drivers to fail to start. QEMU driver was
already fixed for this problem

* src/lxc_conf.c: Log and ignore failure to populate NUMA info
* src/uml_conf.c: Log and ignore failure to populate NUMA info
* src/capabilities.c: Reset nnumaCell to 0 after freeing

15 years agoFix some URLs in virsh manpage
Mark McLoughlin [Tue, 11 Aug 2009 14:37:33 +0000 (15:37 +0100)]
Fix some URLs in virsh manpage

* docs/virsh.pod: don't reference format.html anymore, reference
  the formatdomain.html etc. pages

* virsh.1: re-generate

15 years agoRemove a duplicated assignment in Xen PCI parsing.
Chris Lalancette [Mon, 3 Aug 2009 11:57:37 +0000 (13:57 +0200)]
Remove a duplicated assignment in Xen PCI parsing.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoFix up a few minor indentation issues.
Chris Lalancette [Mon, 3 Aug 2009 11:57:23 +0000 (13:57 +0200)]
Fix up a few minor indentation issues.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoFix phyp escape_specialcharacters.
Chris Lalancette [Mon, 3 Aug 2009 11:53:26 +0000 (13:53 +0200)]
Fix phyp escape_specialcharacters.

A couple of minor fixes to phyp escape_specialcharacters.  Make it
a static function (since it's only used in phyp/phyp_driver.c), and
make it take a dstlen parameter.  This paves the way for removing
strncpy in the future.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoMake openvzGetVPSUUID take a len.
Chris Lalancette [Mon, 3 Aug 2009 11:50:27 +0000 (13:50 +0200)]
Make openvzGetVPSUUID take a len.

Minor fix to openvzGetVPSUUID to make it take a length parameter.
This ensures that it doesn't make assumptions about the length
of the UUID buffer, and paves the way for removal of strncpy in
the future.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoMinor cleanup of error path for c_oneVmInfo.
Chris Lalancette [Mon, 3 Aug 2009 11:48:16 +0000 (13:48 +0200)]
Minor cleanup of error path for c_oneVmInfo.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoFix up a whitespace in comments in src/console.c
Chris Lalancette [Fri, 7 Aug 2009 08:56:38 +0000 (10:56 +0200)]
Fix up a whitespace in comments in src/console.c

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoFix up a stray whitespace in virHashGrow.
Chris Lalancette [Wed, 5 Aug 2009 11:46:43 +0000 (13:46 +0200)]
Fix up a stray whitespace in virHashGrow.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoRun 'cont' on successful migration finish.
Chris Lalancette [Wed, 5 Aug 2009 11:42:07 +0000 (13:42 +0200)]
Run 'cont' on successful migration finish.

As of qemu 0.10.6, qemu now honors the -S flag on incoming migration.
That means that when the migration completes, we have to issue a
'cont' command to get the VM running again.  We do it unconditionally
since it won't hurt on older qemu.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoSplit virDomainMigrate into functions.
Chris Lalancette [Thu, 30 Jul 2009 14:52:02 +0000 (16:52 +0200)]
Split virDomainMigrate into functions.

Re-factor virDomainMigrate to split out the version 1 and version 2
protocols into their own functions.  In reality, the two versions share
very little in common, so forcing them together in the same function was
just confusing.  This will also make adding tunnelled migration easier.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoFix QEMU domain status after restore.
Chris Lalancette [Fri, 7 Aug 2009 13:20:30 +0000 (15:20 +0200)]
Fix QEMU domain status after restore.

When doing a restore, we were forgetting to update the state file
for the VM.  That means that if you do a save/restore, then shut
down libvirtd, then start it back up, you'll see the state of the
guest as "paused", even though it is really running.  We were
just forgetting a "virDomainSaveStatus" call in the restor path.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoHandle kernels with no ipv6 support
Mark McLoughlin [Mon, 10 Aug 2009 10:16:37 +0000 (11:16 +0100)]
Handle kernels with no ipv6 support

If the ipv6 kernel module is not loaded, then we get this when starting
a virtual network:

  libvir: Network Config error :
  cannot enable /proc/sys/net/ipv6/conf/virbr0/disable_ipv6:
  No such file or directory

If disable_ipv6 is not present, we should just merrily continue on our
way.

* src/network_driver.c: make networkDisableIPV6() not fail if the kernel
  has no ipv6 support

15 years agoSet perms on /var/lib/libvirt/boot to 0711
Mark McLoughlin [Thu, 6 Aug 2009 14:20:36 +0000 (15:20 +0100)]
Set perms on /var/lib/libvirt/boot to 0711

Allow qemu user to open kernel/initrds in this dir, but still prevent
others from listing it.

* libvirt.spec.in: set /var/lib/libvirt/boot perms to 0711

15 years agochown kernel/initrd before spawning qemu
Mark McLoughlin [Thu, 6 Aug 2009 14:14:19 +0000 (15:14 +0100)]
chown kernel/initrd before spawning qemu

If we're running qemu unprivileged, we need to chown any supplied kernel
or initrd before spawning it.

* src/qemu_driver.c: rename qemuDomainSetDiskOwnership() to
  qemuDomainSetFileOwnership(), pass it a path string instead of a disk
  definition and use it for chowning the kernel/initrd in
  qemuDomainSetAllDeviceOwnership()

15 years agoAdd link to AbiCloud web management system
Daniel P. Berrange [Fri, 7 Aug 2009 13:12:22 +0000 (14:12 +0100)]
Add link to AbiCloud web management system

15 years agoRemove unsafe strncpy from esx_vmx.c
Chris Lalancette [Mon, 3 Aug 2009 11:39:07 +0000 (13:39 +0200)]
Remove unsafe strncpy from esx_vmx.c

While trying to remove uses of unsafe strncpy in the tree, I came
across a couple of usages in the ESX driver.  To my eyes, the snprintf
replacements do the same thing in less code, and are also safer.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
Tested-by: Mattias Bolte <matthias.bolte@googlemail.com>
15 years agoUpdate logging documentation
Amy Griffis [Thu, 6 Aug 2009 13:58:38 +0000 (15:58 +0200)]
Update logging documentation

* docs/logging.html[.in] try to include a little more description about
  the corner cases, things someone might get hung up on on.

15 years agoConsolidate code for parsing the logging env
Amy Griffis [Thu, 6 Aug 2009 13:55:07 +0000 (15:55 +0200)]
Consolidate code for parsing the logging env

* src/logging.c src/logging.h src/libvirt_private.syms:
  define new functions virLogSetFromEnv and virLogParseDefaultPriority
* qemud/qemud.c src/libvirt.c tests/eventtest.c: cleanup to use the
  unified functions

15 years agoCleanup VIR_LOG_DEBUG parsing in eventtest
Amy Griffis [Thu, 6 Aug 2009 13:50:40 +0000 (15:50 +0200)]
Cleanup VIR_LOG_DEBUG parsing in eventtest

* tests/eventtest.c: don't covert high priority levels to debug level.
  Consider an invalid priority level setting a setup failure.

15 years agoSeveral fixes to libvirtd's log setup
Amy Griffis [Thu, 6 Aug 2009 13:45:50 +0000 (15:45 +0200)]
Several fixes to libvirtd's log setup

* qemud/qemud.c src/logging.[ch]: Similar as for general libvirt, don't
  convert high priority levels to debug level. Ignore LIBVIRT_LOG_FILTERS
  and LIBVIRT_LOG_OUTPUTS when they're set to the empty string, otherwise
  they can override a valid setting from the config file. Send all
  settings through the parser functions for validation, so that the
  existence of a bad setting doesn't nullify a good setting that should
  have applied -- particularly the default output. Keep the order of
  precedence consistent for all variables between the environment and
  the config file.  Warn when an invalid log level, filter, or output
  is ignored.
* src/libvirt_private.syms: export internally a few convenience functions

15 years agoTighten libvirt's parsing of logging env
Amy Griffis [Thu, 6 Aug 2009 13:38:11 +0000 (15:38 +0200)]
Tighten libvirt's parsing of logging env

* src/libvirt.c src/logging.c: Don't convert high priority levels to the
  debug level. Don't parse LIBVIRT_LOG_FILTERS and LIBVIRT_LOG_OUTPUTS
  when they're set to the empty string. Warn when the user specifies an
  invalid value (empty string remains a noop).
* po/POTFILES.in: src/logging.c now include translatable strings

15 years agoCleanup structure name naming
Matthias Bolte [Thu, 6 Aug 2009 13:15:45 +0000 (15:15 +0200)]
Cleanup structure name naming

* src/esx/esx_driver.c src/esx/esx_util.[ch] src/esx/esx_vi.[ch]:
  just a name change

15 years agoFix memleak if esxOpen fails
Matthias Bolte [Thu, 6 Aug 2009 13:09:40 +0000 (15:09 +0200)]
Fix memleak if esxOpen fails

* src/esx/esx_driver.c: if esxOpen failed, priv->transport wasn't freed

15 years agoAdd proper OOM reporting for esxDomainGetOSType
Matthias Bolte [Thu, 6 Aug 2009 13:07:46 +0000 (15:07 +0200)]
Add proper OOM reporting for esxDomainGetOSType

* src/esx/esx_driver.c: catch an unchecked strdup in
  esxDomainGetOSType()

15 years agoRelease of libvirt-0.7.0
Daniel Veillard [Wed, 5 Aug 2009 14:00:41 +0000 (16:00 +0200)]
Release of libvirt-0.7.0

* configure.in NEWS docs/* libvirt.spec.in include/libvirt/libvirt.h:
  Release of 0.7.0
* po/*.po*: updated and regenerated the localization pool

15 years agoAdd an allocation unit when calling qemu-img
Ryota Ozaki [Wed, 5 Aug 2009 12:35:17 +0000 (14:35 +0200)]
Add an allocation unit when calling qemu-img

* src/storage_backend.c: as the absence of units can be interpreted
  in diverging ways depending on the version

15 years agoAdd uniqness checking for LXC define/create methods
Daniel P. Berrange [Fri, 31 Jul 2009 14:25:03 +0000 (15:25 +0100)]
Add uniqness checking for LXC define/create methods

* src/lxc_driver.c: Check for name & UUID uniqueness when
  defining or creating domains

15 years agoFix removal of transient VMs when LXC aborts
Daniel P. Berrange [Fri, 31 Jul 2009 13:38:46 +0000 (14:38 +0100)]
Fix removal of transient VMs when LXC aborts

* src/lxc_driver.c: Remove transient VM after monitor triggered
  shutdown

15 years agoDon't try to activate cgroups if not present for LXC
Daniel P. Berrange [Fri, 31 Jul 2009 13:37:25 +0000 (14:37 +0100)]
Don't try to activate cgroups if not present for LXC

* src/lxc_controller.c: Don't throw error in LXC startup if
  the cgroups driver mount isn't available. Improve error
  logging for resource setup

15 years agoFix configure checks from previous commits
Daniel P. Berrange [Wed, 5 Aug 2009 10:59:58 +0000 (11:59 +0100)]
Fix configure checks from previous commits

* configure.in: Don't set AM_CONDITIIONAL until *after* making
  the checks

15 years agoAvoid a warning if compiling without inotify
Daniel P. Berrange [Wed, 5 Aug 2009 10:04:26 +0000 (12:04 +0200)]
Avoid a warning if compiling without inotify

* src/xm_internal.c: split the implementations of xenInotifyActive()

15 years agoTypo and comment fixes
Aron Griffis [Wed, 5 Aug 2009 09:56:56 +0000 (11:56 +0200)]
Typo and comment fixes

* docs/schemas/*.rng: the comments were wrong
* src/qemu_conf.c: typo in an error message

15 years agoRefresh /etc/xen if inotify wasn't
Cole Robinson [Wed, 5 Aug 2009 09:46:33 +0000 (11:46 +0200)]
Refresh /etc/xen if inotify wasn't

* src/xm_internal.c: in case of multiple connections to the xen driver
  and some clients were not using domain events, the whole /etc/xen
  monitoring would break leading to disapearing domains.

15 years agoDon't loose id on xen domain redefine
Cole Robinson [Wed, 5 Aug 2009 09:39:31 +0000 (11:39 +0200)]
Don't loose id on xen domain redefine

* src/xm_internal.c: bug when redefining a domain, if it was running
  we would loose its id

15 years agoRemove a stray semicolon
Daniel Veillard [Wed, 5 Aug 2009 09:24:23 +0000 (11:24 +0200)]
Remove a stray semicolon

* src/xend_internal.c: extraneous ; in xenDaemonParseSxprGraphicsNew

15 years agoWorkaround for broken GCC in Debian Etch
Maximilian Wilhelm [Wed, 5 Aug 2009 09:19:34 +0000 (11:19 +0200)]
Workaround for broken GCC in Debian Etch

* src/storage_conf.c src/internal.h: move previous check in internal.h
  and add a workaround for a GCC bug in Debian Etch on limit definitions

15 years agoXen Inotify support needs sys/inotify.h
Maximilian Wilhelm [Wed, 5 Aug 2009 08:57:40 +0000 (10:57 +0200)]
Xen Inotify support needs sys/inotify.h

* configure.in: to activate Xen Inotify checking we need to check for
  sys/inotify.h availability

15 years agoLXC driver requires sched.h and unshare()
Maximilian Wilhelm [Wed, 5 Aug 2009 08:52:14 +0000 (10:52 +0200)]
LXC driver requires sched.h and unshare()

* configure.in: make it check by default for both

15 years agoConfigure UML support only if sys/inotify.h present
Maximilian Wilhelm [Wed, 5 Aug 2009 08:47:18 +0000 (10:47 +0200)]
Configure UML support only if sys/inotify.h present

* configure.in: UML support requires sys/inotify.h so make it check
  by default.

15 years agoFix libcurl automatic check and ESX status
Maximilian Wilhelm [Wed, 5 Aug 2009 08:43:37 +0000 (10:43 +0200)]
Fix libcurl automatic check and ESX status

* configure.in: if libcurl is not present ESX should be desactivated
  so default to check for esx

15 years agoExtend the ESX URL to habdle ports and GSX
Matthias Bolte [Wed, 5 Aug 2009 08:23:59 +0000 (10:23 +0200)]
Extend the ESX URL to habdle ports and GSX

* src/esx/esx_driver.c src/esx/esx_vi.[ch] src/esx/esx_vmx.[ch]:
  adds version checking for GSX 2.0, allows to pass a specific port
  for the connection and also add a new specific gsx scheme for
  easier connections to GSX hosts

15 years agoFix escaping of 8-bit high characters
Daniel P. Berrange [Tue, 4 Aug 2009 17:13:09 +0000 (18:13 +0100)]
Fix escaping of 8-bit high characters

Fix  https://bugzilla.redhat.com/show_bug.cgi?id=479517

* src/buf.c: Cast to 'unsigned char' before doing compare to
  avoid rejecting 8-bit high characters

15 years agoFix memory leak in openvz driver
Daniel P. Berrange [Mon, 3 Aug 2009 10:42:39 +0000 (11:42 +0100)]
Fix memory leak in openvz driver

* src/openvz_driver.c: Remove unneccessary strdup() on hypervisor
  type api call

15 years agoRemove ATTRIBUTE_UNUSED from flags to qemudDomainMigratePerform.
Chris Lalancette [Fri, 31 Jul 2009 07:29:09 +0000 (09:29 +0200)]
Remove ATTRIBUTE_UNUSED from flags to qemudDomainMigratePerform.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoAdd a comment about setting errors after qemudStartVMDaemon().
Chris Lalancette [Fri, 31 Jul 2009 07:03:55 +0000 (09:03 +0200)]
Add a comment about setting errors after qemudStartVMDaemon().

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoFix an erroneous debug error to KVM; it should read QEMU/KVM.
Chris Lalancette [Fri, 31 Jul 2009 06:59:02 +0000 (08:59 +0200)]
Fix an erroneous debug error to KVM; it should read QEMU/KVM.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoRemove a stray semicolon in qemudDomainMigratePrepare2.
Chris Lalancette [Fri, 31 Jul 2009 06:56:17 +0000 (08:56 +0200)]
Remove a stray semicolon in qemudDomainMigratePrepare2.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoConvert a few stray users of free() in libvirt.c to VIR_FREE().
Chris Lalancette [Thu, 30 Jul 2009 14:43:34 +0000 (16:43 +0200)]
Convert a few stray users of free() in libvirt.c to VIR_FREE().

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoUse virGetHostname instead of gethostname.
Chris Lalancette [Thu, 30 Jul 2009 14:41:12 +0000 (16:41 +0200)]
Use virGetHostname instead of gethostname.

Fix up qemudDomainMigratePrepare2 to use virGetHostname instead of
gethostname.  Besides the fact that virGetHostname is far more clever,
there was a latent bug in the handling that could cause a buffer overflow
on a very long hostname.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoFix up a minor indentation issue with virDomainMigratePrepare.
Chris Lalancette [Thu, 30 Jul 2009 14:32:44 +0000 (16:32 +0200)]
Fix up a minor indentation issue with virDomainMigratePrepare.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoFix virCapabilitiesDefaultGuestMachine documentation.
Chris Lalancette [Thu, 30 Jul 2009 14:31:41 +0000 (16:31 +0200)]
Fix virCapabilitiesDefaultGuestMachine documentation.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoFix up a silly typo in apibuild.py.
Chris Lalancette [Thu, 30 Jul 2009 14:30:50 +0000 (16:30 +0200)]
Fix up a silly typo in apibuild.py.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoProtected against potential crash scenarios
Daniel P. Berrange [Fri, 31 Jul 2009 15:55:49 +0000 (16:55 +0100)]
Protected against potential crash scenarios

* src/qemu_driver.c: Check that monitor device is not NULL
  before runing a command to protect against bugs in caller

15 years agoImprove diagnostics when pidfile writing fails
Daniel P. Berrange [Fri, 31 Jul 2009 14:51:27 +0000 (15:51 +0100)]
Improve diagnostics when pidfile writing fails

* src/util.c: Include path & pid when logging pidfile failure

15 years agoFix crash when attempting to shutdown inactive QEMU vm
Daniel P. Berrange [Fri, 31 Jul 2009 14:50:46 +0000 (15:50 +0100)]
Fix crash when attempting to shutdown inactive QEMU vm

* src/qemu_driver.c: Add check that QEMU is active before attemting
  to shutdown. Fix error code for check in destroy method

15 years agoEnable ESX driver build on Mingw32
Daniel P. Berrange [Thu, 30 Jul 2009 15:40:29 +0000 (16:40 +0100)]
Enable ESX driver build on Mingw32

* autobuild.sh, mingw32-libvirt.spec.in: Enable esx on mingw32
* src/esx/esx_driver.c: Define AI_ADDRCONFIG if not set
* src/esx/esx_util.c, src/esx/esx_vi_types.c: Always use
  %lld & friends, since gnulib guarentees we have these
  and not the target's own variants

15 years agoDisable IPv6 on virtual networks
Daniel P. Berrange [Thu, 30 Jul 2009 15:34:56 +0000 (16:34 +0100)]
Disable IPv6 on virtual networks

If the bridge device is configured to have IPv6 address and
accept router advertisments, then a malicious guest can send
out bogus advertisments and hijack/DOS host IPv6 connectivity

* src/network_driver.c: Set accept_ra=0, disable_ipv6=1, autoconf=0
  for IPv6 sysctl on virual network bridge devices

15 years agoFix PCIe FLR detection
Mark McLoughlin [Fri, 31 Jul 2009 14:35:53 +0000 (15:35 +0100)]
Fix PCIe FLR detection

PCIe DevCap register is actually 32 bits, not 16 bits. Since FLR is
bit 28, we clearly are failing to detect FLR support.

Known to fix device reset with some SR-IOV devices.

* src/pci.c: fix pciDetectFunctionLevelReset()

15 years agoSet perms on /var/lib/libvirt/images to 0711
Mark McLoughlin [Fri, 31 Jul 2009 08:49:08 +0000 (09:49 +0100)]
Set perms on /var/lib/libvirt/images to 0711

Allow qemu user to open images in this dir, but still prevent others
from listing it.

* libvirt.spec.in: set /var/lib/libvirt/images perms to 0711

15 years agoFix problem writing QEMU pidfile
Daniel P. Berrange [Thu, 30 Jul 2009 13:58:16 +0000 (14:58 +0100)]
Fix problem writing QEMU pidfile

* src/util.c: Don't drop capabilities until after the PID file has
  been written. Kill off child if writing the PID file fails
* src/qemu_driver.c: Remove bogus trailing '/' in state dir

15 years agoAllow dnsmasq to provide DNS without DHCP
Daniel P. Berrange [Thu, 30 Jul 2009 13:52:31 +0000 (14:52 +0100)]
Allow dnsmasq to provide DNS without DHCP

* src/network_driver.c: Always start dnsmasq to allow it to provide
  DNS, even if no DHCP ranges are enabled

15 years agoAvoid warning when compiling without IFF_VNET_HDR
Maximilian Wilhelm [Thu, 30 Jul 2009 15:27:25 +0000 (17:27 +0200)]
Avoid warning when compiling without IFF_VNET_HDR

* src/bridge.c: avoid a couple of unused var/func warnings

15 years agoFix build on mingw32 by disabling netcf
Daniel P. Berrange [Thu, 30 Jul 2009 12:07:51 +0000 (13:07 +0100)]
Fix build on mingw32 by disabling netcf

* autobuild.sh, mingw32-libvirt.spec.in: Set --without-netcf for
  mingw32 builds

15 years agoESX Scheduler documentation and cleanup
Matthias Bolte [Thu, 30 Jul 2009 11:41:04 +0000 (13:41 +0200)]
ESX Scheduler documentation and cleanup

* esx/esx_driver.c: add some documentation about the CPU scheduler
  parameters and remove some old, unnecessary compensation code, since
  virsh uses the proposed parameter types now.

15 years agoFix vcpupin on Xen problem
Henrik Persson [Thu, 30 Jul 2009 11:29:46 +0000 (13:29 +0200)]
Fix vcpupin on Xen problem

* src/xend_internal.c: the update on the cpu affinity map format
  had na error and made the changes in the wrong buffer, fix those

15 years agoFix RPM upgrades from F11 to F12
Daniel P. Berrange [Thu, 30 Jul 2009 11:26:58 +0000 (12:26 +0100)]
Fix RPM upgrades from F11 to F12

* libvirt.spec.in: Create qemu/kvm user/group in %pre script

15 years agoFix an initialization problem in previous patch
Aron Griffis [Thu, 30 Jul 2009 07:14:47 +0000 (09:14 +0200)]
Fix an initialization problem in previous patch

* src/bridge.c: fix struct ifreq ifr init in brAddTap()

15 years agoUpdate the java bindings page
Bryan Kearney [Wed, 29 Jul 2009 21:28:50 +0000 (23:28 +0200)]
Update the java bindings page

* docs/java.html[.in]: update the java bindings html page to reflect the
  new repositories, JNA usage, and maven access

15 years agoRemove MAX_TAP_ID and let kernel do numbering
Aron Griffis [Wed, 29 Jul 2009 21:23:23 +0000 (23:23 +0200)]
Remove MAX_TAP_ID and let kernel do numbering

* src/bridge.c: no need to format the device string in brAddTap()
  this can be delegated to the kernel and removes an arbitrary limit.

15 years agoKernel command line support for UML
Ron Yorston [Wed, 29 Jul 2009 14:40:49 +0000 (16:40 +0200)]
Kernel command line support for UML

* src/uml_conf.c: add support for additional kernel command line
  arguments.

15 years agoFix deadlock in remote driver domain events
Daniel P. Berrange [Tue, 28 Jul 2009 16:45:19 +0000 (17:45 +0100)]
Fix deadlock in remote driver domain events

* src/remote_internal.c: Release driver lock when dispatching events
  to callbacks

15 years agoqemu: fix monitor socket reconnection
Ryota Ozaki [Wed, 29 Jul 2009 14:11:02 +0000 (16:11 +0200)]
qemu: fix monitor socket reconnection

* src/qemu_driver.c: fix qemudOpenMonitorUnix() to retry on ENOENT
  instead of EACCES which is the error one receive when the socket
  error hasn't shown up yet

15 years agoFix polkit/netcf disabling on older fedoras
Mark McLoughlin [Wed, 29 Jul 2009 09:05:39 +0000 (10:05 +0100)]
Fix polkit/netcf disabling on older fedoras

polkit was disabled by default for a reason - because we selectively
enable it on newer fedoras rather than disable it on older fedoras

Same fix needed for netcf

15 years agoCapilize libvirt-client summary
Mark McLoughlin [Wed, 29 Jul 2009 08:57:24 +0000 (09:57 +0100)]
Capilize libvirt-client summary

Fixes:

  W: summary-not-capitalized client side library and utilities of the libvirt library

15 years agoMove ldconfig calls to libvirt-client %post/%postun
Mark McLoughlin [Wed, 29 Jul 2009 08:55:43 +0000 (09:55 +0100)]
Move ldconfig calls to libvirt-client %post/%postun

Now that the library has moved to libvirt-client

15 years agoConvert NEWS to UTF-8
Mark McLoughlin [Wed, 29 Jul 2009 07:40:17 +0000 (08:40 +0100)]
Convert NEWS to UTF-8

* docs/news.xsl: request UTF-8 as the output encoding

* NEWS: re-generate with UTF-8 encoding

15 years agoFix trailing whitespace in NEWS
Mark McLoughlin [Wed, 29 Jul 2009 07:58:59 +0000 (08:58 +0100)]
Fix trailing whitespace in NEWS

git wouldn't let me push without this

15 years agoNo need to build require both python-devel and python
Mark McLoughlin [Wed, 29 Jul 2009 07:52:36 +0000 (08:52 +0100)]
No need to build require both python-devel and python

Since python-devel requires python

Pointed out by Itamar Reis Peixoto

15 years agoRemove executable perms from /etc/sysconfig/libvirtd
Mark McLoughlin [Tue, 28 Jul 2009 17:52:40 +0000 (18:52 +0100)]
Remove executable perms from /etc/sysconfig/libvirtd

Changed by Rich Jones for:

  libvirt.x86_64: E: executable-marked-as-config-file /etc/sysconfig/libvirtd

See:

  https://bugzilla.redhat.com/226055

15 years agoUse a %postun -p for one line scriptlet
Mark McLoughlin [Tue, 28 Jul 2009 17:50:30 +0000 (18:50 +0100)]
Use a %postun -p for one line scriptlet

Changed by Rich Jones, presumably for this:

  libvirt.x86_64: W: one-line-command-in-%postun /sbin/ldconfig

see:

  https://bugzilla.redhat.com/226055

15 years agoDon't explicitly require libxml2
Mark McLoughlin [Tue, 28 Jul 2009 17:14:49 +0000 (18:14 +0100)]
Don't explicitly require libxml2

Originally done by rjones as part of this package review:

  https://bugzilla.redhat.com/226055

15 years agoFix some unowned directories
Mark McLoughlin [Tue, 28 Jul 2009 18:07:51 +0000 (19:07 +0100)]
Fix some unowned directories

danpb's fix for:

  https://bugzilla.redhat.com/483442

15 years agoKill qemu BuildRequires
Mark McLoughlin [Tue, 28 Jul 2009 17:26:49 +0000 (18:26 +0100)]
Kill qemu BuildRequires

It's not needed at build time

Removed in Fedora by:

  * Fri Jun  5 2009 Mark McLoughlin <markmc@redhat.com> - 0.6.4-2.fc12
  - Remove the qemu BuildRequires

15 years agoEnable netcf by default
Mark McLoughlin [Tue, 28 Jul 2009 16:30:48 +0000 (17:30 +0100)]
Enable netcf by default

Disabled on < f12 for now until netcf is in Fedora updates

BuildRequires netcf if enabled, pass --without-netcf if its disabled

* libvirt.spec.in: enabled netcf by default

15 years agoDefault to with_polkit
Mark McLoughlin [Tue, 28 Jul 2009 18:13:33 +0000 (19:13 +0100)]
Default to with_polkit

Unless there's some reason we shouldn't

15 years agoMake vbox support configurable
Mark McLoughlin [Tue, 28 Jul 2009 16:59:34 +0000 (17:59 +0100)]
Make vbox support configurable

Added by DV with:

  * Fri Apr 24 2009 Daniel Veillard <veillard@redhat.com> - 0.6.3-1.fc12
  - release of 0.6.3
  - VirtualBox driver

15 years agoBuild with --without-capng if capng is disabled
Mark McLoughlin [Tue, 28 Jul 2009 16:35:32 +0000 (17:35 +0100)]
Build with --without-capng if capng is disabled

* libvirt.spec: pass --without-capng if appropriate

15 years agoBuildRequires libcap-ng-devel not capng-devel
Mark McLoughlin [Tue, 28 Jul 2009 17:30:20 +0000 (18:30 +0100)]
BuildRequires libcap-ng-devel not capng-devel

Fedora CVS changelog is "Fix libcap-ng-devel require, Daniel"

15 years agoDrop curl host check when using ESX without check
Shahar Klein [Tue, 28 Jul 2009 10:13:20 +0000 (12:13 +0200)]
Drop curl host check when using ESX without check

* src/esx/esx_vi.c: drop host check if no_verify=1, but as Matthias
  pointed out if no_verify=2 we should check the host is the right
  one