Commit Graph

136 Commits

Author SHA1 Message Date
David S. Wang
93d6fd1d09 documenting the 802.1Qbh parameters of a 'direct' interface
This patch adds documentation about the 802.1Qbh related parameters
of the virtualport element for 'direct' interfaces.

Signed-off-by: David S. Wang <dwang2@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
2011-06-23 11:05:24 -06:00
Daniel Gollub
c4bd6d96f4 support for Xen HVM Viridian (Hyper-V) enlightenment interface
Introduce libvirt support for Xen HVM Viridian (Hyper-V) enlightenment
interface guest feature.

 src/conf/domain_conf.c     |    3 ++-
 src/conf/domain_conf.h     |    1 +
 src/xen/xen_hypervisor.c   |   11 +++++++++++
 src/xenapi/xenapi_driver.c |    2 ++
 src/xenapi/xenapi_utils.c  |    2 ++
 src/xenxs/xen_sxpr.c       |    4 ++++
 src/xenxs/xen_xm.c         |   12 +++++++++++-
 7 files changed, 33 insertions(+), 2 deletions(-)
2011-06-15 08:02:47 -06:00
Michael Chapman
30697181dc Fix autostart flag when loading running domains
Drivers load running persistent and transient domain configs before
inactive persistent domain configs, however only the latter would set a
domain's autostart flag. This mismatch between the loaded and on-disk
state could later cause problems with "virsh autostart":

  # virsh autostart example
  error: Failed to mark domain example as autostarted
  error: Failed to create symlink '/etc/libvirt/qemu/autostart/example.xml to '/etc/libvirt/qemu/example.xml': File exists

This patch ensures the autostart flag is set correctly even when the
domain is already defined.

Fixes:

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

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
2011-06-14 14:21:23 -06:00
Ohad Levy
a2d401d3ba docs: updated list of applications using libvirt.
Added:
* Virt ruby bindings
* Foreman for provisioning and webui.
2011-06-14 11:03:56 -06:00
Neil Wilson
5b8d2e6d92 Correct 'cputune' documentation example.
Signed-off-by: Neil Wilson <neil@aldur.co.uk>
2011-06-03 08:40:51 -06:00
Heath Petersen
39b59dbdb4 uml: correct command line networking parameters
I have been finding that some UML command line networking parameters are
being generated incorrectly.

For more information, see
https://bugzilla.redhat.com/show_bug.cgi?id=706295 .
2011-06-02 13:52:26 -06:00
Taisuke Yamada
3aab7f2d6b openvz: Fix regression in config file parsing
As reported by Diego Blanco in

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

commit f0443765 which replaced openvz_readline to getline(3)
broke OpenVZ driver as it changed semantics of EOF-handling
when parsing OpenVZ configuration.

There're several other issues reported with current OpenVZ driver:

 #1: unclear error message when parsing "CPUS=" line
 #2: openvz driver goes into crashing loop
 #3: "NETIF=" line in configuration is not parsed correctly
 #4: aborts even when optional parameter is missing
 #5: there's a potential memory leak

This updated patch to fix #[145]. This patch does not fix #[23]
as I haven't verified these yet, but this at least got me to run
OpenVZ on libvirt once again.
2011-05-26 19:49:18 +02:00
Federico Simoncelli
18c2a59206 qemu: allow blkstat/blkinfo calls during migration
Originally most of libvirt domain-specific calls were blocking
during a migration.
A new mechanism to allow specific calls (blkstat/blkinfo) to be
executed in such condition has been implemented.
In the long term it'd be desirable to get a more general
solution to mark further APIs as migration safe, without needing
special case code.

 * src/qemu/qemu_migration.c: add some additional job signal
   flags for doing blkstat/blkinfo during a migration
 * src/qemu/qemu_domain.c: add a condition variable that can be
   used to efficiently wait for the migration code to clear the
   signal flag
 * src/qemu/qemu_driver.c: execute blkstat/blkinfo using the
   job signal flags during migration
2011-05-26 11:05:04 -06:00
Doug Goldstein
a67407fa36 Use per-user TLS certificates when possible
When using TLS authentication and operating as the non-root user,
initially attempt to use that specific user's TLS certificates before
attempting to use the system wide TLS certificates.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2011-05-23 13:18:14 -06:00
Dirk Herrendorefer
5252a06d65 Add support for 'passthru' mode for direct network interfaces
starting with kernel 2.6.38 macvtap supports a 'passthru' mode for
attaching virtual functions of a SRIOV capable network card directly to a VM.
This patch adds the capability to configure such a device.

