Commit Graph

211 Commits

Author SHA1 Message Date
Osier Yang
d41d252694 Update AUTHORS
Commit a80bb970 forgot to update authors.
2012-06-11 22:08:09 +08:00
Beat Jörg
7508338ff3 Fix for parallel port passthrough for QEMU
I came across a bug that the command line generated for passthrough
of the host parallel port /dev/parport0 by libvirt for QEMU is incorrect.

It currently produces:
-chardev tty,id=charparallel0,path=/dev/parport0
-device isa-parallel,chardev=charparallel0,id=parallel0

The first parameter is "tty". It sould be "parport".

If I launch qemu with -chardev parport,... it works as expected.

I have already filled a bug report (
https://bugzilla.redhat.com/show_bug.cgi?id=823879 ), the topic was
already on the list some months ago:

https://www.redhat.com/archives/libvirt-users/2011-September/msg00095.html

Signed-off-by: Eric Blake <eblake@redhat.com>
2012-06-04 16:46:23 -06:00
Radu Caragea
107f51b69c Fix sync issue in virNetClientStreamEventRemoveCallback
The stream lock is unlocked twice instead of being locked and then
unlocked. Probably a typo.
2012-06-04 09:32:37 +02:00
Marti Raudsepp
195fa214b6 qemu: move -name arg to be 1st in "ps x" output
Currently, monitoring QEMU virtual machines with standard Unix
sysadmin tools is harder than it has to be. The QEMU command line is
often miles long and mostly redundant, it's hard to tell which process
is which.

This patch reorders the QEMU -name argument to be the first, so it's
immediately visible in "ps x", htop and "atop -c" output.
2012-06-01 15:06:56 -06:00
David Weber
b8012ce931 sanlock: fix locking for readonly devices
Add ignore param for readonly and shared disk in sanlock
2012-05-14 16:44:09 -06:00
Eric Blake
aaf36b15a6 maint: fix AUTHORS
Use the address specified in the actual commit, to placate
'make syntax-check'.
2012-05-14 09:14:19 -06:00
William Jon McCann
32a9aac2e0 Use XDG Base Directories instead of storing in home directory
As defined in:
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

This offers a number of advantages:
 * Allows sharing a home directory between different machines, or
sessions (eg. using NFS)
 * Cleanly separates cache, runtime (eg. sockets), or app data from
user settings
 * Supports performing smart or selective migration of settings
between different OS versions
 * Supports reseting settings without breaking things
 * Makes it possible to clear cache data to make room when the disk
is filling up
 * Allows us to write a robust and efficient backup solution
 * Allows an admin flexibility to change where data and settings are stored
 * Dramatically reduces the complexity and incoherence of the
system for administrators
2012-05-14 15:15:58 +01:00
Dmitry Guryanov
287737f413 util: add functions for interating over json object
Add function virJSONValueObjectKeysNumber, virJSONValueObjectGetKey
and virJSONValueObjectGetValue, which allow you to iterate over all
fields of json object: you can get number of fields and then get
name and value, stored in field with that name by index.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
2012-05-03 09:07:25 -06:00
Eugen Feller
93b21be929 Added Snooze cloud manager to the IaaS section 2012-05-02 12:20:38 -06:00
Wido den Hollander
122fa379de storage: Allow multiple hosts for a storage pool
The current storage pools for NFS and iSCSI only require one host to
connect to. Future storage pools like RBD and Sheepdog will require
multiple hosts.

This patch allows multiple source hosts and rewrites the current
storage drivers.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2012-04-30 18:44:44 +08:00
Ryan Woodsmall
b126715a48 esx: Fix segfault in esxConnectToHost
Caused by commit 4445e16bfa that
made the code used the connection private data pointer before
it was initialized.
2012-04-21 14:13:22 +02:00
Jan Kiszka
dde91ab917 Do not enforce source type of console[0]
If console[0] is an alias for serial[0], do not enforce the former to
have a PTY source type. This breaks serial consoles on stdio and makes
no sense.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2012-04-16 22:24:20 -06:00
Daniel Veillard
360a88c317 Set Martin Kletzander as a commiter 2012-04-16 16:57:06 +08:00
MATSUDA, Daiki
257191c9e4 UML: fix iteration over consoles
I found typo in UML driver.

MATSUDA Daiki
2012-04-09 10:21:07 -06:00
Stefan Bader
fb98da0050 xen config: No vfb in HVM guest configuration
This causes an implicit vkbd device to be added which takes
6min to finally fail being initialized in the guest.

http://lists.xen.org/archives/html/xen-devel/2012-04/msg00409.html

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
2012-04-06 12:54:16 +08:00
Ilja Livenson
37075dfe6c openvz: support vzctl 3.1
https://bugzilla.redhat.com/show_bug.cgi?id=809895

Basically, openvz dropped strict version numbering (3.1 vs 3.1.0),
which caused parsing to fail.
2012-04-04 14:32:15 -06:00
Christian Benvenuti
a02500d010 qemu: Make migration fail when port profile association fails on the dst host
In the current V3 migration protocol, Libvirt does not
check the result of the function

  qemuMigrationVPAssociatePortProfiles

This means that it is possible for a migration to complete
successfully even when the VM loses network connectivity on
the destination host.

With this change libvirt aborts the migration
(during the "finish" step) when the above function fails, that
is to say when at least one of the port profile associations fails.

Signed-off by: Christian Benvenuti <benve@cisco.com>
2012-03-28 10:45:22 -06:00
Stef Walter
53e1d56dd4 Change the default of mdns_adv to false
* Don't advertise information on the network without consent of
   the user, either through manual configuration, or a user
   interface that drives this option.
 * Since libvirtd must be configured for network access anyway
   (for all but ssh), this setting was not useful "out of the box",
   so changing this default setting does not remove "out of the box"
   functionality.
2012-03-27 09:54:49 -06:00
Li Zhang
8120325750 Add qemu support for ppc64 on FC16 or above for rpm packaging
On Fedora16 or above, qemu is supported now. So it is added
in rpm packaging.

Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com>
2012-03-23 12:40:13 -04:00
Peng Zhou
896e6ac4f8 qemu: spice agent-mouse support
spice agent-mouse support

Usage:
  <graphics type='spice'>
    <mouse mode='client'|'server'/>
  <graphics/>

Signed-off-by: Osier Yang <jyang@redhat.com>
2012-03-09 15:26:24 +08:00
Duncan Rance
e91c8b1805 Build error on OSX in src/util/virnetlink.c
I'm building on OSX with no libnl. I had to do this to get src/util/virnetlink.c to compile:
2012-03-06 09:25:38 -07:00
Benjamin Cama
cff5573da2 virterror: Misleading error message when name is missing
[forwarding this here from RH bug #796732]

When creating a network (virsh net-create) with an erroneous XML
containing an empty <name> element, the error message is misleading:

error: Failed to create network from foo.xml
error: missing domain name information

It took me a bit of time to figure out that it was the *network* name
that was missing (I generate this xml and didn't look at it, first).

I realized that the same message is used for missing name when creating
a domain, network, or device node.
2012-02-23 16:31:45 -07:00
Peter Robinson
cb8b9963fe spec: use ix86 macros
* libvirt.spec.in: Use %{ix86} rather than open-coded list.
2012-02-20 09:37:52 -07:00
Lincoln Myers
102690648d Fix compilation on MacOS X
* src/util/virfile.h: the virFileWrapperFdFlags being defined as
  a globa variable instead of a type ended up generating a duplicate
  symbol error.
* AUTHORS: added Lincoln Myers
2012-02-20 11:21:00 +08:00
Ansis Atteka
df81004632 network: support Open vSwitch
This patch allows libvirt to add interfaces to already
existing Open vSwitch bridges. The following syntax in
domain XML file can be used:

    <interface type='bridge'>
      <mac address='52:54:00:d0:3f:f2'/>
      <source bridge='ovsbr'/>
      <virtualport type='openvswitch'>
        <parameters interfaceid='921a80cd-e6de-5a2e-db9c-ab27f15a6e1d'/>
      </virtualport>
      <address type='pci' domain='0x0000' bus='0x00'
                          slot='0x03' function='0x0'/>
    </interface>

or if libvirt should auto-generate the interfaceid use
following syntax:

    <interface type='bridge'>
      <mac address='52:54:00:d0:3f:f2'/>
      <source bridge='ovsbr'/>
      <virtualport type='openvswitch'>
      </virtualport>
      <address type='pci' domain='0x0000' bus='0x00'
                          slot='0x03' function='0x0'/>
    </interface>

It is also possible to pass an optional profileid. To do that
use following syntax:

   <interface type='bridge'>
     <source bridge='ovsbr'/>
     <mac address='00:55:1a:65:a2:8d'/>
     <virtualport type='openvswitch'>
       <parameters interfaceid='921a80cd-e6de-5a2e-db9c-ab27f15a6e1d'
                   profileid='test-profile'/>
     </virtualport>
   </interface>

To create Open vSwitch bridge install Open vSwitch and
run the following command:

    ovs-vsctl add-br ovsbr
2012-02-15 16:04:54 -05:00
Alex Jia
7b448cae4a Update myself in AUTHORS
Move myself from 'Previous maintainers' section to 'the primary maintainers and
people with commit access rights' section, because I have a commit rights now.

Signed-off-by: Alex Jia <ajia@redhat.com>
2012-02-06 23:39:18 +08:00
Eric Blake
9a3fc7f3f7 maint: prune duplicate listings in AUTHORS
* AUTHORS: Remove duplicates.
* .mailmap: Update accordingly.
2012-02-03 09:56:45 -07:00
Hendrik Schwartke
484a0bab39 qemu: Fix segfault in qemuMonitorTextGetBlockInfo
If some error occurs then the cleanup code calls VIR_FREE(info)
without ensuring that info is initialized.
2012-01-30 13:48:34 +01:00
Marcelo Cerri
98b01e8f2b Update VIRT_CONTROL audit record with pid.
Added a new field "vm-pid" to the VIRT_CONTROL audit record. This information
is useful to correlated another audit events to the events generated by
libvirt.
2012-01-26 16:49:02 -07:00
Zeeshan Ali (Khattak)
fa981fc945 Allow custom metadata in domain configuration XML
Applications can now insert custom nodes and hierarchies into domain
configuration XML. Although currently not enforced, applications are
required to use their own namespaces on every custom node they insert,
with only one top-level element per namespace.
2012-01-24 17:06:34 -07:00
Laszlo Ersek
d19149dda8 virCommandProcessIO(): make poll() usage more robust
POLLIN and POLLHUP are not mutually exclusive. Currently the following
seems possible: the child writes 3K to its stdout or stderr pipe, and
immediately closes it. We get POLLIN|POLLHUP (I'm not sure that's possible
on Linux, but SUSv4 seems to allow it). We read 1K and throw away the
rest.

When poll() returns and we're about to check the /revents/ member in a
given array element, let's map all the revents bits to two (independent)
ideas: "let's attempt to read()", and "let's attempt to write()". This
should cover all errors, EOFs, and normal conditions; the read()/write()
call should report any pending error.

Under this approach, both POLLHUP and POLLERR are mapped to "needs read()"
if we're otherwise prepared for POLLIN. POLLERR also maps to "needs
write()" if we're otherwise prepared for POLLOUT. The rest of the mappings
(POLLPRI etc.) would be easy, but probably useless for pipes.

Additionally, SUSv4 doesn't appear to forbid POLLIN|POLLERR (or
POLLOUT|POLLERR) set simultaneously. One could argue that the read() or
write() call would return without blocking in these cases (with an error),
so POLLIN / POLLOUT would be justified beside POLLERR.

The code now penalizes POLLIN|POLLERR differently from plain POLLERR. The
former (ie. read() returning -1) is terminal and we jump to cleanup, while
plain POLLERR masks only the affected file descriptor for the future.
Let's unify those.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2012-01-24 13:50:45 -07:00
Martin Kletzander
b54de0830a Added check for maximum number of vcpus exceeding topology limit
Earlier, when the number of vcpus was greater than the topology allowed,
libvirt didn't raise an error and continued, resulting in running qemu
with parameters making no sense. Even though qemu did not report any
error itself, the number of vcpus was set to maximum allowed by the
topology.
2012-01-12 16:02:08 -07:00
Deepak C Shetty
99fbb3866c Do not generate security_model when fs driver is anything but 'path'
QEMU does not support security_model for anything but 'path' fs driver type.
Currently in libvirt, when security_model ( accessmode attribute) is not
specified it auto-generates it irrespective of the fs driver type, which
can result in a qemu error for drivers other than path. This patch ensures
that the qemu cmdline is correctly generated by taking into account the
fs driver type.

Signed-off-by: Deepak C Shetty <deepakcs@linux.vnet.ibm.com>
2012-01-11 13:48:52 -07:00
Yuri Chornoivan
524ba58bb9 Fix typos in messages.
https://bugzilla.redhat.com/show_bug.cgi?id=770954
2012-01-03 20:30:33 -07:00
Osier Yang
dcaeb74a31 Maint: Update AUTHORs
Add Rommer in.
2011-12-12 21:58:52 +08:00
Michael Ellerman
e1636f47ae qemu: Use spapr-vscsi on pseries machine type
On the PPC64 pseries machine type we need to use the spapr-vscsi device
rather than an lsi.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
2011-12-09 13:03:33 -07:00
Christophe Fergeau
dbe5eb2d3a maint: move my name to commiters
Since I have commit rights on libvirt-glib, I can also push to
libvirt, Eric Blake told to move my name up to committers to better
reflect reality.
2011-12-08 11:20:51 +01:00
Prerna Saxena
f9bb67ec6a Add PPC cpu driver.
To add support for running libvirt on PowerPC, a CPU driver for the
PowerPC platform must be added.
Most generic cpu driver routines such as CPU compare, decode, etc
are based on CPUID comparison and are not relevant for non-x86
platforms.
Here, we introduce stubs for relevant PowerPC routines invoked by libvirt.

Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
Signed-off-by: Anton Blanchard <anton@au.ibm.com>
2011-11-30 12:38:17 -07:00
Christian Franke
d360795d60 virnetsocket: pass XAUTORITY for ssh connection
When spawning an ssh connection, the environment variables
DISPLAY, SSH_ASKPASS, ... are passed. However XAUTHORITY,
which is necessary if the .Xauthority is in a non default
place, was not passed.

Signed-off-by: Christian Franke <nobody@nowhere.ws>
2011-11-28 09:30:49 -07:00
Lorin Hochstein
8078a90a24 conf: make virt-xml-validate work with vbox domains
virt-xml-validate fails when run on a domain XML file of type 'vbox'.

For failing test case, see https://bugzilla.redhat.com/show_bug.cgi?id=757097

This patch updates the XML schema to accept all valid hypervisor
types, as well as dropping hypervisor types that are not in use
by the current code base.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-11-28 09:16:07 -07:00
Osier Yang
c6ba523961 build: Update AUTHORS
Add Chang Liu to the AUTHORS' list.
2011-11-22 15:35:13 +08:00
Srivatsa S. Bhat
e352b16400 Export KVM Host Power Management capabilities
This patch exports KVM Host Power Management capabilities as XML so that
higher-level systems management software can make use of these features
available in the host.

The script "pm-is-supported" (from pm-utils package) is run to discover if
Suspend-to-RAM (S3) or Suspend-to-Disk (S4) is supported by the host.
If either of them are supported, then a new tag "<power_management>" is
introduced in the XML under the <host> tag.

However in case the query to check for power management features succeeded,
but the host does not support any such feature, then the XML will contain
an empty <power_management/> tag. In the event that the PM query itself
failed, the XML will not contain any "power_management" tag.

To use this, new APIs could be implemented in libvirt to exploit power
management features such as S3/S4.
2011-11-22 11:31:22 +08:00
Bharata B Rao
5f7b71b413 XML definitions for guest NUMA and parsing routines
This patch adds XML definitions for guest NUMA specification and contains
routines to parse the same. The guest NUMA specification looks like this:

<cpu>
        ...
        <topology sockets='2' cores='4' threads='2'/>
        <numa>
                <cell cpus='0-7' memory='512000'/>
                <cell cpus='8-15' memory='512000'/>
        </numa>
        ...
</cpu>

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
2011-11-17 13:34:42 -07:00
Stefan Berger
b1451b6c07 maint: Add Michael Wood as an author
Add Michael Wood <esiotrot@gmail.com> as an author.
2011-11-14 15:28:40 -05:00
Eli Qiao
329b2b2819 util: fix compile error on debian
Add virnetdev.h,virnetdevbridge.h,virnetdevtap.h to private symbols,
since debian linker no longer allows transitive link resolution

Signed-off-by: Eli Qiao <taget@linux.vnet.ibm.com>
2011-11-11 17:04:33 -07:00
Eric Blake
613f9ea8f7 maint: use mailmap, not AUTHORS, for secondary addresses
* AUTHORS: Move Stefan's second entry...
* .mailmap: ...here.
2011-11-11 08:56:19 -07:00
Stefan Berger
fde59b4059 maint: fix make syntax-check
Add my 2nd email to the list of AUTHORS to get 'make syntax-check'
to pass.
2011-11-10 11:34:53 -05:00
Patrice LACHANCE
5759a5ccb5 esx: Support vSphere 5.x
And virtual hardware version 8.
2011-11-01 18:00:34 +01:00
Wen Ruo Lv
8bec4ff2f1 Fix URI alias prefix matching
with /etc/libvirt/libvirt.conf below:
uri_aliases = [
  "hail=qemu:///system",
  "sleet=qemu+ssh://root 9 115 122 57/system",
  "sam=qemu+unix:///system?socket=/var/run/libvirt/libvirt-sock",
]
Neither "virsh -c hailly" nor "hai" should result in matching "hail=qemu:///system"

Fix URI alias prefix matching when connecting

Signed-off-by: Wen Ruo Lv <lvroyce@linux.vnet.ibm.com>
2011-11-01 10:47:35 -06:00
Josh Durgin
5bd6271f59 storage: add auth to virDomainDiskDef
Add additional fields to let you specify the how to authenticate with a disk.
The secret to use may be referenced by a usage string or a UUID, i.e.:

<auth username='myuser'>
 <secret type='ceph' usage='secretname'/>
</auth>

or

<auth username='myuser'>
 <secret type='ceph' uuid='0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f'/>
</auth>

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-10-28 12:51:22 -06:00