]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
14 years agoRearrange VGA/IDE controller address reservation
Daniel P. Berrange [Thu, 15 Jul 2010 13:44:18 +0000 (14:44 +0100)]
Rearrange VGA/IDE controller address reservation

The first VGA and IDE devices need to have fixed PCI address
reservations. Currently this is handled inline with the other
non-primary VGA/IDE devices. The fixed virtio balloon device
at slot 3, ensures auto-assignment skips the slots 1/2. The
virtio address will shortly become configurable though. This
means the reservation of fixed slots needs to be done upfront
to ensure that they don't get re-used for other devices.

This is more or less reverting the previous changeset:

  commit 83acdeaf173b2a1206b755c1ab317cac36facd90
  Author: Daniel P. Berrange <berrange@redhat.com>
  Date:   Wed Feb 3 16:11:29 2010 +0000

  Fix restore of QEMU guests with PCI device reservation

The difference is that this time, instead of unconditionally
reserving the address, we only reserve the address if it was
initially type=none. Addresses of type=pci were handled
earlier in process by qemuDomainPCIAddressSetCreate(). This
ensures restore step doesn't have problems

* src/qemu/qemu_conf.c: Reserve first VGA + IDE address
  upfront

14 years agoRemove inappropriate use of VIR_ERR_NO_SUPPORT
Daniel P. Berrange [Thu, 15 Jul 2010 13:27:27 +0000 (14:27 +0100)]
Remove inappropriate use of VIR_ERR_NO_SUPPORT

The VIR_ERR_NO_SUPPORT refers to an API which is not implemented.
There is a separate VIR_ERR_CONFIG_UNSUPPORTED for XML config
options that are not available with the current hypervisor.

* src/qemu/qemu_conf.c, src/qemu/qemu_driver.c: Remove
  many VIR_ERR_NO_SUPPORT replace with VIR_ERR_CONFIG_UNSUPPORTED

14 years agoFix a NULL dereference in the case that the arg in question
Chris Lalancette [Tue, 20 Jul 2010 16:51:12 +0000 (12:51 -0400)]
Fix a NULL dereference in the case that the arg in question
didn't exist.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
14 years agoRemove bogus free of static strings
Daniel P. Berrange [Mon, 19 Jul 2010 17:59:34 +0000 (18:59 +0100)]
Remove bogus free of static strings

Remove bogus free of statically allocated strings introduced
in 03ca42046a54c5cfadb2e69194896abf06f6a10f

* src/conf/capabilities.c: Don't free static strings for
  default disk driver type/name

14 years agoFix a deadlock in bi-directional p2p concurrent migration.
Chris Lalancette [Thu, 15 Jul 2010 14:12:35 +0000 (10:12 -0400)]
Fix a deadlock in bi-directional p2p concurrent migration.

If you try to execute two concurrent migrations p2p
from A->B and B->A, the two libvirtd's will deadlock
trying to perform the migrations.  The reason for this is
that in p2p migration, the libvirtd's are responsible for
making the RPC Prepare, Migrate, and Finish calls.  However,
they are currently holding the driver lock while doing so,
which basically guarantees deadlock in this scenario.

This patch fixes the situation by adding
qemuDomainObjEnterRemoteWithDriver and
qemuDomainObjExitRemoteWithDriver helper methods.  The Enter
take an additional object reference, then drops both the
domain object lock and the driver lock.  The Exit takes
both the driver and domain object lock, then drops the
reference.  Adding calls to these Enter and Exit helpers
around remote calls in the various migration methods
seems to fix the problem for me in testing.

This should make the situation safe. The additional domain
object reference ensures that the domain object won't disappear
while this operation is happening.  The BeginJob that is called
inside of qemudDomainMigratePerform ensures that we can't execute a
second migrate (or shutdown, or save, etc) job while the
migration is active.  Finally, the additional check on the state
of the vm after we reacquire the locks ensures that we can't
be surprised by an external event (domain crash, etc).

Signed-off-by: Chris Lalancette <clalance@redhat.com>
14 years agoMake virsh setmaxmem balloon only when successful.
Chris Lalancette [Tue, 30 Mar 2010 13:03:26 +0000 (09:03 -0400)]
Make virsh setmaxmem balloon only when successful.

After playing around with virsh setmaxmem for a bit,
I ran into some surprising behavior; if a hypervisor does
not support the virDomainSetMaxMemory() API, but the value
specified for setmaxmem is less than the current amount
of memory in the domain, the domain would be ballooned
down *before* an error was reported.

To make this more consistent, run virDomainSetMaxMemory()
before trying to shrink; that way, if an error is thrown,
no changes to the running domain are made.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
14 years agoUse unsigned long in cmdSetmem.
Chris Lalancette [Thu, 17 Jun 2010 19:36:36 +0000 (15:36 -0400)]
Use unsigned long in cmdSetmem.

The virsh command "setmem" takes as input a number that
should represent an unsigned long number of kilobytes.  Fix
cmdSetmem to properly parse this as an unsigned long instead
of an int.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
14 years agofsync new storage volumes even if new volume was copied.
Laine Stump [Mon, 19 Jul 2010 22:59:07 +0000 (18:59 -0400)]
fsync new storage volumes even if new volume was copied.

Originally the storage volume files were opened with O_DSYNC to make
sure they were flushed to disk immediately. It turned out that this
was extremely slow in some cases, so the O_DSYNC was removed in favor
of just calling fsync() after all the data had been written. However,
this call to fsync was inside the block that is executed to zero-fill
the end of the volume file. In cases where the new volume is copied
from an old volume, and they are the same length, this fsync would
never take place.