Signed-off-by: Dirk Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
2011-05-18 08:15:08 -06:00
Michal Privoznik
5d09c31495 Add warning message to XML definition files stored on disk
Users often edit XML file stored in configuration directory
thinking of modifying a domain/network/pool/etc. Thus it is wise
to let them know they are using the wrong way and give them hint.
2011-05-06 16:48:52 +02:00
Supriya Kannery
0431551435 virsh: fix regression in log to file
Commit 36deff04 introduced a regression due to which virsh is not able
to log to a file - msg_buf was changed from an array to a pointer
without corresponding change to usage of "sizeof()".

Fix regression in virsh logging

Signed-off-by: Supriya Kannery <supriyak@in.ibm.com>
2011-04-30 10:28:02 -06:00
Yufang Zhang
a88916665d xen: check if device is assigned to guest before reattaching
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=664059

Reattaching pci device back to host without destroying guest or
detaching device from guest would cause host to crash. This patch adds
a check before doing device reattach. If the device is being assigned
to guest, libvirt refuses to reattach device to host. The patch only
works for Xen, for it just checks xenstore to get pci device
information.

Signed-off-by: Yufang Zhang <yuzhang@redhat.com>
2011-04-28 14:45:31 -06:00
Mark Wu
d9b46a0d04 Make crash and live flags mutually exclusive in virDomainCoreDump
They don't make any sense when used together.
2011-04-26 13:37:21 +02:00
Richard Laager
cf7124946a Fix two out-of-date comments in LVM backend 2011-04-17 08:37:31 +02:00
Alexander Todorov
d934bd0a58 libvirt-guests: implement START_DELAY
Allow libvirt-guests to stage a delay between guest startups,
to avoid system load caused by back-to-back startup.
2011-04-15 11:15:06 -06:00
Christophe Fergeau
454e50beee Fix gcc 4.6 warnings
gcc 4.6 warns when a variable is initialized but isn't used afterwards:

vmware/vmware_driver.c:449:18: warning: variable 'vmxPath' set but not used [-Wunused-but-set-variable]

This patch fixes these warnings. There are still 2 offending files:

- vbox_tmpl.c: the variable is used inside an #ifdef and is assigned several
  times outside of #ifdef. Fixing the warning would have required wrapping
  all the assignment inside #ifdef which hurts readability.

vbox/vbox_tmpl.c: In function 'vboxAttachDrives':
vbox/vbox_tmpl.c:3918:22: warning: variable 'accessMode' set but not used [-Wunused-but-set-variable]

- esx_vi_types.generated.c: the name implies it's generated code and I
  didn't want to dive into the code generator

esx/esx_vi_types.generated.c: In function 'esxVI_FileQueryFlags_Free':
esx/esx_vi_types.generated.c:1203:3: warning: variable 'item' set but not used [-Wunused-but-set-variable]
2011-04-14 19:09:12 +02:00
Jesse Cook
33da939b0f Allow relative path for qemu backing file
This patch enables the relative backing file path support provided by
qemu-img create.

