Commit Graph

154 Commits

Author SHA1 Message Date
Daniel P. Berrange
d3d54d2fc9 Add domain events detail information 2008-11-17 16:43:00 +00:00
Daniel P. Berrange
618276de19 Push URI probing logic down into individual drivers 2008-11-17 11:44:51 +00:00
Jim Meyering
94359e16d3 avoid format string warnings
* src/openvz_driver.c (ADD_ARG_LIT): Add "%s" arg before _(...).
* src/qemu_driver.c (PCI_ATTACH_OK_MSG): Likewise.
* src/util.c (virExec, virRun): Likewise.
2008-11-14 14:19:37 +00:00
Daniel Veillard
df285bdd8d KVM/QEmu migration support
* qemud/remote.c qemud/remote_dispatch_localvars.h
  qemud/remote_dispatch_proc_switch.h qemud/remote_dispatch_prototypes.h
  qemud/remote_protocol.c qemud/remote_protocol.h
  qemud/remote_protocol.x src/driver.h src/libvirt.c
  src/libvirt_internal.h src/libvirt_sym.version src/lxc_driver.c
  src/openvz_driver.c src/qemu_conf.h src/qemu_driver.c
  src/remote_internal.c src/test.c src/virsh.c: large patch to
  add migration support for KVM/QEmu, based on the work of Rich Jones
  and Chris Lalancette. This introduce a new version of the prepare
  and finish steps of the migration, so changes the driver API and
  a lot of code.
Daniel
2008-11-14 08:42:47 +00:00
Daniel Veillard
df93e1ee24 add new logging module, and move existing definitions there
* src/logging.c src/logging.h proxy/Makefile.am proxy/libvirt_proxy.c
  src/Makefile.am src/cgroup.c src/datatypes.c src/domain_event.c
  src/internal.h src/libvirt.c src/lxc_container.c src/lxc_controller.c
  src/lxc_driver.c src/proxy_internal.c src/qemu_driver.c
  src/remote_internal.c src/storage_backend_disk.c src/util.c
  src/veth.c src/xen_internal.c src/xen_unified.c src/xend_internal.c:
  add new logging module, and move existing definitions there
Daniel
2008-11-06 16:36:07 +00:00
Jim Meyering
7271a92bec plug two leaks and fix a diagnostic
* src/qemu_conf.c (qemudLoadDriverConfig): Don't leak ->vncListen.
Fix an erroneous copy-and-pasted diagnostic.
* src/qemu_driver.c (qemudShutdown): Don't leak another ->vncListen.
2008-11-05 14:24:21 +00:00
Daniel P. Berrange
6ace5a39c3 Move some API declarations out of internal.h & hash.c into dedicated files 2008-11-04 23:22:06 +00:00
Daniel P. Berrange
d714b2afae Move internal error APIs into virterror_internal.h & drop leading __ prefix 2008-11-04 22:30:33 +00:00
Daniel P. Berrange
78439117bc Add support for -uuid and -domid args to QEMU 2008-11-04 22:15:30 +00:00
Daniel Veillard
c1a9be4c1b * src/qemu_driver.c: oops trailing blanks
Daniel
2008-11-03 15:52:55 +00:00
Daniel Veillard
4780a00b14 * src/domain_conf.h src/qemu_driver.c: patch adding hor removal of
scsi/virtio disks for KVM, patch by Guido Günther
daniel
2008-10-29 14:32:40 +00:00
Daniel P. Berrange
bdd50bc7f3 Centralize domain mac address handling in domain_conf.c/util.c 2008-10-24 11:20:08 +00:00
Daniel Veillard
1509b8027f Massive patch adding event APIs by Ben Guthro
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in
  src/libvirt.c src/libvirt_sym.version: new libvirt event entry
  points, big patch provided by Ben Guthro
* Makefile.am configure.in src/driver.h src/event.c src/event.h
  src/internal.h src/libvirt.c src/libvirt_sym.version src/lxc_driver.c
  src/openvz_driver.c src/qemu_conf.h src/qemu_driver.c
  src/remote_internal.c src/storage_backend_fs.c src/test.c
  qemud/event.c qemud/event.h qemud/mdns.c qemud/qemud.c
  qemud/qemud.h qemud/remote.c qemud/remote_dispatch_localvars.h
  qemud/remote_dispatch_proc_switch.h qemud/remote_dispatch_prototypes.h
  qemud/remote_protocol.c qemud/remote_protocol.h
  qemud/remote_protocol.x proxy/Makefile.am python/generator.py:
  Not much is left untouched by the patch adding the events support