Now the fsync is *always* done, unless there is an error (in which
case it isn't important, and is most likely inappropriate.

14 years agoDon't skip zero'ing end of volume file when inputvol is shorter than newvol
Laine Stump [Mon, 19 Jul 2010 22:53:38 +0000 (18:53 -0400)]
Don't skip zero'ing end of volume file when inputvol is shorter than newvol

A missing set of braces around an error condition caused us to skip
zero'ing out the remainder of a new volume file if the new volume was
longer than the original (the goto was supposed to be taken only in
the case of error, but was always being taken).

14 years agoAlways clear out the last_error in virshReportError.
Chris Lalancette [Fri, 18 Jun 2010 14:14:04 +0000 (10:14 -0400)]
Always clear out the last_error in virshReportError.

Otherwise you can get bogus "unknown error" printouts on
subsequent commands.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
14 years agoFix up inconsistent virsh option error reporting.
Chris Lalancette [Thu, 17 Jun 2010 18:58:55 +0000 (14:58 -0400)]
Fix up inconsistent virsh option error reporting.

The virsh option error reporting was not being used
consistently; some commands would spit out errors on
missing required options while others would just silently fail.
However, vshCommandOptString knows which ones are required
and which ones aren't, so make it spit out an error where
appropriate.  The rest of the patch is just cleaning up
the uses of vshCommandOptString to deal with the new error
reporting.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
14 years agoUse the extract backing store format in storage volume lookup
Daniel P. Berrange [Fri, 9 Jul 2010 10:28:40 +0000 (11:28 +0100)]
Use the extract backing store format in storage volume lookup

The storage volume lookup code was probing for the backing store
format, instead of using the format extracted from the file
itself. This meant it could report in accurate information. If
a format is included in the file, then use that in preference,
with probing as a fallback.

* src/storage/storage_backend_fs.c: Use extracted backing store
  format

14 years agoRewrite qemu-img backing store format handling
Daniel P. Berrange [Wed, 16 Jun 2010 13:14:05 +0000 (14:14 +0100)]
Rewrite qemu-img backing store format handling

When creating qcow2 files with a backing store, it is important
to set an explicit format to prevent QEMU probing. The storage
backend was only doing this if it found a 'kvm-img' binary. This
is wrong because plenty of kvm-img binaries don't support an
explicit format, and plenty of 'qemu-img' binaries do support
a format. The result was that most qcow2 files were not getting
a backing store format.

This patch runs 'qemu-img -h' to check for the two support
argument formats

  '-o backing_format=raw'
  '-F raw'

and use whichever option it finds

* src/storage/storage_backend.c: Query binary to determine
  how to set the backing store format

14 years agoAdd ability to set a default driver name/type when parsing disks
Daniel P. Berrange [Mon, 14 Jun 2010 15:08:55 +0000 (16:08 +0100)]
Add ability to set a default driver name/type when parsing disks

Record a default driver name/type in capabilities struct. Use this
when parsing disks if value is not set in XML config.

* src/conf/capabilities.h: Record default driver name/type for disks
* src/conf/domain_conf.c: Fallback to default driver name/type
  when parsing disks
* src/qemu/qemu_driver.c: Set default driver name/type to raw

14 years agoDisable all disk probing in QEMU driver & add config option to re-enable
Daniel P. Berrange [Tue, 15 Jun 2010 16:58:58 +0000 (17:58 +0100)]
Disable all disk probing in QEMU driver & add config option to re-enable

Disk format probing is now disabled by default. A new config
option in /etc/qemu/qemu.conf will re-enable it for existing
deployments where this causes trouble

14 years agoPass security driver object into all security driver callbacks
Daniel P. Berrange [Tue, 15 Jun 2010 16:44:19 +0000 (17:44 +0100)]
Pass security driver object into all security driver callbacks

The implementation of security driver callbacks often needs
to access the security driver object. Currently only a handful
of callbacks include the driver object as a parameter. Later
patches require this is many more places.

* src/qemu/qemu_driver.c: Pass in the security driver object
  to all callbacks
* src/qemu/qemu_security_dac.c, src/qemu/qemu_security_stacked.c,
  src/security/security_apparmor.c, src/security/security_driver.h,
  src/security/security_selinux.c: Add a virSecurityDriverPtr
  param to all security callbacks

14 years agoConvert all disk backing store loops to shared helper API
Daniel P. Berrange [Tue, 15 Jun 2010 15:40:47 +0000 (16:40 +0100)]
Convert all disk backing store loops to shared helper API

Update the QEMU cgroups code, QEMU DAC security driver, SELinux
and AppArmour security drivers over to use the shared helper API
virDomainDiskDefForeachPath().

* src/qemu/qemu_driver.c, src/qemu/qemu_security_dac.c,
  src/security/security_selinux.c, src/security/virt-aa-helper.c:
  Convert over to use virDomainDiskDefForeachPath()

14 years agoAdd an API for iterating over disk paths
Daniel P. Berrange [Mon, 14 Jun 2010 17:09:15 +0000 (18:09 +0100)]
Add an API for iterating over disk paths

There is duplicated code which iterates over disk backing stores
performing some action. Provide a convenient helper for doing
this to eliminate duplication & risk of mistakes with disk format
probing

* src/conf/domain_conf.c, src/conf/domain_conf.h,
  src/libvirt_private.syms: Add virDomainDiskDefForeachPath()

14 years agoRequire format to be passed into virStorageFileGetMetadata
Daniel P. Berrange [Tue, 15 Jun 2010 15:15:51 +0000 (16:15 +0100)]
Require format to be passed into virStorageFileGetMetadata

Require the disk image to be passed into virStorageFileGetMetadata.
If this is set to VIR_STORAGE_FILE_AUTO, then the format will be
resolved using probing. This makes it easier to control when
probing will be used

* src/qemu/qemu_driver.c, src/qemu/qemu_security_dac.c,
  src/security/security_selinux.c, src/security/virt-aa-helper.c:
  Set VIR_STORAGE_FILE_AUTO when calling virStorageFileGetMetadata.
* src/storage/storage_backend_fs.c: Probe for disk format before
  calling virStorageFileGetMetadata.
* src/util/storage_file.h, src/util/storage_file.c: Remove format
  from virStorageFileMeta struct & require it to be passed into
  method.

14 years agoRefactor virStorageFileGetMetadataFromFD to separate functionality
Daniel P. Berrange [Tue, 15 Jun 2010 13:58:10 +0000 (14:58 +0100)]
Refactor virStorageFileGetMetadataFromFD to separate functionality

The virStorageFileGetMetadataFromFD did two jobs in one. First
it probed for storage type, then it extracted metadata for the
type. It is desirable to be able to separate these jobs, allowing
probing without querying metadata, and querying metadata without
probing.

To prepare for this, split out probing code into a new pair of
methods

  virStorageFileProbeFormatFromFD
  virStorageFileProbeFormat

* src/util/storage_file.c, src/util/storage_file.h,
  src/libvirt_private.syms: Introduce virStorageFileProbeFormat
  and virStorageFileProbeFormatFromFD

14 years agoRemove 'type' field from FileTypeInfo struct
Daniel P. Berrange [Mon, 14 Jun 2010 15:39:32 +0000 (16:39 +0100)]
Remove 'type' field from FileTypeInfo struct

Instead of including a field in FileTypeInfo struct for the
disk format, rely on the array index matching the format.
Use verify() to assert the correct number of elements in the
array.

* src/util/storage_file.c: remove type field from FileTypeInfo

14 years agoExtract the backing store format as well as name, if available
Daniel P. Berrange [Mon, 14 Jun 2010 14:53:59 +0000 (15:53 +0100)]
Extract the backing store format as well as name, if available

When QEMU opens a backing store for a QCow2 file, it will
normally auto-probe for the format of the backing store,
rather than assuming it has the same format as the referencing
file. There is a QCow2 extension that allows an explicit format
for the backing store to be embedded in the referencing file.
This closes the auto-probing security hole in QEMU.

This backing store format can be useful for libvirt users
of virStorageFileGetMetadata, so extract this data and report
it.

QEMU does not require disk image backing store files to be in
the same format the file linkee. It will auto-probe the disk
format for the backing store when opening it. If the backing
store was intended to be a raw file this could be a security
hole, because a guest may have written data into its disk that
then makes the backing store look like a qcow2 file. If it can
trick QEMU into thinking the raw file is a qcow2 file, it can
access arbitrary files on the host by adding further backing
store links.

To address this, callers of virStorageFileGetMeta need to be
told of the backing store format. If no format is declared,
they can make a decision whether to allow format probing or
not.

14 years agoCVE-2010-2242 Apply a source port mapping to virtual network masquerading
Daniel P. Berrange [Thu, 10 Jun 2010 16:50:38 +0000 (12:50 -0400)]
CVE-2010-2242 Apply a source port mapping to virtual network masquerading

IPtables will seek to preserve the source port unchanged when
doing masquerading, if possible. NFS has a pseudo-security
option where it checks for the source port <= 1023 before
allowing a mount request. If an admin has used this to make the
host OS trusted for mounts, the default iptables behaviour will
potentially allow NAT'd guests access too. This needs to be
stopped.

With this change, the iptables -t nat -L -n -v rules for the
default network will be

Chain POSTROUTING (policy ACCEPT 95 packets, 9163 bytes)
 pkts bytes target     prot opt in     out     source               destination
   14   840 MASQUERADE  tcp  --  *      *       192.168.122.0/24    !192.168.122.0/24    masq ports: 1024-65535
   75  5752 MASQUERADE  udp  --  *      *       192.168.122.0/24    !192.168.122.0/24    masq ports: 1024-65535
    0     0 MASQUERADE  all  --  *      *       192.168.122.0/24    !192.168.122.0/24

* src/network/bridge_driver.c: Add masquerade rules for TCP
  and UDP protocols
* src/util/iptables.c, src/util/iptables.c: Add source port
  mappings for TCP & UDP protocols when masquerading.

14 years agoman pages: update authors and copyright notice for libvirtd and virsh
Justin Clift [Mon, 12 Jul 2010 19:33:35 +0000 (05:33 +1000)]
man pages: update authors and copyright notice for libvirtd and virsh

This patch removes the individual author names from the libvirtd and virsh
man pages, instead referring to the main AUTHORS file distributed with
libvirt.  This approach is needed, as we can't guarantee unicode support
across all versions of pod2man used with libvirt.

Additionally, this patch includes the libvirtd man page in the spec file
used with "make rpm".  Without this patch "make rpm" is broken.

14 years agoFix compile on i686.
Chris Lalancette [Fri, 16 Jul 2010 13:14:53 +0000 (09:14 -0400)]
Fix compile on i686.

When printing out size_t, we need to use %zu to make sure it
will continue to compile on both 32-bit and 64-bit platforms.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
14 years agoRemove unused and bitrotting vshCommandOptStringList
Chris Lalancette [Thu, 17 Jun 2010 15:25:35 +0000 (11:25 -0400)]
Remove unused and bitrotting vshCommandOptStringList

Signed-off-by: Chris Lalancette <clalance@redhat.com>
14 years agoRemove error checking after using vshMalloc.
Chris Lalancette [Thu, 17 Jun 2010 15:24:01 +0000 (11:24 -0400)]
Remove error checking after using vshMalloc.

vshMalloc and friends always exit() on allocation failure,
so there is no reason to do checking for NULL in the code
that uses it.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
14 years agoRemove the "showerror" parameter from vshConnectionUsability.
Chris Lalancette [Thu, 17 Jun 2010 14:47:06 +0000 (10:47 -0400)]
Remove the "showerror" parameter from vshConnectionUsability.

Nobody was using it anyway.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
14 years agoRFC: Canonicalize block device paths
David Allan [Thu, 8 Jul 2010 22:04:26 +0000 (18:04 -0400)]
RFC: Canonicalize block device paths

There are many naming conventions for partitions associated with a
block device.  Some of the major ones are:

/dev/foo -> /dev/foo1
/dev/foo1 -> /dev/foo1p1
/dev/mapper/foo -> /dev/mapper/foop1
/dev/disk/by-path/foo -> /dev/disk/by-path/foo-part1

The universe of possible conventions isn't clear.  Rather than trying
to understand all possible conventions, this patch divides devices
into two groups, device mapper devices and everything else.  Device
mapper devices seem always to follow the convention of device ->
devicep1; everything else is canonicalized.

14 years agodaemon: dispatch.c should include stdio.h (and stdarg.h)
Ryota Ozaki [Thu, 8 Jul 2010 11:42:22 +0000 (20:42 +0900)]
daemon: dispatch.c should include stdio.h (and stdarg.h)

dispatch.c requires stdio.h (and stdarg.h), however, currently
dispatch.c implicitly relys on rpc/xdr.h to include stdio.h.
If rpc/xdr.h unxpectedly does not include stdio.h, the compilation
of dispatch.c fails.

This can happen, for example, when portablexdr is installed
under /usr/local; because portablexdr's rpc/xdr.h does not
include stdio.h and gcc looks up it not /usr/include/rpc/xdr.h.

Note that stdarg.h is also included according to man va_start,
although stdio.h seems including it anyway.

14 years agouml_driver: correct logic error in umlMonitorCommand
Jim Meyering [Tue, 13 Jul 2010 20:28:35 +0000 (15:28 -0500)]
uml_driver: correct logic error in umlMonitorCommand

* src/uml/uml_driver.c (umlMonitorCommand): Correct flaw that would
cause unconditional "incomplete reply ..." failure, since "nbytes"
was always 0 or 1.

14 years agoqemuConnectMonitor: fix a bug that would have masked SELinux failure
Jim Meyering [Tue, 13 Jul 2010 20:15:04 +0000 (15:15 -0500)]
qemuConnectMonitor: fix a bug that would have masked SELinux failure

* src/qemu/qemu_driver.c (qemuConnectMonitor): Correct erroneous
parenthesization in two expressions.  Without this fix, failure
to set or clear SELinux security context in the monitor would go
undiagnosed.  Also correct a diagnostic and split some long lines.

14 years agopython: Fix IOErrorReasonCallback bindings
Cole Robinson [Tue, 13 Jul 2010 22:07:19 +0000 (18:07 -0400)]
python: Fix IOErrorReasonCallback bindings

A copy and paste error was causing us to dispatch the incorrect
routine. Spotted by Dan Kenigsberg.

14 years ago.gitignore: Ignore generated libvirtd docs
Cole Robinson [Tue, 13 Jul 2010 22:10:49 +0000 (18:10 -0400)]
.gitignore: Ignore generated libvirtd docs

14 years agoesx: Make esxVI_*_Deserialize dynamically dispatched
Matthias Bolte [Tue, 6 Jul 2010 15:27:05 +0000 (17:27 +0200)]
esx: Make esxVI_*_Deserialize dynamically dispatched

This will be used to deserialize the response from a call
to esxVI_SearchDatastore_Task properly.

14 years agoAdd openauth example to demonstrate a custom auth callback
Matthias Bolte [Tue, 6 Jul 2010 12:59:50 +0000 (14:59 +0200)]
Add openauth example to demonstrate a custom auth callback

14 years agoEliminate compiler warning due to gettext string with no format args
Laine Stump [Tue, 13 Jul 2010 03:35:43 +0000 (23:35 -0400)]
Eliminate compiler warning due to gettext string with no format args

14 years agodocs: fix so generated .html files are removed with make clean
Justin Clift [Sat, 10 Jul 2010 12:49:26 +0000 (22:49 +1000)]
docs: fix so generated .html files are removed with make clean

14 years agocpuCompare: Fix crash on unexpected CPU XML
Jiri Denemark [Mon, 12 Jul 2010 15:30:23 +0000 (17:30 +0200)]
cpuCompare: Fix crash on unexpected CPU XML

When comparing a CPU without <model> element, such as

    <cpu>
        <topology sockets='1' cores='1' threads='1'/>
    </cpu>

libvirt would happily crash without warning.

14 years agocpu: Fail when CPU type cannot be detected from XML
Jiri Denemark [Mon, 12 Jul 2010 14:08:00 +0000 (16:08 +0200)]
cpu: Fail when CPU type cannot be detected from XML

When autodetecting whether XML describes guest or host CPU, the presence
of <arch> element is checked. If it's present, we treat the XML as host
CPU definition. Which is right, since guest CPU definitions do not
contain <arch> element. However, if at the same time the root <cpu>
element contains `match' attribute, we would silently ignore it and
still treat the XML as host CPU. We should rather refuse such invalid
XML.

14 years agocpuCompare: Fix comparison of two host CPUs
Jiri Denemark [Mon, 12 Jul 2010 12:41:36 +0000 (14:41 +0200)]
cpuCompare: Fix comparison of two host CPUs

When a CPU to be compared with host CPU describes a host CPU instead of
a guest CPU, the result is incorrect. This is because instead of
treating additional features in host CPU description as required, they
were treated as if they were mentioned with all possible policies at the
same time.

14 years agoqemu: Use -nodefconfig when probing for CPU models
Jiri Denemark [Mon, 12 Jul 2010 07:58:43 +0000 (09:58 +0200)]
qemu: Use -nodefconfig when probing for CPU models

In case qemu supports -nodefconfig, libvirt adds uses it when launching
new guests. Since this option may affect CPU models supported by qemu,
we need to use it when probing for available models.

14 years agovirsh: Fix man page syntax
Jiri Denemark [Fri, 18 Jun 2010 16:17:59 +0000 (18:17 +0200)]
virsh: Fix man page syntax

pod2man prints the following warning when generating virsh.1:

    tools/virsh.pod:890: Unmatched =back

14 years agoFix potential crash in QEMU monitor JSON impl
Daniel P. Berrange [Mon, 12 Jul 2010 13:07:02 +0000 (14:07 +0100)]
Fix potential crash in QEMU monitor JSON impl

An indentation mistake meant that a check for return status
was not properly performed in all cases. This could result
in a crash on NULL pointer in a following line.

* src/qemu/qemu_monitor_json.c: Fix check for return status
  when processing JSON for blockstats

14 years agoFix build by removing unknown pod2man flag
Daniel P. Berrange [Mon, 12 Jul 2010 13:08:36 +0000 (14:08 +0100)]
Fix build by removing unknown pod2man flag

Some versions of pod2man do not support the -u flag, so this
can't be used

* daemon/Makefile.am: Remove -u flag from pod2man

14 years agoEnsure we return the callback ID in python events binding
Daniel P. Berrange [Thu, 8 Jul 2010 10:30:47 +0000 (11:30 +0100)]
Ensure we return the callback ID in python events binding

A missing return statement in the python binding meant that
the callers could not get the callback ID, and thus not be
able to unregister event callbacks

* python/libvirt-override-virConnect.py: Add missing return
  statement

14 years agohtml docs: added firewall explanation page by daniel berrange
Justin Clift [Sat, 10 Jul 2010 12:47:00 +0000 (22:47 +1000)]
html docs: added firewall explanation page by daniel berrange

14 years agolibvirtd: add man page for libvirtd
Justin Clift [Fri, 9 Jul 2010 09:21:39 +0000 (19:21 +1000)]
libvirtd: add man page for libvirtd

With gracious thanks to Chris Lalancette for helping knock the
description section into shape.

This addresses BZ #595350

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

14 years agovirsh: add new --details option to vol-list
Justin Clift [Mon, 5 Jul 2010 13:46:54 +0000 (23:46 +1000)]
virsh: add new --details option to vol-list

This patch adds a new --details option to the virsh vol-list
command, making its output more useful when many luns are
present.

Addresses BZ # 605543

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

14 years agoauthors: update my authors details
Justin Clift [Fri, 9 Jul 2010 09:35:39 +0000 (19:35 +1000)]
authors: update my authors details

14 years agoFix a compile error in the previous commit.
Chris Lalancette [Thu, 8 Jul 2010 12:49:01 +0000 (08:49 -0400)]
Fix a compile error in the previous commit.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
14 years agoImplement virsh managedsave-remove command.
Chris Lalancette [Tue, 22 Jun 2010 13:50:17 +0000 (09:50 -0400)]
Implement virsh managedsave-remove command.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
14 years agocpu: Add new models from qemu's target-x86_64.conf
Jiri Denemark [Fri, 2 Jul 2010 14:25:05 +0000 (16:25 +0200)]
cpu: Add new models from qemu's target-x86_64.conf

14 years agocpu: Add support for CPU vendor
Jiri Denemark [Fri, 2 Jul 2010 15:51:59 +0000 (17:51 +0200)]
cpu: Add support for CPU vendor

By specifying <vendor> element in CPU requirements a guest can be
restricted to run only on CPUs by a given vendor. Host CPU vendor is
also specified in capabilities XML.

The vendor is checked when migrating a guest but it's not forced, i.e.,
guests configured without <vendor> element can be freely migrated.

14 years agocpuBaseline: Detect empty set of common features
Jiri Denemark [Fri, 2 Jul 2010 15:51:40 +0000 (17:51 +0200)]
cpuBaseline: Detect empty set of common features

In case the set of CPUs has no features in common, report incompatible
CPUs instead of returning the simplest CPU model with all features
disabled.

14 years agocpuBaseline: Don't mess with the CPU returned by arch driver
Jiri Denemark [Fri, 2 Jul 2010 15:51:20 +0000 (17:51 +0200)]
cpuBaseline: Don't mess with the CPU returned by arch driver

All features in the baseline CPU definition were always created with
policy='require' even though an arch driver returned them with different
policy settings.

14 years agoMake html docs in non-srcdir build
Jiri Denemark [Fri, 2 Jul 2010 17:37:49 +0000 (19:37 +0200)]
Make html docs in non-srcdir build

14 years agoRelease of libvirt-0.8.2
Daniel Veillard [Mon, 5 Jul 2010 15:29:25 +0000 (17:29 +0200)]
Release of libvirt-0.8.2

- configure.ac docs/news.html.in libvirt.spec.in: updated
- po/*/o* : updated or.po and regenerated

14 years agovbox: Let configure detect/set the XPCOMC directory
Matthias Bolte [Tue, 29 Jun 2010 18:01:45 +0000 (20:01 +0200)]
vbox: Let configure detect/set the XPCOMC directory

This allows the user to give an explicit path to configure

  ./configure --with-vbox=/path/to/virtualbox

instead of having the VirtualBox driver probe a set of possible
paths at runtime. If no explicit path is specified then configure
probes the set of "known" paths.

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

14 years agoudev: Parse PCI devices even if libpciaccess fails
Cole Robinson [Wed, 30 Jun 2010 19:57:54 +0000 (15:57 -0400)]
udev: Parse PCI devices even if libpciaccess fails

We only use libpciaccess for resolving device product/vendor. If
initializing the library fails (say if using qemu:///session), don't
warn so loudly, and carry on as usual.

14 years agoqemu: Improve some qemu.conf error reporting
Cole Robinson [Wed, 30 Jun 2010 18:14:37 +0000 (14:14 -0400)]
qemu: Improve some qemu.conf error reporting

Log some info if we can't find a config file. Make parse failures
fatal, and actually raise an error message.

14 years agoutil: virExec: Dispatch all errors raised after fork
Cole Robinson [Wed, 30 Jun 2010 17:04:57 +0000 (13:04 -0400)]
util: virExec: Dispatch all errors raised after fork

Any error message raised after the process has forked needs
to be followed by virDispatchError, otherwise we have no chance of
ever seeing it. This was selectively done for hook functions in the past,
but really applies to all post-fork errors.

14 years agocgroup: Fix compilation broken on MinGW due to dirent->d_type
Ryota Ozaki [Wed, 30 Jun 2010 11:49:28 +0000 (20:49 +0900)]
cgroup: Fix compilation broken on MinGW due to dirent->d_type

As pointed out by Eric Blake, using dirent->d_type breaks
compilation on MinGW. This patch addresses this by using
'#if defined' as same as doing for virCgroupForDriver.

14 years agohtml docs: add link to PHP bindings by Radek Hladik
Justin Clift [Wed, 30 Jun 2010 13:53:41 +0000 (23:53 +1000)]
html docs: add link to PHP bindings by Radek Hladik

14 years agovirsh: tweak help output for VSH_OT_DATA
Eric Blake [Tue, 29 Jun 2010 22:14:57 +0000 (16:14 -0600)]
virsh: tweak help output for VSH_OT_DATA

https://bugzilla.redhat.com/show_bug.cgi?id=609044 complained
that 'virsh help pool-create-as' didn't document the shortcut
that you can do 'virsh pool-create-as $name $type --target $target'
rather than having to supply the four optional source- arguments
in order to fill out the necessary positional arguments.

This one-liner changes the help output to hopefully make this more obvious:

  NAME
    pool-create-as - create a pool from a set of args

  SYNOPSIS
    pool-create-as <name> [--print-xml] <type> [<source-host>] [<source-path>] [<source-dev>] [<source-name>] [<target>] [--source-format <string>]

  DESCRIPTION
    Create a pool.

  OPTIONS
    [--name] <string>  name of the pool
    --print-xml      print XML document, but don't define/create
    [--type] <string>  type of the pool
    [--source-host] <string>  source-host for underlying storage
    [--source-path] <string>  source path for underlying storage
    [--source-dev] <string>  source device for underlying storage
    [--source-name] <string>  source name for underlying storage
    [--target] <string>  target for underlying storage
    --source-format <string>  format for underlying storage

* tools/virsh.c (vshCmddefHelp): Make it more obvious that data
arguments may, but not must, be specified by option leaders.

14 years agoAvoid invoking the qemu monitor destroy callback if the constructor fails
Daniel P. Berrange [Tue, 29 Jun 2010 10:57:54 +0000 (11:57 +0100)]
Avoid invoking the qemu monitor destroy callback if the constructor fails

Some, but not all, codepaths in the qemuMonitorOpen() method
would trigger the destroy callback. The caller does not expect
this to be invoked if construction fails, only during normal
release of the monitor. This resulted in a possible double-unref
of the virDomainObjPtr, because the caller explicitly unrefs
the virDomainObjPtr  if qemuMonitorOpen() fails

* src/qemu/qemu_monitor.c: Don't invoke destroy callback from
  qemuMonitorOpen() failure paths

14 years agocgroup: Add missing errno == ENOENT check in virCgroupRemoveRecursively
Ryota Ozaki [Sat, 26 Jun 2010 17:21:28 +0000 (02:21 +0900)]
cgroup: Add missing errno == ENOENT check in virCgroupRemoveRecursively

ENOENT happens normally when a subsystem is enabled with any other
subsystems and the directory of the target group has already removed
in a prior loop. In that case, the function should just return without
leaving an error message.

NB this is the same behavior as before introducing virCgroupRemoveRecursively.

14 years agoFix crash when detaching devices from qemu domains.
Chris Lalancette [Mon, 14 Jun 2010 21:16:53 +0000 (17:16 -0400)]
Fix crash when detaching devices from qemu domains.

Make sure to *not* call qemuDomainPCIAddressReleaseAddr if
QEMUD_CMD_FLAG_DEVICE is *not* set (for older qemu).  This
prevents a crash when trying to do device detachment from
a qemu guest.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
14 years agoCheck for active PCI devices when doing nodedevice operations.
Chris Lalancette [Mon, 14 Jun 2010 21:12:35 +0000 (17:12 -0400)]
Check for active PCI devices when doing nodedevice operations.

In the current libvirt PCI code, there is no checking whether
a PCI device is in use by a guest when doing node device
detach or reattach.  This causes problems when a device is
assigned to a guest, and the administrator starts issuing
nodedevice commands.  Make it so that we check the list
of active devices when trying to detach/reattach, and only
allow the operation if the device is not assigned to a guest.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
14 years agovirsh: add new --details option to pool-list
Justin Clift [Mon, 28 Jun 2010 16:47:30 +0000 (02:47 +1000)]
virsh: add new --details option to pool-list

This patch adds a new --details option to the virsh pool-list
command, making its output more useful to people who use virsh
for significant lengths of time.

Addresses BZ # 605543

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

14 years agovirFileResolveLink: guarantee an absolute path
Eric Blake [Mon, 28 Jun 2010 21:06:36 +0000 (15:06 -0600)]
virFileResolveLink: guarantee an absolute path

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

* src/util/util.c (virFileResolveLink): Use
canonicalize_file_name, rather than areadlink.

14 years agophyp: don't steal storage management from other drivers
Eric Blake [Mon, 28 Jun 2010 17:33:05 +0000 (11:33 -0600)]
phyp: don't steal storage management from other drivers

Fix regression introduced in commit a4a287242 - basically, the
phyp storage driver should only accept the same URIs that the
main phyp driver is willing to accept.  Blindly accepting all
URIs meant that the phyp storage driver was being consulted for
'virsh -c qemu:///session pool-list --all', rather than the
qemu storage driver, then since the URI was not for phyp, attempts
to then use the phyp driver crashed because it was not initialized.

* src/phyp/phyp_driver.c (phypStorageOpen): Only accept connections
already open to a phyp driver.

14 years agoAvoid calling virStorageFileIsSharedFS with NULL
Laine Stump [Tue, 29 Jun 2010 03:50:15 +0000 (23:50 -0400)]
Avoid calling virStorageFileIsSharedFS with NULL

This code was just recently added (by me) and didn't account for the
fact that stdin_path is sometimes NULL. If it's NULL, and
SetSecurityAllLabel fails, a segfault would result.

14 years agolxc: Fix virsh console doesn't work after restarting libvirtd
Ryota Ozaki [Sun, 27 Jun 2010 13:07:00 +0000 (22:07 +0900)]
lxc: Fix virsh console doesn't work after restarting libvirtd

Because tty path is unexpectedly not saved in the live configuration
file of a domain, libvirtd cannot get the console of the domain back
after restarting.

The reason why the tty path isn't saved is that, to save the tty path,
the save function, virDomainSaveConfig, requires that the target domain
is running (pid != -1), however, lxc driver calls the function before
starting the domain to pass the configuration to controller.

To ensure to save the tty path, the patch lets lxc driver call the save
function again after starting the domain.

14 years agolxc: Fix error handlings in lxcContainerRenameAndEnableInterfaces
Ryota Ozaki [Sat, 26 Jun 2010 20:59:59 +0000 (05:59 +0900)]
lxc: Fix error handlings in lxcContainerRenameAndEnableInterfaces

The function is expected to return negative value on failure,
however, it returns positive value when either setInterfaceName
or vethInterfaceUpOrDown fails. Because the function returns
the return value of either as is, however, the two functions
may return positive value on failure.

The patch fixes the defects and add error messages.

14 years agolxc: Change VIR_ERROR to VIR_DEBUG for just a debugging message
Ryota Ozaki [Sat, 26 Jun 2010 18:39:41 +0000 (03:39 +0900)]
lxc: Change VIR_ERROR to VIR_DEBUG for just a debugging message

The message is actually not of error but of debugging.
02:22:56.091: error : lxcControllerMain:316 : monitor=3 client=4 appPty=19 contPty=7

14 years agoSelectively ignore domainSetSecurityAllLabel failure in domain restore
Laine Stump [Fri, 25 Jun 2010 00:59:24 +0000 (20:59 -0400)]
Selectively ignore domainSetSecurityAllLabel failure in domain restore

When the saved domain image is on an NFS share, at least some part of
domainSetSecurityAllLabel will fail (for example, selinux labels can't
be modified). To allow domain restore to still work in this case, just
ignore the errors.

14 years agouse virStorageFileIsSharedFS utility function in qemudDomainSaveFlag
Laine Stump [Fri, 25 Jun 2010 00:56:45 +0000 (20:56 -0400)]
use virStorageFileIsSharedFS utility function in qemudDomainSaveFlag

Previously, this function had it's own bit of code performing the same
function. Since there's now an equivalent utility function, let's use it.

14 years agoEnhance virStorageFileIsSharedFS
Laine Stump [Fri, 25 Jun 2010 16:18:57 +0000 (12:18 -0400)]
Enhance virStorageFileIsSharedFS

virStorageFileIsSharedFS would previously only work if the entire path
in question was stat'able by the uid of the libvirtd process. This
patch changes it to crawl backwards up the path retrying the statfs
call until it gets to a partial path that *can* be stat'ed.

This is necessary to use the function to learn the fstype for files
stored as a different user (and readable only by that user) on a
root-squashed remote filesystem.

14 years agoSet proper selinux label on image file during qemu domain restore
Laine Stump [Thu, 24 Jun 2010 21:58:59 +0000 (17:58 -0400)]
Set proper selinux label on image file during qemu domain restore

Also restore the label to its original value after qemu is finished
with the file.

Prior to this patch, qemu domain restore did not function properly if
selinux was set to enforce.

14 years agobuild: fix regression with libvirt-api.xml generation
Eric Blake [Fri, 25 Jun 2010 22:27:07 +0000 (16:27 -0600)]
build: fix regression with libvirt-api.xml generation

(EXTRA_DIST): Remove redundant listing of xml files.
(html/%-%.html, html/%-virterror.html, %-api.xml, %-refs.xml):
Rewrite with...
(python_generated_files): ...new macro, since make didn't see
through the dependency chain correctly otherwise.

14 years agoFix a reference leak for node devices.
Chris Lalancette [Fri, 25 Jun 2010 21:22:11 +0000 (17:22 -0400)]
Fix a reference leak for node devices.

There were some major, and some minor bugs having to do with
the reference counting of node devices in daemon/remote.c.

Some functions were completely failing to unreference node devices;
this would lead to many open file descriptors, which would eventually
fail.

The minor bugs were along the same lines, but were in rarely
used error paths.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Matthias Bolte <matthias.bolte@googlemail.com>
14 years agoDon't squash file permissions when migration fails
Daniel P. Berrange [Fri, 25 Jun 2010 13:04:57 +0000 (09:04 -0400)]
Don't squash file permissions when migration fails

If an active migration operation fails, or is cancelled by the
admin, the QEMU on the destination is shutdown and the one on
the source continues running. It is important in shutting down
the QEMU on the destination, the security drivers don't reset
the file labelling/permissions.

* src/qemu/qemu_driver.c: Don't reset labelling/permissions
  on migration abort

14 years agophyp: optimize use of sed
Eric Blake [Thu, 24 Jun 2010 22:25:56 +0000 (16:25 -0600)]
phyp: optimize use of sed

Minor speedups by using the full power of sed.

* src/phyp/phyp_driver.c (phypGetVIOSFreeSCSIAdapter)
(phypDiskType, phypListDefinedDomains): Use fewer processes, by
folding other work into sed.
(phypGetVIOSPartitionID): Likewise.  Also avoid non-portable use
of 'sed -s'.

14 years agophyp: add storage management driver
Eduardo Otubo [Thu, 24 Jun 2010 21:15:43 +0000 (15:15 -0600)]
phyp: add storage management driver

Add the storage management driver to the Power Hypervisor driver.
This is a big but simple patch, it's just a new set of functions.

This patch includes:
 * Storage driver: The set of pool-* and vol-* functions.
 * attach-disk function.
 * Support for IVM on the new functions.

Signed-off-by: Eric Blake <eblake@redhat.com>
14 years agophyp: add rudimentary storage driver
Eduardo Otubo [Thu, 24 Jun 2010 21:39:27 +0000 (15:39 -0600)]
phyp: add rudimentary storage driver

* src/phyp/phyp_driver.c (phypStorageDriver): New driver.
(phypStorageOpen, phypStorageClose): New functions.
(phypRegister): Register it.

Signed-off-by: Eric Blake <eblake@redhat.com>
14 years agophyp: reduce scope of driver functions
Eric Blake [Thu, 24 Jun 2010 21:05:16 +0000 (15:05 -0600)]
phyp: reduce scope of driver functions

Several phyp functions are not namespace clean, and had no reason
to be exported since no one outside the phyp driver needed to use
them.  Rather than do lots of forward declarations, I was able
to topologically sort the file.  So, this patch looks huge, but
is really just a matter of marking things static and dealing with
the compiler fallout.

* src/phyp/phyp_driver.h (PHYP_DRIVER_H): Add include guard.
(phypCheckSPFreeSapce): Delete unused declaration.
(phypGetSystemType, phypGetVIOSPartitionID, phypCapsInit)
(phypBuildLpar, phypUUIDTable_WriteFile, phypUUIDTable_ReadFile)
(phypUUIDTable_AddLpar, phypUUIDTable_RemLpar, phypUUIDTable_Pull)
(phypUUIDTable_Push, phypUUIDTable_Init, phypUUIDTable_Free)
(escape_specialcharacters, waitsocket, phypGetLparUUID)
(phypGetLparMem, phypGetLparCPU, phypGetLparCPUGeneric)
(phypGetRemoteSlot, phypGetBackingDevice, phypDiskType)
(openSSHSession): Move declarations to phyp_driver.c and make static.
* src/phyp/phyp_driver.c: Rearrange file contents to provide
topological sorting of newly-static funtions (no semantic changes
other than reduced scope).
(phypGetBackingDevice, phypDiskType): Mark unused, for now.

14 years agomaint: add gnulib gettimeofday module
Eric Blake [Thu, 24 Jun 2010 20:15:55 +0000 (14:15 -0600)]
maint: add gnulib gettimeofday module

* bootstrap.conf (gnulib_modules): Add gettimeofday.

14 years agoFix test case failure due to missing -nodefconfig
Daniel P. Berrange [Fri, 25 Jun 2010 13:35:24 +0000 (14:35 +0100)]
Fix test case failure due to missing -nodefconfig

The previous change which split -nodefconfig probing off
from -device broke the test case because it missed adding
the QEMUD_CMD_FLAG_NODEFCONFIG to the test

* src/util/bridge.c: Set QEMUD_CMD_FLAG_NODEFCONFIG for all
  configs with QEMUD_CMD_FLAG_DEVICE set

14 years agoFix migration in text mode and shared storage migration in json mode
Daniel P. Berrange [Thu, 24 Jun 2010 18:58:36 +0000 (14:58 -0400)]
Fix migration in text mode and shared storage migration in json mode

The patches for shared storage migration were not correctly written
for json mode. Thus the 'blk' and 'inc' parameters were never being
set. In addition they didn't set the QEMU_MONITOR_MIGRATE_BACKGROUND
so migration was synchronous. Due to multiple bugs in QEMU's JSON
impl this wasn't noticed because it treated the sync migration requst
as asynchronous anyway. Finally 'background' parameter was converted
to take arbitrary flags but not renamed, and not all uses were changed
to unsigned int.

* src/qemu/qemu_driver.c: Set QEMU_MONITOR_MIGRATE_BACKGROUND in
  doNativeMigrate
* src/qemu/qemu_monitor_json.c: Process QEMU_MONITOR_MIGRATE_NON_SHARED_DISK
  and QEMU_MONITOR_MIGRATE_NON_SHARED_INC flags
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
  src/qemu/qemu_monitor_json.h, src/qemu/qemu_monitor_text.c,
  src/qemu/qemu_monitor_text.h: change 'int background' to
  'unsigned int flags' in migration APIs. Add logging of flags
  parameter

14 years agoAvoid blocking all APIs during incoming migration
Daniel P. Berrange [Thu, 24 Jun 2010 18:15:27 +0000 (19:15 +0100)]
Avoid blocking all APIs during incoming migration

During incoming migration the QEMU monitor is not able to be
used. The incoming migration code did not keep hold of the
job lock because migration is split across multiple API calls.
This meant that further monitor commands on the guest would
hang until migration finished with no timeout.

In this change the qemuDomainMigratePrepare method sets the
job flag just before it returns. The qemuDomainMigrateFinish
method checks for this job flag & clears it once done. This
prevents any use of the monitor between prepare+finish steps.

The qemuDomainGetJobInfo method is also updated to refresh
the job elapsed time. This means that virsh domjobinfo can
return time data during incoming migration

* src/qemu/qemu_driver.c: Keep a job active during incoming
  migration. Refresh job elapsed time when returning job info

14 years agoSet labelling for character devices in security drivers
Daniel P. Berrange [Wed, 23 Jun 2010 15:17:15 +0000 (16:17 +0100)]
Set labelling for character devices in security drivers

When configuring serial, parallel, console or channel devices
with a file, dev or pipe backend type, it is necessary to label
the file path in the security drivers. For char devices of type
file, it is neccessary to pre-create (touch) the file if it does
not already exist since QEMU won't be allowed todo so itself.
dev/pipe configs already require the admin to pre-create before
starting the guest.

* src/qemu/qemu_security_dac.c: set file ownership for character
  devices
* src/security/security_selinux.c: Set file labeling for character
  devices
* src/qemu/qemu_driver.c: Add character devices to cgroup ACL

14 years agoAdd API for iterating over all character devices
Daniel P. Berrange [Thu, 24 Jun 2010 14:06:43 +0000 (15:06 +0100)]
Add API for iterating over all character devices

The parallel, serial, console and channel devices are all just
character devices. A lot of code needs todo the same thing to
all these devices. This provides an convenient API for iterating
over all of them.

* src/conf/domain_conf.c, src/conf/domain_conf.c,
  src/libvirt_private.syms: Add virDomainChrDefForeach

14 years agoAdd missing parameter in python Disk IO error callback
Daniel P. Berrange [Wed, 23 Jun 2010 14:05:52 +0000 (15:05 +0100)]
Add missing parameter in python Disk IO error callback

The IO error callback was forgetting to pass the action
parameter, causing a stack trace when IO errors arrive

* python/libvirt-override-virConnect.py: Add missing action
  parameter in IO error callback

14 years agoCheck for presence of qemu -nodefconfig option before using it
Laine Stump [Thu, 24 Jun 2010 18:49:51 +0000 (14:49 -0400)]
Check for presence of qemu -nodefconfig option before using it

We previously assumed that if the -device option existed in qemu, that
-nodefconfig would also exist. It turns out that isn't the case, as
demonstrated by qemu-kvm-0.12.3 in Fedora 13.

*/src/qemu/qemu_conf.[hc] - add a new QEMUD_CMD_FLAG, set it via the
                            help output, and check it before adding
                            -nodefconfig to the qemu commandline.

14 years agoAdding Storage Management driver (style and indentation)
Eduardo Otubo [Wed, 23 Jun 2010 22:49:19 +0000 (19:49 -0300)]
Adding Storage Management driver (style and indentation)

This is just the indentation, style  and cleanup patch.

14 years agoesx: Use bool instead of int where appropriated
Matthias Bolte [Fri, 18 Jun 2010 16:16:22 +0000 (18:16 +0200)]
esx: Use bool instead of int where appropriated

14 years agoesx: Add support for the controller element
Matthias Bolte [Thu, 17 Jun 2010 17:57:12 +0000 (19:57 +0200)]
esx: Add support for the controller element

Also don't abuse the disk driver name to specify the SCSI controller
model anymore:

  <driver name='buslogic'/>

Use the newly added model attribute of the controller element for this:

  <controller type='scsi' index='0' model='buslogic'/>

The disk driver name approach is deprecated now, but still works for
backward compatibility reasons.

Update the documentation and tests accordingly.

Fix usage of the words controller and id in the VMX handling code. Use
controller, bus and unit properly.

14 years agoAdd optional model attribute to the controller element
Matthias Bolte [Thu, 17 Jun 2010 14:39:50 +0000 (16:39 +0200)]
Add optional model attribute to the controller element

This is a step towards controller support for the ESX driver.

14 years agoAdd wide SCSI bus disk address generation support
Matthias Bolte [Tue, 15 Jun 2010 22:17:34 +0000 (00:17 +0200)]
Add wide SCSI bus disk address generation support

The domain XML parsing code autogenerates disk address and
controller elements when they are not explicitly specified.
The code assumes a narrow SCSI bus (7 units per bus). ESX
uses a wide SCSI bus (16 units per bus).

This is a step towards controller support for the ESX driver.