If a relative path is specified for the backing file, it is converted
to an absolute path using the storage pool path. The absolute path is
used to verify that the backing file exists. If the backing file exists,
the relative path is allowed and will be provided to qemu-img create.
2011-04-04 16:37:58 -06:00
Naoya Horiguchi
343a27aff8 extend logging to record configuration-related changes
Currently libvirt's default logging is limited and it is difficult to
determine what was happening when a proglem occurred (especially on a
machines where one don't know the detail.)  This patch helps to do that
by making additional logging available for the following events:

  creating/defining/undefining domains
  creating/defining/undefining/starting/stopping networks
  creating/defining/undefining/starting/stopping storage pools
  creating/defining/undefining/starting/stopping storage volumes.

* AUTHORS: add Naoya Horiguchi
* src/network/bridge_driver.c src/qemu/qemu_driver.c
  src/storage/storage_driver.c: provide more VIR_INFO logging
2011-03-30 09:19:47 +08:00
Eric Blake
09fb354ce3 maint: update authors
* AUTHORS: Update, to satisfy 'make syntax-check'.
2011-03-22 08:33:22 -06:00
Daniel Veillard
23674616b9 Update the set of maintainers for the project
Wen Congyang gained commiter access

Created a new section of previous commiters to the project
but not involved much anymore: Karel Zak, Atsushi SAKAI,
Dave Leskovec and Dan Smith
2011-03-22 10:10:15 +08:00
Tiziano Mueller
83bc4fa7fa update virGetVersion description
The current description suggests that you always have to provide
a valid typeVer pointer. But if you want only the libvirt version
it's also possible to set type and typeVer to NULL to skip the
hypervisor part.
2011-03-18 17:09:28 -06:00
Minoru Usui
9bfde34661 Fix performance problem of virStorageVolCreateXMLFrom()
This patch changes zerobuf variable from array to VIR_ALLOC_N().

Signed-off-by: Minoru Usui <usui@mxm.nes.nec.co.jp>
2011-03-14 21:02:17 -06:00
Taku Izumi
e8340a8b79 setmem: introduce a new libvirt API (virDomainSetMemoryFlags)
This patch introduces a new libvirt API (virDomainSetMemoryFlags) and
a flag (virDomainMemoryModFlags).

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
2011-03-10 15:02:58 -07:00
Phil Petty
5a81401235 fixes for several memory leaks
Signed-off-by: Eric Blake <eblake@redhat.com>
2011-03-04 09:52:12 -07:00
KAMEZAWA Hiroyuki
65fca8feba AUTHORS: adjust to preferred spelling
maybe sounds strange but I've used this signature for years.
see http://en.wikipedia.org/wiki/Family_name
2011-03-03 17:19:41 -07:00
Markus Groß
8606ca0d0b Moved SEXPR unit to utils 2011-02-21 10:48:02 -07:00
Christophe Fergeau
9190f0b0a0 fix OOM handling in hash routines
* src/util/hash.c: virHashAddEntry and virHashUpdateEntry were missing NULL
  checks on strdup
* AUTHORS: add Christophe Fergeau
2011-02-14 13:36:06 +08:00
Daniel Veillard
cace96080e Adding Michal Novotny for previous patch 2011-02-09 10:05:19 +08:00
Gui Jianfeng
b58241a690 cgroup: Enable cgroup hierarchy for blkio cgroup
Enable cgroup hierarchy for blkio cgroup

Acked-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
2011-02-08 10:42:14 -07:00
Eric Blake
fbaed1a714 maint: update AUTHORS
* AUTHORS: Adjust for recent commits.
2011-02-08 10:30:03 -07:00
Alon Levy
ad88e17ff5 docs/index.html.in: update QEMU url 2011-02-03 16:55:12 -07:00
Davidlohr Bueso
de53effecc Fix conflicts with glibc globals
When compiling libvirt with GCC 3.4.6 the following warning is being triggered quite a lot:

util/memory.h:60: warning: declaration of 'remove' shadows a global declaration
/usr/include/stdio.h:175: warning: shadowed declaration is here

Fix this by renaming the parameter to 'toremove'.
2011-02-03 08:58:45 -07:00
Niels de Vos
0b864eb103 qemuBuildDeviceAddressStr() checks for QEMUD_CMD_FLAG_PCI_MULTIBUS
Depending if the qemu binary supports multiple pci-busses, the device
options will contain "bus=pci" or "bus=pci.0".

Only x86_64 and i686 seem to have support for multiple PCI-busses. When
a guest of these architectures is started, set the
QEMUD_CMD_FLAG_PCI_MULTIBUS flag.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2011-02-02 09:00:46 -07:00
Daniel Veillard
53258f3e7f Osier get commit rights 2011-01-31 09:31:33 +08:00
Matthias Dahl
91ef4e05ea qemu aio: add XML parsing
Allows io={threads|native} as an optional attribute to <driver>.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-01-28 09:09:48 -07:00
Juerg Haefliger
eb1be58e0e docs: replace CRLF with LF 2011-01-28 08:44:05 -07:00
Michal Privoznik
cee47aace1 virsh: require --mac to avoid detach-interface ambiguity
bugfix for https://bugzilla.redhat.com/show_bug.cgi?id=671050

virsh simply refutes to detach-interface in case when multiple
interfaces are attached and --mac is not specified.
2011-01-25 10:47:28 -07:00
Marc-André Lureau
4d099bc06c qemu: add set_password and expire_password monitor commands 2011-01-14 12:35:42 -07:00
Kay Schubert
a43c7338d8 bridge: Fix generation of dnsmasq's --dhcp-hostsfile option
I added a host definition to a network definition:

<network>
  <name>Lokal</name>
  <uuid>2074f379-b82c-423f-9ada-305d8088daaa</uuid>
  <bridge name='virbr1' stp='on' delay='0' />
  <ip address='192.168.180.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.180.128' end='192.168.180.254' />
      <host mac='23:74:00:03:42:02' name='somevm' ip='192.168.180.10' />
    </dhcp>
  </ip>
</network>

But due to the wrong if-statement the argument --dhcp-hostsfile doesn't get
added to the dnsmasq command. The patch below fixes it for me.
2011-01-06 15:58:23 +01:00
Paweł Krześniak
ed039abc09 bridge_driver: avoid double call to VIR_FREE
While not technically a double free (since VIR_FREE NULLs the
pointer), this is unnecessary extra code.

This crept in when the function was converted from virRun to virCommand.

The AUTHORS file has also been updated.
2010-12-20 08:30:08 -05:00
Roopa Prabhu
013c000a6c 802.1Qbh: Add support for IFLA_VF_MAC
Current code does not pass VM mac address to a 802.1Qbh direct attach
interface using IFLA_VF_MAC.  This patch adds support in macvtap code to
send IFLA_VF_MAC netlink request during port profile association on a
802.1Qbh interface.

Stefan Cc'ed for comments because this patch changes a condition for
802.1Qbg

802.1Qbh support for IFLA_VF_MAC in enic driver has been posted and is
pending acceptance at http://marc.info/?l=linux-netdev&m=129185244410557&w=2
2010-12-13 11:07:38 -05:00
Josh Durgin
85400fb992 qemu: Add RBD support and some network disk fixes
Changes common to all network disks:
-Make source name optional in the domain schema, since NBD doesn't use it
-Add a hostName type to the domain schema, and use it instead of genericName, which doesn't include .
-Don't leak host names or ports
-Set the source protocol in qemuParseCommandline

Signed-off-by: Josh Durgin <joshd@hq.newdream.net>
2010-12-09 14:20:53 -07:00
MORITA Kazutaka
036ad5052b add network disk support
This patch adds network disk support to libvirt/QEMU.  The currently
supported protocols are nbd, rbd, and sheepdog.  The XML syntax is like
this:

    <disk type="network" device="disk">
      <driver name="qemu" type="raw" />
      <source protocol='rbd|sheepdog|nbd' name="...some image identifier...">
        <host name="mon1.example.org" port="6000">
        <host name="mon2.example.org" port="6000">
        <host name="mon3.example.org" port="6000">
      </source>
      <target dev="vda" bus="virtio" />
    </disk>

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
2010-12-09 14:09:12 -07:00
Laurent Léonard
68e5e4672a syntax error "Bad fd number" when stopping libvirt-guests
When libvirt-guests is being stopped, I get the following message:
$Running guests on default URI: test-vm
$Suspending guests on default URI...
$Suspending test-vm: /etc/init.d/libvirt-guests: 340: Syntax error: Bad fd
number
2010-12-06 11:01:36 -07:00
Hu Tao
1b6f13bb70 Fall back to QEMUD_SAVE_FORMAT_RAW if compression method fails.
When dumping a domain, it's reasonable to save dump-file in raw format
if dump format is misconfigured or the corresponding compress program
is not available rather then fail dumping.
2010-11-30 14:22:53 -07:00
Wen Congyang
4f7162d106 correct the arguments of migrate_speed
When we set migrate_speed by json, we receive the following
error message:
libvirtError: internal error unable to execute QEMU command
'migrate_set_speed': Invalid parameter type, expected: number

The reason is that: the arguments of migrate_set_speed
by json is json number, not json string.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
2010-11-29 15:11:03 -07:00
KAMEZAWA Hiroyuki
5546034210 audit: printf warning fix
fix warning
  CC     libvirt_util_la-virtaudit.lo
cc1: warnings being treated as errors
util/virtaudit.c: In function 'virAuditEncode':
util/virtaudit.c:146: error: implicit declaration of function 'virAsprintf' [-Wimplicit-function-declaration]
util/virtaudit.c:146: error: nested extern declaration of 'virAsprintf' [-Wnested-externs]
2010-10-28 11:23:42 -06:00
Osier Yang
1a29a14a2f virsh: Add option 'model' for attach-interface
* tools/virsh.c: add missing option from the CLI to allows setting
  up the NIC model type when attaching an interface
* tools/virsh.pod: extend documentation
* AUTHORS: add Osier Yang to the list
2010-10-26 10:36:40 +02:00
Daniel Veillard
dbe1cbe4ba Add John Morrissey to AUTHORS 2010-10-20 10:32:57 +02:00