Commit Graph

2544 Commits

Author SHA1 Message Date
Daniel Veillard
31bd8cb6d0 * src/opennebula/one_conf.c src/opennebula/one_driver.c: fix One
driver compilation issues, patch by Javier Fontan and remove
  some tabs in format strings
daniel
2009-06-24 16:17:10 +00:00
Cole Robinson
2fa4a8b991 Fix storage handling for custom test driver.
If using a custom test driver, storage pool file parsing was broken, and
storage volume parsing was never implemented. Fix these issues, and add
some examples in docs/
2009-06-22 17:19:30 +00:00
Cole Robinson
3f305eb1e9 Refactor storage XML parsing to be consistent with domain/network conf.
The storage driver arranges its parsing routines in a way that make them
difficult to use in the test driver for non-default file parsing. This
refactoring moves things to be consistent with the way domain_conf and
network_conf do things.
2009-06-22 16:41:34 +00:00
Cole Robinson
5de555cae2 Activate virtual networks initialized in custom test driver.
If specifying a custom test driver, virtual networks were not 'activated'
on driver init. This differs from the behavior of domains and storage pools,
so fix it. Also improve a couple error messages in that area.
2009-06-22 16:39:23 +00:00
Cole Robinson
f7f52b1592 Fix segfault if storage pool has no type attribute (possibly others)
virEnumFromString doesn't check for a NULL string, and will segfault if
passed one. Lots of calling code protects against this, but at least
/pool/@type parsing does not.
2009-06-22 16:37:52 +00:00
Cole Robinson
387935345c Fix memory reporting for inactive domains in the qemu driver.
Currently, 'info' will always report that mem = max mem. Make sure we
actually return the correct mem value.
2009-06-22 16:35:03 +00:00
Cole Robinson
5ea25b7801 Fix raw storage volume creation for allocation < capacity.
CreateXMLFrom changes accidentally caused all raw volume creation to be
fully allocated (as though allocation == capacity). Fix this.

Also force CreateXMLFrom to maintain the previous behavior: sparseness
should still be maintained since we search for holes when copying, and the
clone behavior hasn't been tested with anything but the broken behavior.
2009-06-22 16:33:24 +00:00
Cole Robinson
c1b2aea80c test driver: Fix domain ID after redefining a running VM
The ID of the existing VM was being unconditionally set to -1, which was
upsetting virt-manager.
2009-06-22 16:29:40 +00:00
Daniel Veillard
a06b407fce * src/conf.[ch]: restrict VMX syntax parsing types
daniel
2009-06-22 11:54:49 +00:00
Daniel Veillard
c57932c663 * src/storage_driver.c: cleanup when creating a storage pool fails,
patch by Henrik Persson
Daniel
2009-06-22 10:15:57 +00:00
Daniel Veillard
144276aa1a extend the configuration parser for VMX syntax
* qemud/qemud.c src/conf.c src/conf.h src/qemu_conf.c src/xen_unified.c
  src/xm_internal.c tests/conftest.c tests/xmconfigtest.c: extend
  the configuration parser for VMX syntax, patch by Matthias Bolte
Daniel
2009-06-19 12:34:30 +00:00
Daniel P. Berrange
2be4d86740 Fix remote socket path for SSH tunnel connections 2009-06-18 13:57:40 +00:00
Daniel Veillard
c0b64e9daa fix a module dependency problem
* src/node_device.[ch] src/storage_backend.[ch]: fixes a
  module dependency problem, patch by Dave Allan
Daniel
2009-06-17 08:38:17 +00:00
Cole Robinson
502278d5b2 Allow USB hostdev product to be 0x0000
Product = 0 is a valid value based on this bug report:

https://www.redhat.com/archives/libvir-list/2009-May/msg00368.html

Also, throw a less ambiguous error if vendor = 0.
2009-06-16 18:46:06 +00:00
Cole Robinson
ac75bd1b1e Fix FS volume creation with backing stores.
This regressed when CreateXMLFrom was added: we should only perform the
backing store comparison if an input volume was passed.
2009-06-16 15:47:53 +00:00
Cole Robinson
53603043c7 Set default emulator in domain_conf.*, rather than the driver.
Rather than numerous instances of:

