]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
11 years agomaint: ensure src/ directory includes are clean
Eric Blake [Tue, 25 Mar 2014 20:04:12 +0000 (14:04 -0600)]
maint: ensure src/ directory includes are clean

In 'make syntax-check', we have a rule that prevents layering
violations between the various files in src.  However, we
forgot to treat conf/ and the more recently-added access/ as
lower-level directories, and were not detecting cases where
they might have used a driver file.  Also, it's not nice that
qemu can use storage/ but none of the other drivers could do so.

* cfg.mk (sc_prohibit_cross_inclusion): Tighten rules for conf/
and access/, let all other drivers use storage/.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agostorage: gluster: Implement storage pool lookup
Peter Krempa [Thu, 27 Mar 2014 12:39:51 +0000 (13:39 +0100)]
storage: gluster: Implement storage pool lookup

Use the previously implemented function to lookup glusterfs source pools
for the netfs pool to lookup native gluster pools too.

11 years agostorage: netfs: Support lookup of glusterfs pool sources
Peter Krempa [Wed, 26 Mar 2014 18:17:55 +0000 (19:17 +0100)]
storage: netfs: Support lookup of glusterfs pool sources

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

Use the "gluster" command line tool to retrieve information about remote
volumes on a gluster server to allow storage pool source lookup.

Unfortunately gluster doesn't provide a management library so that we
could use that directly, instead the RPC calls are hardcoded in the
command line tool.

11 years agostorage: netfs: Split up and tidy up NFS storage pool source function
Peter Krempa [Wed, 26 Mar 2014 16:25:40 +0000 (17:25 +0100)]
storage: netfs: Split up and tidy up NFS storage pool source function

Extract the NFS related stuff into a separate function and tidy up the
rest of the code so we can reuse it to add gluster backend detection.

Additionally avoid reporting of errors from "showmount" and return an
empty source list instead. This will help when adding other detection
backends.

11 years agoBump version to 1.2.4 for new dev cycle
Michal Privoznik [Tue, 1 Apr 2014 08:22:22 +0000 (10:22 +0200)]
Bump version to 1.2.4 for new dev cycle

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
11 years agoRelease of libvirt-1.2.3
Daniel Veillard [Tue, 1 Apr 2014 07:29:53 +0000 (15:29 +0800)]
Release of libvirt-1.2.3