* docs/libvirt-api.xml docs/libvirt-refs.xml
  docs/html/libvirt-libvirt.html: regenerated the docs
* examples/domain-events/events-c/Makefile.am
  examples/domain-events/events-c/event-test.c: a test example
* AUTHORS: added Ben Guthro
daniel
2008-10-23 13:18:18 +00:00
Chris Lalancette
c83c3e9e5c While doing on this patch series, I mistakenly added a bogus piece of
storage XML to libvirtd, which was saved in /etc/libvirt/storage.  On subsequent
stop/start of libvirtd, because of another bug , an
error wasn't being set properly in an error path, so libvirtd was SEGV'ing in
storage_conf.c:virStoragePoolObjLoad when trying to dereference the NULL err
returned from virGetLastError().  Make this more robust against errors by always
doing "err ? err->message : NULL" in the printf.  I looked around the tree and
found a couple of other places that weren't guarded, so this patch fixes them as
well.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-10-21 17:15:53 +00:00
Daniel Veillard
6d6fd6b305 * src/qemu_driver.c: cleanup patch for usb masstorage hotadd
by Guido Günther
daniel
2008-10-21 13:09:23 +00:00
Daniel Veillard
7b9344686a * src/qemu_driver.c: add scsi/virtio hotplug support for KVM
patch by Guido Günther
daniel
2008-10-17 12:36:39 +00:00
Daniel Veillard
8348610c5e qemudDomainBlockStats use qemudDiskDeviceName
* src/qemu_driver.c: use qemudDiskDeviceName to determine the block
  device name in qemudDomainBlockStats(), patch by Guido Günther
daniel
2008-10-17 09:29:29 +00:00
Daniel Veillard
f009e2aae2 * src/qemu_driver.c: fix qemudDiskDeviceName to handle disk devices
too, patch by Guido Günther
daniel
2008-10-17 09:24:07 +00:00
Chris Lalancette
164f786626 Compiling with -Werror showed a possible use before initialization
in src/qemu_driver.c.  Make sure to initialize the olddisk ptr to NULL.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-10-16 13:44:09 +00:00
Jim Meyering
fd52c6ff67 avoid many format string warnings
Building with --disable-nls exposed many new warnings like these:
virsh.c:4952: warning: format not a string literal and no format ...
util.c:163: warning: format not a string literal and no format arguments
All but one of the following changes add a "%s" argument before
the offending _(...) argument.

This was the only manual change:
* src/lxc_driver.c (lxcVersion): Use %s and strerror(errno)
rather than %m, to avoid a warning from gcc -Wformat-security.