emulator = vm->def->emulator;
if (!emulator)
    emulator = virDomainDefDefaultEmulator(conn, vm->def, driver->caps);
if (!emulator)
    return -1;

Set this value at XML parse time in the domain config, so we can depend on
it for all future emulator accesses. There were unchecked accesses in the
qemu driver that were tripping up on this if no emulator was specified in
the XML, see:

http://www.redhat.com/archives/libvir-list/2008-October/msg00602.html
2009-06-16 15:42:46 +00:00
Cole Robinson
3f63c44d12 Add virCapabilities*EmulatorRequired.
Certain drivers always need an 'emulator' specified in the XML (qemu and lxc
at least). Store this info in capabilities.

We will eventually use this to move default emulator handling out of
drivers and into domain_conf.*
2009-06-16 15:27:33 +00:00
Cole Robinson
659bd66529 Check that '-drive format=' is supported before adding to qemu cmdline.
Qemu < 0.10.0 did not support it, and virt-* tools now try to add this by
default, so it's extra important we ensure the option exists.
2009-06-16 15:17:10 +00:00
Cole Robinson
c9d9eddaa4 Add qemuhelptest to .*ignore files 2009-06-16 14:06:48 +00:00
Cole Robinson
bfb59c172b Fix qemu command flags fetching
New function qemudParseHelpStr was being called with arguments in the
wrong order, so command flags == kvm_version :/
2009-06-16 14:01:43 +00:00
Daniel P. Berrange
39f775cc05 Add new 'availheap' sysctl variant for ABI changes in Xen 2009-06-16 09:31:19 +00:00
Daniel P. Berrange
c4a6bc4977 Fix build on non-Linux targets 2009-06-15 17:15:54 +00:00
Daniel P. Berrange
7c4ce7eb03 Fix build from tar.gz 2009-06-15 14:59:22 +00:00
Daniel P. Berrange
ae974a2bbf Fix bogus initialization in virFindFileInPath 2009-06-15 11:08:28 +00:00
Daniel P. Berrange
0420a03240 Remove use of getuid()==0 for privilege checks 2009-06-12 13:20:13 +00:00
Daniel P. Berrange
a8b12e4f27 Include OS driver name (if any) in device XML for nodedev driver 2009-06-12 13:12:55 +00:00
Daniel P. Berrange
d2c9fe850b Improve error reporting for virConnectOpen URIs 2009-06-12 12:06:15 +00:00
Daniel P. Berrange
56a46886ad Fix re-detection of transient VMs after libvirtd restart 2009-06-12 11:38:50 +00:00
Daniel Veillard
3bdda17adc fixing a typo in error message
* qemud/remote.c: fixing a typo pointed out by Runa Bhattacharjee
Daniel
2009-06-11 15:34:37 +00:00
Daniel Veillard
bf5d6f431e extract serial number from HAL storage backend
* src/node_device_hal.c src/node_device_conf.[ch]: add support
  for serial number in HAL storage backend, patch by Dave Allan
* docs/schemas/nodedev.rng
tests/nodedevschemadata/storage_serial_3600c0ff000d7a2a5d463ff4902000000.xml:
  update the schemas and add a test case, also by Dave Allan
Daniel
2009-06-11 14:25:19 +00:00
Mark McLoughlin
1fbe229b3c Add qemu help string parsing tests
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-11 14:17:42 +00:00
Mark McLoughlin
04cbe68797 Detect newer qemu-kvm versions
The KVM version string can be one of the following:

  - qemu-kvm-x.y.z in stable releases
  - kvm-XX for kvm versions up to kvm-85
  - qemu-kvm-devel-XX for kvm version kvm-86 and later

There are only a few of places where we need to detect
differences between KVM versions based on 0.9.1:

  1) VNET_HDR introduced in kvm-74

  2) -incoming tcp introduced in kvm-79

  3) -incoming exec introduced in kvm-80

  4) -incoming stdio in all earlier kvm versions

