Commit Graph

126 Commits

Author SHA1 Message Date
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
Eric Blake
a33b7b6f35 maint: add recent author
* AUTHORS: List Harsh Prateek Bora, for 'make syntax-check'.
2010-10-14 09:17:42 -06:00
Lai Jiangshan
ad2f1b6093 virsh: better support double quote
In origin code, double quote is only allowed at the begin or end
"complicated argument"
--some_opt="complicated string"  (we split this argument into 2 parts,
option and data, the data is "complicated string").

This patch makes it allow double quote at any position of
an argument:
complicated" argument"
complicated" "argument
--"some opt=complicated string"

This patch is also needed for the following patches,
the following patches will not split option argument into 2 parts,
so we have to allow double quote at any position of an argument.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
2010-10-13 07:52:32 -06:00
Nikunj A. Dadhania
0cd7823271 Adding virDomainSetMemoryParameters and virDomainGetMemoryParameters API
Public api to set/get memory tunables supported by the hypervisors.

dv:
* some cleanups in libvirt.c
* adding extra checks in libvirt.c new entry points

v4:
* Move exporting public API to this patch
* Add unsigned int flags to the public api for future extensions

v3:
* Add domainGetMemoryParamters and NULL in all the driver interface

v2:
* Initialize domainSetMemoryParameters to NULL in all the driver
  interface structure.
2010-10-12 19:26:09 +02:00
Justin Clift
fbb2bdc132 Moved my name up to the primary list, as I have commit rights now.
As recommended by Eric. :)
2010-09-09 00:13:19 +10:00
Serge Hallyn
e9406e9ea7 docs: fix lxc examples
* docs/drvlxc.html.in: Use correct VM name, and mention that
libvirt_lxc might be in an alternate location.
2010-08-24 11:14:46 -06:00
Patrick Dignan
20be699ee3 storage: add support for Vendor and Model in XML
I wrote a patch to add support for listing the Vendor and Model of a
storage pool in the storage pool XML.  This would allow vendor
extensions of specific devices.  The patch includes a test for the new
attributes as well.

Patrick Dignan
2010-08-19 15:58:43 -06:00
Eric Blake
1ddefd181b maint: update an email address preference
* AUTHORS (Soren Hansen): Update address.
* .mailmap: Alias other addresses to new preference.
2010-08-10 08:13:22 -06:00
Daniel Veillard
c66bf97003 Add Aurelien to AUTHORS 2010-08-02 21:55:33 +02:00
Justin Clift
b3db32610d authors: update my authors details 2010-07-09 23:21:00 +10:00
Alan Pevec
0c141c893a bridge_driver.c: fix file description 2010-06-23 08:18:57 -06:00