* docs/news.html.in libvirt.spec.in: update for the release
* po/*.po*: pull updated translations and regenerate

11 years agobuild: fix syntax-check for storage_backend
Martin Kletzander [Tue, 1 Apr 2014 06:52:59 +0000 (08:52 +0200)]
build: fix syntax-check for storage_backend

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
11 years agogluster: Fix "key" attribute for gluster volumes
Peter Krempa [Mon, 24 Feb 2014 15:12:34 +0000 (16:12 +0100)]
gluster: Fix "key" attribute for gluster volumes

According to our documentation the "key" value has the following
meaning: "Providing an identifier for the volume which identifies a
single volume." The currently used keys for gluster volumes consist of
the gluster volume name and file path. This can't be considered unique
as a different storage server can serve a volume with the same name.

Unfortunately I wasn't able to figure out a way to retrieve the gluster
volume UUID which would avoid the possibility of having two distinct
keys identifying a single volume.

Use the full URI as the key for the volume to avoid the more critical
ambiguity problem and document the possible change to UUID.

11 years agostorage: Rename VolOpenCheckMode to VolOpen
Cole Robinson [Sun, 30 Mar 2014 23:01:23 +0000 (19:01 -0400)]
storage: Rename VolOpenCheckMode to VolOpen

Remove the original VolOpen implementation, which is now only used in
one spot.

11 years agostorage: move block format lookup to shared UpdateVolInfo
Cole Robinson [Sun, 30 Mar 2014 22:50:36 +0000 (18:50 -0400)]
storage: move block format lookup to shared UpdateVolInfo

11 years agostorage: Rename UpdateVolInfoFlags to UpdateVolInfo
Cole Robinson [Sun, 30 Mar 2014 22:27:14 +0000 (18:27 -0400)]
storage: Rename UpdateVolInfoFlags to UpdateVolInfo

And drop the original UpdateVolInfo. Makes it a bit easier to follow
the function usage.

And change the int parameter to an explicit bool.

11 years agoFix Memory Leak in testMessageArrayRef()
Nehal J Wani [Sun, 30 Mar 2014 21:35:56 +0000 (03:05 +0530)]
Fix Memory Leak in testMessageArrayRef()

While running virdbustest, it was found that valgrind pointed out
the following memory leaks:

==9996== 17 (8 direct, 9 indirect) bytes in 1 blocks are definitely lost in loss record 9 of 36
==9996==    at 0x4A069EE: malloc (vg_replace_malloc.c:270)
==9996==    by 0x4A06B62: realloc (vg_replace_malloc.c:662)
==9996==    by 0x4C6B587: virReallocN (viralloc.c:245)
==9996==    by 0x4C6B6AE: virExpandN (viralloc.c:294)
==9996==    by 0x4C82B54: virDBusMessageDecodeArgs (virdbus.c:907)
==9996==    by 0x4C83463: virDBusMessageDecode (virdbus.c:1141)
==9996==    by 0x402C45: testMessageArrayRef (virdbustest.c:273)
==9996==    by 0x404E71: virtTestRun (testutils.c:201)
==9996==    by 0x401C2D: mymain (virdbustest.c:479)
==9996==    by 0x4055ED: virtTestMain (testutils.c:789)
==9996==    by 0x3E6CE1ED1C: (below main) (libc-start.c:226)
==9996==
==9996== 28 (16 direct, 12 indirect) bytes in 1 blocks are definitely lost in loss record 12 of 36
==9996==    at 0x4A06BE0: realloc (vg_replace_malloc.c:662)
==9996==    by 0x4C6B587: virReallocN (viralloc.c:245)
==9996==    by 0x4C6B6AE: virExpandN (viralloc.c:294)
==9996==    by 0x4C82B54: virDBusMessageDecodeArgs (virdbus.c:907)
==9996==    by 0x4C83463: virDBusMessageDecode (virdbus.c:1141)
==9996==    by 0x402C45: testMessageArrayRef (virdbustest.c:273)
==9996==    by 0x404E71: virtTestRun (testutils.c:201)
==9996==    by 0x401C2D: mymain (virdbustest.c:479)
==9996==    by 0x4055ED: virtTestMain (testutils.c:789)
==9996==    by 0x3E6CE1ED1C: (below main) (libc-start.c:226)
==9996==

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agovirsh: fix 'help event'
Eric Blake [Mon, 31 Mar 2014 13:05:33 +0000 (07:05 -0600)]
virsh: fix 'help event'

'virsh help event' included a summary line "event - (null)"
due to a misnamed info field.

* tools/virsh-domain.c (info_event): Use correct name.
* tools/virsh-network.c (info_network_event): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agobhyve: don't leak tap devices on failures
Roman Bogorodskiy [Sun, 30 Mar 2014 12:23:47 +0000 (16:23 +0400)]
bhyve: don't leak tap devices on failures

On failures, virBhyveProcessStart() does not cleanup network
interfaces that could be created by virBhyveProcessBuildBhyveCmd(),
which results in a leaked tap device.

To fix that, extract network cleanup code to bhyveNetCleanup()
and use it in cleanup stage of virBhyveProcessStart().

11 years agoutil: remove useless comment for virCgroupMoveTask in vircgroup.c
Hongwei Bi [Mon, 31 Mar 2014 07:47:17 +0000 (15:47 +0800)]
util: remove useless comment for virCgroupMoveTask in vircgroup.c

Signed-off-by: Hongwei Bi <hwbi2008@gmail.com>
11 years agovirsh: man: Fix spelling of parameters for --memspec in snapshot-create-as
Shanzhi Yu [Fri, 28 Mar 2014 11:38:03 +0000 (19:38 +0800)]
virsh: man: Fix spelling of parameters for --memspec in snapshot-create-as

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

Snapshot type should be no, internal, or external.

11 years agoutil: storagefile: Don't pursue backing chain of NULL image
Peter Krempa [Fri, 7 Mar 2014 10:38:18 +0000 (11:38 +0100)]
util: storagefile: Don't pursue backing chain of NULL image

When virStorageFileGetMetadata is called with NULL path argument, the
invalid pointer boils down through the recursive worker and is caught by
virHashAddEntry which is thankfully resistant to NULL arguments. As it
doesn't make sense to pursue backing chains of NULL volumes, exit
earlier.

This was noticed in the virt-aahelper-test with a slightly modified
codebase.

11 years agostorage: gluster: Fix crash when initialization of storage backend fails
Peter Krempa [Fri, 7 Mar 2014 10:29:19 +0000 (11:29 +0100)]
storage: gluster: Fix crash when initialization of storage backend fails

The libgfapi function glfs_fini doesn't tolerate NULL pointers. Add a
check on the error paths as it's possible to crash libvirtd if the
gluster volume can't be initialized.

11 years agostorage: pool: Fix XML indentation in pool source lookup
Peter Krempa [Wed, 26 Mar 2014 18:16:48 +0000 (19:16 +0100)]
storage: pool: Fix XML indentation in pool source lookup

The <source> elements need to be indented from <sources> elements.

11 years agoESX: Add support for virtualHW version 10
Dawid Zamirski [Thu, 27 Mar 2014 22:26:04 +0000 (18:26 -0400)]
ESX: Add support for virtualHW version 10

This follows the same pattern when v8 and v9 were added. I've tested
this with my ESX 5.5 and seems to work fine.

11 years agoProhibit Windows special chars in filenames
Matthias Bolte [Sat, 29 Mar 2014 11:16:38 +0000 (12:16 +0100)]
Prohibit Windows special chars in filenames

Using any of these chars [:*?"<>|] in a filename is forbidden on
Windows and breaks git operations on Windows as git is not able
to create those files/directories on clone or pull.

Because some of them can be used in UNIX filenames they tend to
creep into filenames; especially : in PCI/SCSI device names that
are used as filenames in test cases.

11 years agotests: Fix SCSI test data filenames for Windows
Matthias Bolte [Sat, 29 Mar 2014 10:58:32 +0000 (11:58 +0100)]
tests: Fix SCSI test data filenames for Windows

Windows doesn't allow : in filenames.

Commit 6fdece9a332fc668a89bde96af94e7b7cbf6750d added files with a : in
their names. This broke git operations on Windows as git is not able to
create those files on clone or pull.

Replace : with - in the offending filenames and adapt the test case.
As the tested Linux specific code expects the files to exist with : in
their path use symlinks to provide the name that way.

11 years agoFix virNodeDeviceListCaps always returns empty
Jincheng Miao [Fri, 28 Mar 2014 23:13:01 +0000 (07:13 +0800)]
Fix virNodeDeviceListCaps always returns empty

virNodeDeviceListCaps will always return empty for a pci nodedevice,
actually it should return 'pci'.

It is because the loop variable ncaps isn't increased.

Introduced by commit be2636f.

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

Signed-off-by: Jincheng Miao <jmiao@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
11 years agoCreate hostdevmgr in UserRuntimeDirectory for session libvirt
Ján Tomko [Fri, 28 Mar 2014 08:44:34 +0000 (09:44 +0100)]
Create hostdevmgr in UserRuntimeDirectory for session libvirt

Without this, session libvirt won't start if it fails to create
the directory.

11 years agoRemove double free in virHostdevManagerDispose
Ján Tomko [Fri, 28 Mar 2014 08:43:11 +0000 (09:43 +0100)]
Remove double free in virHostdevManagerDispose

The object itself is freed by virObjectUnref.

11 years agoFix apparmor profile to make vfio pci passthrough work
Cédric Bosdonnat [Tue, 25 Mar 2014 11:48:26 +0000 (12:48 +0100)]
Fix apparmor profile to make vfio pci passthrough work

See lp#1276719 for the bug description. As virt-aa-helper doesn't know
the VFIO groups to use for the guest, allow access to all
/dev/vfio/[0-9]* and /dev/vfio/vfio files if there is a potential need
for vfio

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoFixed regression in apparmor profiles for qemu brought by 43c030f
Cédric Bosdonnat [Mon, 24 Mar 2014 17:20:20 +0000 (18:20 +0100)]
Fixed regression in apparmor profiles for qemu brought by 43c030f

11 years agoFix Memory Leak in virQEMUCapsInitGuestFromBinary()
Nehal J Wani [Thu, 27 Mar 2014 11:38:56 +0000 (17:08 +0530)]
Fix Memory Leak in virQEMUCapsInitGuestFromBinary()

While running qemucaps2xmltest, it was found that valgrind pointed out
the following memory leaks:

==29896== 0 bytes in 1 blocks are definitely lost in loss record 1 of 65
==29896==    at 0x4A0577B: calloc (vg_replace_malloc.c:593)
==29896==    by 0x4C6B45E: virAllocN (viralloc.c:191)
==29896==    by 0x4232A9: virQEMUCapsGetMachineTypesCaps (qemu_capabilities.c:1999)
==29896==    by 0x4234E7: virQEMUCapsInitGuestFromBinary (qemu_capabilities.c:789)
==29896==    by 0x41F10B: testQemuCapsXML (qemucaps2xmltest.c:118)
==29896==    by 0x41FFD1: virtTestRun (testutils.c:201)
==29896==    by 0x41EE7A: mymain (qemucaps2xmltest.c:203)
==29896==    by 0x42074D: virtTestMain (testutils.c:789)
==29896==    by 0x3E6CE1ED1C: (below main) (libc-start.c:226)
==29896==
==29896== 0 bytes in 1 blocks are definitely lost in loss record 2 of 65
==29896==    at 0x4A0577B: calloc (vg_replace_malloc.c:593)
==29896==    by 0x4C6B45E: virAllocN (viralloc.c:191)
==29896==    by 0x4232A9: virQEMUCapsGetMachineTypesCaps (qemu_capabilities.c:1999)
==29896==    by 0x4234E7: virQEMUCapsInitGuestFromBinary (qemu_capabilities.c:789)
==29896==    by 0x41F10B: testQemuCapsXML (qemucaps2xmltest.c:118)
==29896==    by 0x41FFD1: virtTestRun (testutils.c:201)
==29896==    by 0x41EEA3: mymain (qemucaps2xmltest.c:204)
==29896==    by 0x42074D: virtTestMain (testutils.c:789)
==29896==    by 0x3E6CE1ED1C: (below main) (libc-start.c:226)

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoutil: fix a typo in virprocess.c and docs
Hongwei Bi [Thu, 27 Mar 2014 05:49:48 +0000 (13:49 +0800)]
util: fix a typo in virprocess.c and docs

s/forcably/forcibly

Signed-off-by: Hongwei Bi <hwbi2008@gmail.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoModify help information of virsh list command
Li Yang [Thu, 27 Mar 2014 06:10:57 +0000 (14:10 +0800)]
Modify help information of virsh list command

Use 'virsh list domain --title' option can get domain's title,
not description, the original help information 'show short
domain description' will confuse users, so modify it to
'show domain title'

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
11 years agodocs: cgroups: fix typo about LXC cgroups
Jean-Baptiste Rouault [Thu, 27 Mar 2014 11:21:11 +0000 (12:21 +0100)]
docs: cgroups: fix typo about LXC cgroups

11 years agobhyve: add domainLookupByID
Wojciech Macek [Thu, 27 Mar 2014 07:31:21 +0000 (08:31 +0100)]
bhyve: add domainLookupByID

Implement domain lookup by its ID.

11 years agoFix memory leak in testGetCaps()
Nehal J Wani [Wed, 26 Mar 2014 22:37:54 +0000 (04:07 +0530)]
Fix memory leak in testGetCaps()

While running qemucaps2xmltest, it was found that valgrind pointed out
the following memory leaks:

==27045== 160 (112 direct, 48 indirect) bytes in 1 blocks are definitely lost in loss record 51 of 65
==27045==    at 0x4A0577B: calloc (vg_replace_malloc.c:593)
==27045==    by 0x4C6BACD: virAllocVar (viralloc.c:560)
==27045==    by 0x4CAF095: virObjectNew (virobject.c:193)
==27045==    by 0x421453: virQEMUCapsNew (qemu_capabilities.c:1805)
==27045==    by 0x41F04F: testQemuCapsXML (qemucaps2xmltest.c:72)
==27045==    by 0x41FFD1: virtTestRun (testutils.c:201)
==27045==    by 0x41EE7A: mymain (qemucaps2xmltest.c:203)
==27045==    by 0x42074D: virtTestMain (testutils.c:789)
==27045==    by 0x3E6CE1ED1C: (below main) (libc-start.c:226)
==27045==
==27045== 160 (112 direct, 48 indirect) bytes in 1 blocks are definitely lost in loss record 52 of 65
==27045==    at 0x4A0577B: calloc (vg_replace_malloc.c:593)
==27045==    by 0x4C6BACD: virAllocVar (viralloc.c:560)
==27045==    by 0x4CAF095: virObjectNew (virobject.c:193)
==27045==    by 0x421453: virQEMUCapsNew (qemu_capabilities.c:1805)
==27045==    by 0x41F04F: testQemuCapsXML (qemucaps2xmltest.c:72)
==27045==    by 0x41FFD1: virtTestRun (testutils.c:201)
==27045==    by 0x41EEA3: mymain (qemucaps2xmltest.c:204)
==27045==    by 0x42074D: virtTestMain (testutils.c:789)
==27045==    by 0x3E6CE1ED1C: (below main) (libc-start.c:226)

11 years agobhyve: add xml2args unittest
Roman Bogorodskiy [Wed, 26 Mar 2014 16:53:49 +0000 (20:53 +0400)]
bhyve: add xml2args unittest

At this point unittest covers 4 basic cases:

 - minimal working XML for bhyve
 - same as above, but with virtio disk
 - ACPI and APIC args test
 - MAC address test

11 years agoMove virBhyveTapGetRealDeviceName to virnetdevtap
Roman Bogorodskiy [Wed, 26 Mar 2014 16:53:48 +0000 (20:53 +0400)]
Move virBhyveTapGetRealDeviceName to virnetdevtap

To ease mocking for bhyve unit tests move virBhyveTapGetRealDeviceName()
out of bhyve_command.c to virnetdevtap and rename it to
virNetDevTapGetRealDeviceName().

11 years agonetwork: fix problems with SRV records
Laine Stump [Tue, 18 Mar 2014 01:16:38 +0000 (19:16 -0600)]
network: fix problems with SRV records

A patch submitted by Steven Malin last week pointed out a problem with
libvirt's DNS SRV record configuration:

  https://www.redhat.com/archives/libvir-list/2014-March/msg00536.html

When searching for that message later, I found another series that had
been posted by Guannan Ren back in 2012 that somehow slipped between
the cracks:

  https://www.redhat.com/archives/libvir-list/2012-July/msg00236.html

That patch was very much out of date, but also pointed out some real
problems.

This patch fixes all the noted problems by refactoring
virNetworkDNSSrvDefParseXML() and networkDnsmasqConfContents(), then
verifies those fixes by added several new records to the test case.

Problems fixed:

* both service and protocol now have an underscore ("_") prepended on
  the commandline, as required by RFC2782.

  <srv service='sip' protocol='udp' domain='example.com'
       target='tests.example.com' port='5060' priority='10'
       weight='150'/>

  before: srv-host=sip.udp.example.com,tests.example.com,5060,10,150
  after:  srv-host=_sip._udp.example.com,tests.example.com,5060,10,150

* if "domain" wasn't specified in the <srv> element, the extra
  trailing "." will no longer be added to the dnsmasq commandline.

  <srv service='sip' protocol='udp' target='tests.example.com'
       port='5060' priority='10' weight='150'/>

  before: srv-host=sip.udp.,tests.example.com,5060,10,150
  after:  srv-host=_sip._udp,tests.example.com,5060,10,150

* when optional attributes aren't specified, the separating comma is
  also now not placed on the dnsmasq commandline. If optional
  attributes in the middle of the line are not specified, they are
  replaced with a default value in the commandline (1 for port, 0 for
  priority and weight).

  <srv service='sip' protocol='udp' target='tests.example.com'
       port='5060'/>

  before: srv-host=sip.udp.,tests.example.com,5060,,
  after:  srv-host=_sip._udp,tests.example.com,5060

  (actually the would have generated an error, because "optional"
  attributes weren't really optional.)

* The allowed characters for both service and protocol are now limited
  to alphanumerics, plus a few special characters that are found in
  existing names in /etc/services and /etc/protocols. (One exception
  is that both of these files contain names with an embedded ".", but
  "."  can't be used in these fields of an SRV record because it is
  used as a field separator and there is no method to escape a "."
  into a field.) (Previously only the strings "tcp" and "udp" were
  allowed for protocol, but this restriction has been removed, since
  RFC2782 specifically says that it isn't limited to those, and that
  anyway it is case insensitive.)

* the "domain" attribute is no longer required in order to recognize
  the port, priority, and weight attributes during parsing. Only
  "target" is required for this.

* if "target" isn't specified, port, priority, and weight are not
  allowed (since they are meaningless - an empty target means "this
  service is *not available* for this domain").

* port, priority, and weight are now truly optional, as the comments
  originally suggested, but which was not actually true.

11 years agoShift the for loop over matched vars by one
Ján Tomko [Thu, 20 Mar 2014 12:20:08 +0000 (13:20 +0100)]
Shift the for loop over matched vars by one

Instead of adding one to the iterator on every use.

11 years agoUse VIR_STRNDUP instead of modifying the matched string
Ján Tomko [Thu, 20 Mar 2014 12:14:11 +0000 (13:14 +0100)]
Use VIR_STRNDUP instead of modifying the matched string

11 years agoFree groups in case of a partial match
Ján Tomko [Thu, 20 Mar 2014 12:08:49 +0000 (13:08 +0100)]
Free groups in case of a partial match

If there are more than two regexes, but only one of them matches,
the matched groups would be leaked.

11 years agoSimplify the loop in virCommandRunRegex
Ján Tomko [Thu, 20 Mar 2014 12:05:13 +0000 (13:05 +0100)]
Simplify the loop in virCommandRunRegex

Do not check for border iterator values inside the loop,
move the code before/after the loop instead.

11 years agoRemove useless 'maxReg' variable
Ján Tomko [Thu, 20 Mar 2014 11:56:58 +0000 (12:56 +0100)]
Remove useless 'maxReg' variable

It is used to break out of the loop early if one regex does not match.
Use the 'break' statement instead.

11 years agoqemuDomainAttachDeviceFlags: Parse device xml as inactive
Michal Privoznik [Wed, 19 Mar 2014 14:46:07 +0000 (15:46 +0100)]
qemuDomainAttachDeviceFlags: Parse device xml as inactive

In all other drivers we are doing so. Moreover, we don't want to parse
runtime information in attach (even if the attach is meant as live)
because we are generating the runtime info ourselves. We can't trust
users they supply sane values anyway.

==1140== 9 bytes in 1 blocks are definitely lost in loss record 72 of 1,151
==1140==    at 0x4A06C2B: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==1140==    by 0x623C758: xmlStrndup (in /usr/lib64/libxml2.so.2.9.1)
==1140==    by 0x50FD763: virXMLPropString (virxml.c:483)
==1140==    by 0x510F8B7: virDomainDeviceInfoParseXML (domain_conf.c:3685)
==1140==    by 0x511ACFD: virDomainChrDefParseXML (domain_conf.c:7535)
==1140==    by 0x5121D13: virDomainDeviceDefParse (domain_conf.c:9918)
==1140==    by 0x13AE6313: qemuDomainAttachDeviceFlags (qemu_driver.c:6926)
==1140==    by 0x13AE65FA: qemuDomainAttachDevice (qemu_driver.c:7005)
==1140==    by 0x51C77DA: virDomainAttachDevice (libvirt.c:10231)
==1140==    by 0x127FDD: remoteDispatchDomainAttachDevice (remote_dispatch.h:2404)
==1140==    by 0x127EC5: remoteDispatchDomainAttachDeviceHelper (remote_dispatch.h:2382)
==1140==    by 0x5241F81: virNetServerProgramDispatchCall (virnetserverprogram.c:437)

When doing live attach, we are passing the inactive definition anyway
since we are passing the result of virDomainDeviceDefCopy() which does
inactive copy by default.

Moreover, we are doing the same mistake in qemuhotplugtest.

Just a side note - it makes perfect sense to parse the runtime info
like alias in qemuDomainDetachDevice and qemuDomainUpdateDeviceFlags()
as in some cases the only difference to distinguish two devices can be
just their alias.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
11 years agoqemu: add unit tests for the capabilities xml
Francesco Romani [Mon, 17 Mar 2014 15:19:46 +0000 (16:19 +0100)]
qemu: add unit tests for the capabilities xml

The test is loosely inspired from qemucapabilitiestest
and qemuxml2xmltest.

Added a new test instead of extending an existing one because
the feature being tested don't really fits nicely in any
existing place.

11 years agoqemu: extract guest capabilities initialization
Francesco Romani [Mon, 17 Mar 2014 15:19:45 +0000 (16:19 +0100)]
qemu: extract guest capabilities initialization

This patch decouples the binary and the capabilities detection
from the guest initialization.

The purpose is to make testing easier.

11 years agoqemu: export disk snapshot support in capabilities
Francesco Romani [Mon, 17 Mar 2014 15:19:44 +0000 (16:19 +0100)]
qemu: export disk snapshot support in capabilities

This patch adds an element to QEMU's capability XML, to
show if the underlying QEMU binary supports the live disk
snapshotting or not.
This allows any client to know ahead of time if the feature
is available.

Without this information available, the only way to check
for the snapshot support is to request one and check for
errors.

Signed-off-by: Francesco Romani <fromani@redhat.com>
11 years agoShow the real cpu shares value in live XML
Ján Tomko [Tue, 4 Mar 2014 12:56:24 +0000 (13:56 +0100)]
Show the real cpu shares value in live XML

Currently, the Linux kernel treats values of '0' and '1' as
the minimum of 2. Values larger than the maximum are changed
to the maximum.

Re-reading the shares value after setting it reflects this in
the live domain XML.

11 years agoTreat zero cpu shares as a valid value
Ján Tomko [Tue, 4 Mar 2014 11:39:46 +0000 (12:39 +0100)]
Treat zero cpu shares as a valid value

Currently, <cputune><shares>0</shares></cputune> is treated
as if it were not specified.

Treat is as a valid value if it was explicitly specified
and write it to the cgroups.

11 years agoCoverity: Resolve a RESOURCE_LEAK
John Ferlan [Tue, 25 Mar 2014 17:09:05 +0000 (13:09 -0400)]
Coverity: Resolve a RESOURCE_LEAK

On error the lofd would have been leaked.

11 years agoCoverity: Resolve a FORWARD_NULL
John Ferlan [Tue, 25 Mar 2014 17:03:19 +0000 (13:03 -0400)]
Coverity: Resolve a FORWARD_NULL

Recent changes in the module seemed to have caused Coverity to reanalyze
certain parts of the code. Previously the code was modified via commit
id '11a11812' to resolve a different error (perhaps DEADCODE).  Up through
commit id '7b3f1f8c' there were no issues.

The new error indicats the 'outbuf' was checked for NULL and then complains
because of the dereference. Adding checks for non-NULL prior to the deref
resulted in a DEADCODE message.

So, resolve using an sa_assert() to keep Coverity quiet especially since
it doesn't understand that outbuf will change as a result of a successful
virCommandRun() call.

11 years agoCoverity: Resolve a CHECKED_RETURN message
John Ferlan [Tue, 25 Mar 2014 16:57:58 +0000 (12:57 -0400)]
Coverity: Resolve a CHECKED_RETURN message

Recent changes to the module seemed to have caused Coverity to find a new
issue regarding the failure to check the return from a sendmsg. The code
doesn't seem to care about the return status, so just added an ignore_value
to keep Coverity quiet.

11 years agoqemu: remove redundant virQEMUDriverGetConfig
Tomoki Sekiyama [Tue, 25 Mar 2014 20:37:33 +0000 (16:37 -0400)]
qemu: remove redundant virQEMUDriverGetConfig

qemuDomainSetSchedulerParametersFlags() calls virQEMUDriverGetConfig() twice
and makes the reference counter leak. This removes redundant call.

Problem introduced in commit 45ad1ad

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agobhyve: don't fail on busy tap devices
Roman Bogorodskiy [Sun, 23 Mar 2014 09:44:41 +0000 (13:44 +0400)]
bhyve: don't fail on busy tap devices

We use virBhyveTapGetRealDeviceName() to map network interface name
to a real device path, trying to open possible devices and getting
names by ioctl.

Make it skip devices that fail to open with EBUSY because they're
most likely already used by other VMs.

11 years agolibxl: Create log directory earlier
Stefan Bader [Tue, 25 Mar 2014 15:28:36 +0000 (16:28 +0100)]
libxl: Create log directory earlier

Commit d9f19c30d054c86b15a304f4118baa4fa75af9d2 moved a lot of the
configuration setup into libxlDriverConfigNew().
However that tries to create the libxl/libxl-driver.log before the
libxl directory gets created in libxlStateInitialize().

This causes the daemon to fail on systems that have not had the directory
created before.

Move the code to create the libxl directory into libxlDriverConfigNew().

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
11 years agoAdd a rule for indenting labels
Ján Tomko [Fri, 21 Mar 2014 12:07:03 +0000 (13:07 +0100)]
Add a rule for indenting labels

Indent top-level labels by one space.

Add the rule to HACKING and enforce it by syntax-check.

11 years agoIndent top-level labels by one space in tools/
Ján Tomko [Tue, 25 Mar 2014 06:53:59 +0000 (07:53 +0100)]
Indent top-level labels by one space in tools/

11 years agoIndent top-level labels by one space in tests/
Ján Tomko [Tue, 25 Mar 2014 06:53:44 +0000 (07:53 +0100)]
Indent top-level labels by one space in tests/

11 years agoIndent top-level labels by one space in the rest of src/
Ján Tomko [Tue, 25 Mar 2014 06:57:22 +0000 (07:57 +0100)]
Indent top-level labels by one space in the rest of src/

11 years agoIndent top-level labels by one space in src/xen/
Ján Tomko [Tue, 25 Mar 2014 06:54:51 +0000 (07:54 +0100)]
Indent top-level labels by one space in src/xen/

11 years agoIndent top-level labels by one space in src/vbox/
Ján Tomko [Tue, 25 Mar 2014 06:54:41 +0000 (07:54 +0100)]
Indent top-level labels by one space in src/vbox/

11 years agoIndent top-level labels by one space in src/util/
Ján Tomko [Tue, 25 Mar 2014 06:53:22 +0000 (07:53 +0100)]
Indent top-level labels by one space in src/util/

11 years agoIndent top-level labels by one space in src/test/
Ján Tomko [Tue, 25 Mar 2014 06:52:53 +0000 (07:52 +0100)]
Indent top-level labels by one space in src/test/

11 years agoIndent top-level labels by one space in src/storage/
Ján Tomko [Tue, 25 Mar 2014 06:52:40 +0000 (07:52 +0100)]
Indent top-level labels by one space in src/storage/

11 years agoIndent top-level labels by one space in src/rpc/
Ján Tomko [Tue, 25 Mar 2014 06:52:31 +0000 (07:52 +0100)]
Indent top-level labels by one space in src/rpc/

11 years agoIndent top-level labels by one space in src/remote/
Ján Tomko [Tue, 25 Mar 2014 06:54:27 +0000 (07:54 +0100)]
Indent top-level labels by one space in src/remote/

11 years agoIndent top-level labels by one space in src/qemu/
Ján Tomko [Tue, 25 Mar 2014 06:49:44 +0000 (07:49 +0100)]
Indent top-level labels by one space in src/qemu/

11 years agoIndent top-level labels by one space in src/parallels/
Ján Tomko [Tue, 25 Mar 2014 06:57:01 +0000 (07:57 +0100)]
Indent top-level labels by one space in src/parallels/

11 years agoIndent top-level labels by one space in src/nwfilter/
Ján Tomko [Tue, 25 Mar 2014 06:56:49 +0000 (07:56 +0100)]
Indent top-level labels by one space in src/nwfilter/

11 years agoIndent top-level labels by one space in src/network/
Ján Tomko [Tue, 25 Mar 2014 06:56:13 +0000 (07:56 +0100)]
Indent top-level labels by one space in src/network/

11 years agoIndent top-level labels by one space in src/lxc/
Ján Tomko [Tue, 25 Mar 2014 06:49:26 +0000 (07:49 +0100)]
Indent top-level labels by one space in src/lxc/

11 years agoIndent top-level labels by one space in src/locking/
Ján Tomko [Tue, 25 Mar 2014 06:51:47 +0000 (07:51 +0100)]
Indent top-level labels by one space in src/locking/

11 years agoIndent top-level labels by one space in libvirt.c
Ján Tomko [Tue, 25 Mar 2014 06:49:02 +0000 (07:49 +0100)]
Indent top-level labels by one space in libvirt.c

11 years agoIndent top-level labels by one space in src/libxl/
Ján Tomko [Tue, 25 Mar 2014 06:51:17 +0000 (07:51 +0100)]
Indent top-level labels by one space in src/libxl/

11 years agoIndent top-level labels by one space in src/esx/
Ján Tomko [Tue, 25 Mar 2014 06:48:48 +0000 (07:48 +0100)]
Indent top-level labels by one space in src/esx/

11 years agoIndent top-level labels by one space in src/cpu/
Ján Tomko [Tue, 25 Mar 2014 06:50:40 +0000 (07:50 +0100)]
Indent top-level labels by one space in src/cpu/

11 years agoIndent top-level labels by one space in src/conf/
Ján Tomko [Tue, 25 Mar 2014 06:48:31 +0000 (07:48 +0100)]
Indent top-level labels by one space in src/conf/

11 years agoIndent top-level labels by one space in examples/
Ján Tomko [Tue, 25 Mar 2014 06:48:10 +0000 (07:48 +0100)]
Indent top-level labels by one space in examples/

11 years agoIndent top-level labels by one space in daemon/
Ján Tomko [Tue, 25 Mar 2014 06:45:38 +0000 (07:45 +0100)]
Indent top-level labels by one space in daemon/

11 years agosanlock: Forbid VIR_DOMAIN_LOCK_FAILURE_RESTART
Jiri Denemark [Mon, 24 Mar 2014 13:23:09 +0000 (14:23 +0100)]
sanlock: Forbid VIR_DOMAIN_LOCK_FAILURE_RESTART

https://bugzilla.redhat.com/show_bug.cgi?id=905282
https://bugzilla.redhat.com/show_bug.cgi?id=967494

When lock failure is detected by sanlock, our sanlock_helper kill script
will try to restart (shutdown followed by start) the affected domain
when RESTART action is configured for it. While shutting down kills QEMU
and removes all its leases (which is what sanlock wants to happen),
trying to start it again just hangs because libvirt tries reacquire the
locks in the failed lock space. Hence, this action cannot be supported
by sanlock driver.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
11 years agosanlock: Forbid VIR_DOMAIN_LOCK_FAILURE_IGNORE
Jiri Denemark [Mon, 24 Mar 2014 13:22:36 +0000 (14:22 +0100)]
sanlock: Forbid VIR_DOMAIN_LOCK_FAILURE_IGNORE

https://bugzilla.redhat.com/show_bug.cgi?id=905280
https://bugzilla.redhat.com/show_bug.cgi?id=967493

Sanlock expects that the configured kill script either kills the PID on
lock failure or removes all locks the PID owns. If none of the two
options happen, sanlock will reboot the host. Although IGNORE action is
supposed to ignore the request to kill the PID or remove all leases,
it's certainly not designed to cause the host to be rebooted. That said,
IGNORE action is incompatible with sanlock and should be forbidden by
libvirt.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
11 years agoutil: Sanitize ATTRIBUTE_NONNULL use in viriscsi.h
Peter Krempa [Tue, 25 Mar 2014 07:17:27 +0000 (08:17 +0100)]
util: Sanitize ATTRIBUTE_NONNULL use in viriscsi.h

Some of the function attributes marked as nonnull actually explicitly
handle the arguments for NULL. All changed functions handle missing
"initiatoriqn" argument well and virISCSIScanTargets also handles well
if the return pointers are missing. Remove some of the liberaly used
ATTRIBUTE_NONNULLs as coverity and possibly other compilers that honor
the attribute fail to compile the code.

Flaw introduced in commit 5e1d5dde

11 years agomaint: update to latest gnulib
Eric Blake [Mon, 24 Mar 2014 22:29:52 +0000 (16:29 -0600)]
maint: update to latest gnulib

While we aren't impacted by most of upstream's changes this
month, at least the regex improvement looks useful.

* gnulib: Synchronize to upstream.

11 years agoallow "virsh dump --memory-only" specify dump format
Qiao Nuohan [Sun, 23 Mar 2014 03:51:15 +0000 (11:51 +0800)]
allow "virsh dump --memory-only" specify dump format

This patch adds "[--format] <string>" to "virsh dump --memory-only", which is
changed to use the new virDomainCoreDumpWithFormat API.

Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoqemu: add support for virDomainCoreDumpWithFormat API
Qiao Nuohan [Sun, 23 Mar 2014 03:51:14 +0000 (11:51 +0800)]
qemu: add support for virDomainCoreDumpWithFormat API

This patch makes qemu driver support virDomainCoreDumpWithFormat API.

Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
11 years agoqemu: add qemuMonitorGetDumpGuestMemoryCapability
Qiao Nuohan [Sun, 23 Mar 2014 03:51:13 +0000 (11:51 +0800)]
qemu: add qemuMonitorGetDumpGuestMemoryCapability

This patch adds qemuMonitorGetDumpGuestMemoryCapability, which is used to check
whether the specified dump-guest-memory format is supported by qemu.

Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
11 years agoadd new virDomainCoreDumpWithFormat API
Qiao Nuohan [Sun, 23 Mar 2014 03:51:12 +0000 (11:51 +0800)]
add new virDomainCoreDumpWithFormat API

--memory-only option is introduced without compression supported. Now qemu
has support for dumping domain's memory in kdump-compressed format. This
patch adds a new virDomainCoreDumpWithFormat API, so that the format in
which qemu dumps domain's memory can be specified.

Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoapparmor: Fix build after split of disk source metadata
Peter Krempa [Mon, 24 Mar 2014 19:00:11 +0000 (20:00 +0100)]
apparmor: Fix build after split of disk source metadata

Commit 4f20226664b2d4d9e9496ec1e05c9280581a1ca0 breaks build with
AppArmor enabled as it missed the refactor to the new accessors.

11 years agoconf: prepare to track multiple host source files per <disk>
Eric Blake [Wed, 19 Mar 2014 17:11:16 +0000 (11:11 -0600)]
conf: prepare to track multiple host source files per <disk>

It's finally time to start tracking disk backing chains in
<domain> XML.  The first step is to start refactoring code
so that we have an object more convenient for representing
each host source resource in the context of a single guest
<disk>.  Ultimately, I plan to move the new type into src/util
where it can be reused by virStorageFile, but to make the
transition easier to review, this patch just creates the
new type then fixes everything until it compiles again.

* src/conf/domain_conf.h (_virDomainDiskDef): Split...
(_virDomainDiskSourceDef): ...to new struct.
(virDomainDiskAuthClear): Use new type.
* src/conf/domain_conf.c (virDomainDiskDefFree): Split...
(virDomainDiskSourceDefClear): ...to new function.
(virDomainDiskGetType, virDomainDiskSetType)
(virDomainDiskGetSource, virDomainDiskSetSource)
(virDomainDiskGetDriver, virDomainDiskSetDriver)
(virDomainDiskGetFormat, virDomainDiskSetFormat)
(virDomainDiskAuthClear, virDomainDiskGetActualType)
(virDomainDiskDefParseXML, virDomainDiskSourceDefFormat)
(virDomainDiskDefFormat, virDomainDiskDefForeachPath)
(virDomainDiskDefGetSecurityLabelDef)
(virDomainDiskSourceIsBlockType): Adjust all users.
* src/lxc/lxc_controller.c (virLXCControllerSetupDisk):
Likewise.
* src/lxc/lxc_driver.c (lxcDomainAttachDeviceMknodHelper):
Likewise.
* src/qemu/qemu_command.c (qemuAddRBDHost, qemuParseRBDString)
(qemuParseDriveURIString, qemuParseGlusterString)
(qemuParseISCSIString, qemuParseNBDString)
(qemuDomainDiskGetSourceString, qemuBuildDriveStr)
(qemuBuildCommandLine, qemuParseCommandLineDisk)
(qemuParseCommandLine): Likewise.
* src/qemu/qemu_conf.c (qemuCheckSharedDevice)
(qemuAddISCSIPoolSourceHost, qemuTranslateDiskSourcePool):
Likewise.
* src/qemu/qemu_driver.c (qemuDomainUpdateDeviceConfig)
(qemuDomainPrepareDiskChainElement)
(qemuDomainSnapshotCreateInactiveExternal)
(qemuDomainSnapshotPrepareDiskExternalBackingInactive)
(qemuDomainSnapshotPrepareDiskInternal)
(qemuDomainSnapshotPrepare)
(qemuDomainSnapshotCreateSingleDiskActive)
(qemuDomainSnapshotUndoSingleDiskActive)
(qemuDomainBlockPivot, qemuDomainBlockJobImpl)
(qemuDomainBlockCopy, qemuDomainBlockCommit): Likewise.
* src/qemu/qemu_migration.c (qemuMigrationIsSafe): Likewise.
* src/qemu/qemu_process.c (qemuProcessGetVolumeQcowPassphrase)
(qemuProcessInitPasswords): Likewise.
* src/security/security_selinux.c
(virSecuritySELinuxSetSecurityFileLabel): Likewise.
* src/storage/storage_driver.c (virStorageFileInitFromDiskDef):
Likewise.
* tests/securityselinuxlabeltest.c (testSELinuxLoadDef):
Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoconf: use disk source accessors in xenxs/
Eric Blake [Mon, 24 Mar 2014 18:14:48 +0000 (12:14 -0600)]
conf: use disk source accessors in xenxs/

Part of a series of cleanups to use new accessor methods.

* src/xenxs/xen_sxpr.c (xenParseSxprDisks, xenParseSxpr)
(xenFormatSxprDisk, xenFormatSxpr): Use accessors.
* src/xenxs/xen_xm.c (xenParseXM, xenFormatXMDisk, xenFormatXM):
Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoconf: use disk source accessors in xen/
Eric Blake [Tue, 18 Mar 2014 23:12:43 +0000 (17:12 -0600)]
conf: use disk source accessors in xen/

Part of a series of cleanups to use new accessor methods.

* src/xen/xend_internal.c (virDomainXMLDevID): Use accessors.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoconf: use disk source accessors in vmx/
Eric Blake [Tue, 18 Mar 2014 23:06:59 +0000 (17:06 -0600)]
conf: use disk source accessors in vmx/

Part of a series of cleanups to use new accessor methods.

* src/vmx/vmx.c (virVMXHandleLegacySCSIDiskDriverName)
(virVMXParseDisk, virVMXFormatDisk, virVMXFormatFloppy): Use
accessors.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoconf: use disk source accessors in vmware/
Eric Blake [Tue, 18 Mar 2014 21:41:28 +0000 (15:41 -0600)]
conf: use disk source accessors in vmware/

Part of a series of cleanups to use new accessor methods.

* src/vmware/vmware_conf.c (vmwareVmxPath): Use accessors.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoconf: use disk source accessors in vbox/
Eric Blake [Tue, 18 Mar 2014 21:12:57 +0000 (15:12 -0600)]
conf: use disk source accessors in vbox/

Part of a series of cleanups to use new accessor methods.

* src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc, vboxAttachDrives)
(vboxDomainAttachDeviceImpl, vboxDomainDetachDevice): Use
accessors.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoconf: use disk source accessors in uml/
Eric Blake [Tue, 18 Mar 2014 20:00:03 +0000 (14:00 -0600)]
conf: use disk source accessors in uml/

Part of a series of cleanups to use new accessor methods.

* src/uml/uml_conf.c (umlBuildCommandLine): Use accessors.
* src/uml/uml_driver.c (umlDomainAttachUmlDisk): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoconf: use disk source accessors in security/
Eric Blake [Tue, 18 Mar 2014 19:55:04 +0000 (13:55 -0600)]
conf: use disk source accessors in security/

Part of a series of cleanups to use new accessor methods.

* src/security/security_dac.c (virSecurityDACSetSecurityImageLabel)
(virSecurityDACRestoreSecurityImageLabelInt)
(virSecurityDACSetSecurityAllLabel): Use accessors.
* src/security/security_selinux.c
(virSecuritySELinuxRestoreSecurityImageLabelInt)
(virSecuritySELinuxSetSecurityImageLabel)
(virSecuritySELinuxSetSecurityAllLabel): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoconf: use disk source accessors in qemu/
Eric Blake [Tue, 18 Mar 2014 19:16:47 +0000 (13:16 -0600)]
conf: use disk source accessors in qemu/

Part of a series of cleanups to use new accessor methods.

* src/qemu/qemu_conf.c (qemuCheckSharedDevice)
(qemuAddSharedDevice, qemuRemoveSharedDevice, qemuSetUnprivSGIO):
Use accessors.
* src/qemu/qemu_domain.c (qemuDomainDeviceDefPostParse)
(qemuDomainObjCheckDiskTaint, qemuDomainSnapshotForEachQcow2Raw)
(qemuDomainCheckRemoveOptionalDisk, qemuDomainCheckDiskPresence)
(qemuDiskChainCheckBroken, qemuDomainDetermineDiskChain):
Likewise.
* src/qemu/qemu_hotplug.c (qemuDomainChangeEjectableMedia)
(qemuDomainCheckEjectableMedia)
(qemuDomainAttachVirtioDiskDevice, qemuDomainAttachSCSIDisk)
(qemuDomainAttachUSBMassstorageDevice)
(qemuDomainAttachDeviceDiskLive, qemuDomainRemoveDiskDevice)
(qemuDomainDetachVirtioDiskDevice, qemuDomainDetachDiskDevice):
Likewise.
* src/qemu/qemu_migration.c (qemuMigrationStartNBDServer)
(qemuMigrationDriveMirror, qemuMigrationCancelDriveMirror)
(qemuMigrationIsSafe): Likewise.
* src/qemu/qemu_process.c (qemuProcessGetVolumeQcowPassphrase)
(qemuProcessHandleIOError, qemuProcessHandleBlockJob)
(qemuProcessInitPasswords): Likewise.
* src/qemu/qemu_driver.c (qemuDomainChangeDiskMediaLive)
(qemuDomainGetBlockInfo, qemuDiskPathToAlias): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoconf: use disk source accessors in phyp/
Eric Blake [Mon, 17 Mar 2014 21:24:31 +0000 (15:24 -0600)]
conf: use disk source accessors in phyp/

Part of a series of cleanups to use new accessor methods.

* src/phyp/phyp_driver.c (phypDomainAttachDevice, phypBuildLpar):
Use accessors.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoconf: use disk source accessors in parallels/
Eric Blake [Mon, 17 Mar 2014 21:11:07 +0000 (15:11 -0600)]
conf: use disk source accessors in parallels/

Part of a series of cleanups to use new accessor methods.

* src/parallels/parallels_driver.c (parallelsGetHddInfo)
(parallelsAddHdd, parallelsApplyDisksParams, parallelsCreateVm):
Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoconf: use disk source accessors in lxc/
Eric Blake [Mon, 17 Mar 2014 20:49:05 +0000 (14:49 -0600)]
conf: use disk source accessors in lxc/

Part of a series of cleanups to use new accessor methods.

* src/lxc/lxc_cgroup.c (virLXCCgroupSetupDeviceACL): Use
accessors.
* src/lxc/lxc_controller.c (virLXCControllerSetupLoopDeviceDisk)
(virLXCControllerSetupNBDDeviceDisk)
(virLXCControllerSetupLoopDevices, virLXCControllerSetupDisk):
Likewise.
* src/lxc/lxc_driver.c (lxcDomainAttachDeviceDiskLive)
(lxcDomainDetachDeviceDiskLive): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoconf: use disk source accessors in locking/
Eric Blake [Mon, 17 Mar 2014 20:23:08 +0000 (14:23 -0600)]
conf: use disk source accessors in locking/

Part of a series of cleanups to use new accessor methods.

* src/locking/domain_lock.c (virDomainLockManagerAddDisk): Use
accessors.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoconf: use disk source accessors in libxl/
Eric Blake [Mon, 17 Mar 2014 20:14:11 +0000 (14:14 -0600)]
conf: use disk source accessors in libxl/

Part of a series of cleanups to use new accessor methods.

* src/libxl/libxl_conf.c (libxlMakeDisk): Use accessors.
* src/libxl/libxl_driver.c (libxlDomainChangeEjectableMedia)
(libxlDomainAttachDeviceDiskLive): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>