With qemu-kvm-0.10.x, we can now assume that (1) is available
if it's a KVM release, (2) and (3) is always available and
(4) is never available.

So, from now on we should only need to check the qemu version
number and the "is_kvm" flag for detecting feature availability.
We only need the KVM version number for older releases.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-11 14:15:49 +00:00
Mark McLoughlin
56ecebf22d Re-factor qemu version parsing
This patch is purely re-factoring without any functional changes
to make way for the next patch.

The main thing achieved by the refactoring is that we now have
easier access to the parenthesised string that KVM folks seem
to delight in changing.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-11 14:12:30 +00:00
Daniel Veillard
abed6fca87 find and use kvm-img, qemu-img or qcow-create dynamically
* configure.in src/libvirt_private.syms src/storage_backend_fs.c
  src/util.c src/util.h: find and use kvm-img, qemu-img or qcow-create
  dynamically at runtime, patch by Doug Goldstein
* AUTHORS: add Doug Goldstein
Daniel
2009-06-11 13:18:56 +00:00
Daniel Veillard
d12a6ef9c2 typo fix, regenerated docs
* docs/formatdomain.html docs/formatdomain.html.in: typo fix
  by Garry Dolley
Daniel
2009-06-09 13:22:19 +00:00
Daniel P. Berrange
ce958c191c Added docs on extending public API (Dave Allen) 2009-06-09 11:42:41 +00:00
Daniel Veillard
f969e393a9 Fix a memory error on Xen device removal
* src/xm_internals.c: the memory shrinking on device removal
  didn't copy the right amount of memory, patch by Daniel Berrange
  fixes #497051
daniel
2009-06-04 13:56:49 +00:00
Daniel P. Berrange
3166570f7c Add NUMA memory APIs to vbox driver 2009-06-03 14:32:18 +00:00
Daniel Veillard
e11013d19c * src/network_driver.c: forbid set Autostart on transcient networks
daniel
2009-06-03 13:52:06 +00:00
Daniel P. Berrange
69d4634635 Switch to positional struct initializers in vbox driver table 2009-06-03 13:30:19 +00:00
Daniel P. Berrange
0ca460eada Implement capabilities and nodeinfo APIs 2009-06-03 13:29:23 +00:00
Daniel P. Berrange
b0b968efd5 Generic shared impls of all NUMA apis 2009-06-03 13:28:02 +00:00
Daniel Veillard
3621d42e0f * src/openvz_conf.c src/virsh.c: various typo or english fixups
raised by Runa Bhattacharjee
daniel
2009-06-03 12:13:52 +00:00
Daniel P. Berrange
1b28a99d14 Fix HAL driver restart thread safety 2009-06-03 11:24:21 +00:00
Daniel P. Berrange
c0d74ed43b Support networking in UML driver 2009-06-03 11:13:33 +00:00
Daniel P. Berrange
7cce4768ae Misc User Mode Linux startup/shutdown bugs 2009-06-03 10:55:33 +00:00
Daniel P. Berrange
7d633ec400 Fix logging initialization in daemon 2009-06-03 10:36:17 +00:00
Daniel Veillard
81d0ffbc3b NPIV implementation for node device create and destroy
* src/Makefile.am src/node_device.[ch] src/node_device_conf.[ch]
  src/node_device_hal.[ch] src/node_device_hal_linux.c
  src/qemu_driver.c src/remote_internal.c src/storage_backend.c
  src/virsh.c src/xen_unified.c tests/nodedevxml2xmltest.c
  po/POTFILES.in: implementation for node device create and destroy
  in NPIV support, patch by David Allan
Daniel
2009-06-02 15:12:53 +00:00
Daniel Veillard
66220e3e61 release of libvirt-0.6.4
* configure.in libvirt.spec.in NEWS docs/* po/*: release of
  libvirt-0.6.4
* src/libvirt.c src/virterror.c: some comments cleanups
Daniel
2009-05-29 16:51:15 +00:00
Daniel P. Berrange
6c3ef35064 Avoid double-free in daemon client cleanup code 2009-05-29 14:34:35 +00:00