Add "%s" before each warned about format-string-with-no-%-directive:
* src/domain_conf.c (virDomainHostdevSubsysUsbDefParseXML)
(virDomainDefParseString, virDomainDefParseFile):
* src/hash.c (virGetConnect, __virGetDomain, virReleaseDomain)
(__virGetNetwork, virReleaseNetwork, __virGetStoragePool)
(virReleaseStoragePool, __virGetStorageVol, virReleaseStorageVol):
* src/lxc_container.c (lxcContainerChild):
* src/lxc_driver.c (lxcDomainDefine, lxcDomainUndefine)
(lxcDomainGetInfo, lxcGetOSType, lxcDomainDumpXML)
(lxcSetupInterfaces, lxcDomainStart, lxcDomainCreateAndStart)
(lxcVersion, lxcGetSchedulerParameters):
* src/network_conf.c (virNetworkDefParseString)
(virNetworkDefParseFile):
* src/openvz_conf.c (openvzReadNetworkConf, openvzLoadDomains):
* src/openvz_driver.c (openvzDomainDefineCmd)
(openvzDomainGetInfo, openvzDomainDumpXML, openvzDomainShutdown)
(openvzDomainReboot, ADD_ARG_LIT, openvzDomainDefineXML)
(openvzDomainCreateXML, openvzDomainCreate, openvzDomainUndefine)
(openvzDomainSetAutostart, openvzDomainGetAutostart)
(openvzDomainSetVcpus):
* src/qemu_driver.c (qemudDomainBlockPeek, qemudDomainMemoryPeek):
* src/remote_internal.c (remoteDomainBlockPeek)
(remoteDomainMemoryPeek, remoteAuthPolkit):
* src/sexpr.c (sexpr_new, _string2sexpr):
* src/storage_backend_disk.c (virStorageBackendDiskMakeDataVol)
(virStorageBackendDiskCreateVol):
* src/storage_backend_fs.c
(virStorageBackendFileSystemNetFindPoolSources):
* src/storage_backend_logical.c (virStorageBackendLogicalFindLVs)
(virStorageBackendLogicalFindPoolSources):
* src/test.c (testOpenDefault, testOpenFromFile, testOpen)
(testGetDomainInfo, testDomainRestore)
(testNodeGetCellsFreeMemory):
* src/util.c (virExec):
* src/virsh.c (cmdAttachDevice, cmdDetachDevice)
(cmdAttachInterface, cmdDetachInterface, cmdAttachDisk)
(cmdDetachDisk, cmdEdit):
* src/xend_internal.c (do_connect, wr_sync, xend_op_ext)
(urlencode, xenDaemonDomainCreateXML)
(xenDaemonDomainLookupByName_ids, xenDaemonDomainLookupByID)
(xenDaemonParseSxprOS, xend_parse_sexp_desc_char)
(xenDaemonParseSxprChar, xenDaemonParseSxprDisks)
(xenDaemonParseSxpr, sexpr_to_xend_topology, sexpr_to_domain)
(xenDaemonDomainFetch, xenDaemonDomainGetAutostart)
(xenDaemonDomainSetAutostart, xenDaemonDomainMigratePerform)
(xenDaemonDomainDefineXML, xenDaemonGetSchedulerType)
(xenDaemonGetSchedulerParameters)
(xenDaemonSetSchedulerParameters, xenDaemonDomainBlockPeek)
(xenDaemonFormatSxprChr, virDomainXMLDevID):
* src/xm_internal.c (xenXMConfigCacheRefresh, xenXMDomainPinVcpu)
(xenXMDomainCreate, xenXMDomainDefineXML)
(xenXMDomainAttachDevice, xenXMDomainDetachDevice):
* src/xml.c (virXPathString, virXPathNumber, virXPathLong)
(virXPathULong, virXPathBoolean, virXPathNode, virXPathNodeSet):
* src/xs_internal.c (xenStoreOpen):
2008-10-13 16:46:28 +00:00
Daniel P. Berrange
7e0d3e62e9 Support SDL config with QEMU guests 2008-10-10 16:52:20 +00:00
Daniel P. Berrange
427f7a8b09 Switch domain device objects to array instead of linked list 2008-10-10 16:08:01 +00:00
Daniel P. Berrange
4789154063 Switch domain objects to array instead of linked list 2008-10-10 14:20:37 +00:00
Daniel P. Berrange
1564711a27 Split network driver out into separate files 2008-10-10 13:57:13 +00:00
Daniel Veillard
f6803c960f virDomainDefineXML, and a few additional cleanups
* include/libvirt/libvirt.h[.in] include/libvirt/virterror.h
  qemud/remote* src/driver.h src/libvirt.c src/libvirt_sym.version
  src/lxc_driver.c src/openvz_driver.c src/proxy_internal.c
  src/qemu_driver.c src/remote_internal.c src/test.c src/virsh.c
  src/xen_internal.c src/xen_unified.c src/xen_unified.h
  src/xend_internal.c src/xend_internal.h src/xm_internal.c
  src/xs_internal.c docs/*: cleanup virDomainCreateLinux into
  virDomainDefineXML, and a few additional cleanups
Daniel
2008-10-10 09:32:27 +00:00
Daniel Veillard
6d670a1fc1 use safewrite() and plug a leak
* src/cgroup.c: use safewrite()
* src/qemu_driver.c: missing VIR_FREE pojnted out by Eduardo Habkost
Daniel
2008-10-08 13:44:40 +00:00
Daniel Veillard
f9dbe46b44 * src/qemu_driver.c: another OOM handling cleanup (Guido Günther)
daniel
2008-10-07 16:39:32 +00:00
Daniel Veillard
9f4c047935 * src/qemu_driver.c: don't print and extra OOM error on top of getpwuid error
(Guido Günther)
Daniel
2008-10-07 16:01:23 +00:00
Daniel Veillard
72c40b0622 use C99 initializers for virState
* src/lxc_driver.c src/qemu_driver.c src/remote_internal.c
  src/storage_driver.c: use C99 initializers for virState (Guido
  Gunther)
Daniel
2008-10-06 15:40:37 +00:00
Cole Robinson
a166cdbb6e Fix starting qemu VM with multiple pty char devices. 2008-10-02 14:10:20 +00:00
Daniel P. Berrange
0aac8c9447 Fix trailing whitespace & unmarked diagnostic warning 2008-09-18 08:54:23 +00:00
Richard W.M. Jones
dd57b821e4 Remove some deadcode (Nguyen Anh Quynh). 2008-09-17 14:21:27 +00:00
Richard W.M. Jones
04e9e1b2a6 configure.in, src/qemu_driver.h, src/qemu_driver.c: KVM
can determine max VCPUs at runtime (Guido Günther).
2008-09-17 14:07:49 +00:00
Daniel Veillard
58686c3dd8 add domain name in network configurations suport and on OpenVZ config bugfix
* src/network_conf.c src/network_conf.h src/qemu_driver.c: add
  support for a domain name in network configurations, patch by
  JJ Reynolds with bugfix raised by Dan
* src/openvz_conf.c: fix to small bug in openvzReadConfigParam
  by Evgeniy Sokolov
Daniel
2008-09-08 12:45:29 +00:00
Daniel P. Berrange
126d3ebeea Fix starting of xen domains without a PVFB console by removing default emulator 2008-09-05 11:52:12 +00:00
Daniel Veillard
a8d0600762 * src/qemu_driver.c: fix an error message, patch by Nguyen Anh Quynh
Daniel
2008-09-04 13:20:28 +00:00
Daniel Veillard
821dcf0ff7 * src/qemu_driver.c: switch flags to unsigned by James Morris
* AUTHORS: add James Morris
Daniel
2008-09-04 08:15:05 +00:00
Cole Robinson
e0b4fcc280 Fix qemu media connect/eject to work with latest syntax. Add support for ejecting floppy devices and scsi cdroms. 2008-09-03 16:05:25 +00:00
Cole Robinson
fe7bb57a8b Update domain xml after usb device hotplug. 2008-09-03 15:05:31 +00:00
Cole Robinson
f4af06d812 Scrap media eject output to try and determine success/fail. 2008-09-03 14:43:34 +00:00
Daniel Veillard
53738f83a5 avoid a segfault on CD eject in KVM/QEmu
* src/qemu_driver.c: patch from Cole Robinson to avoid a segfault
  on KVM CD eject
Daniel
2008-09-03 12:52:27 +00:00
Daniel P. Berrange
3348a97bd3 Switch over fork/exec code to use virExec 2008-08-29 07:11:15 +00:00
Daniel P. Berrange
da1963381b Fix QEMU domain creation by allowing virExec to preserve certain FDs 2008-08-27 11:42:52 +00:00
Daniel P. Berrange
bb16f4a25d Do conditional driver config in Makefile.am, not source files 2008-08-20 20:48:35 +00:00
Daniel P. Berrange
6334cd16df Remove configFile/autostartLink vars from virDomainObj struct 2008-08-20 19:42:36 +00:00
Daniel Veillard
b73d495754 * src/network_conf.c src/network_conf.h src/qemu_driver.c: allow to
add static host definition for dnsmasq
Daniel
2008-08-20 12:50:29 +00:00
Daniel P. Berrange
1b4bb7d4ab Allow non-blocking/daemon mode to be specified via virExec flags 2008-08-20 09:24:14 +00:00
Daniel P. Berrange
6bc99a7775 Allow a pre-opened FD to be be pass to virExec for stdout/err 2008-08-20 09:08:17 +00:00
Atsushi SAKAI
6fd4c30285 fix typos src/virsh.c from John Levon,
and 3 more files(src/domain_conf.c src/openvz_driver.c src/qemu_driver.c)
2008-08-15 01:41:49 +00:00
Atsushi SAKAI
413c5dbf07 add _fd to stdin, stderr stdout in struct virDomainObj for compilation on MinGW 2008-08-12 08:38:22 +00:00