- 10 11月, 2009 5 次提交
-
-
由 Daniel P. Berrange 提交于
Decouple the monitor code from the virDomainDefPtr structure by moving the disk encryption lookup code back into the qemu_driver.c file. Instead provide a function callback to the monitor code which can be invoked to retrieve encryption data as required. * src/qemu/qemu_driver.c: Add findDomainDiskEncryption, and findVolumeQcowPassphrase. Pass address of the method findVolumeQcowPassphrase into qemuMonitorOpen() * src/qemu/qemu_monitor.c: Associate a disk encryption function callback with the qemuMonitorPtr object. * src/qemu/qemu_monitor_text.c: Remove findDomainDiskEncryption and findVolumeQcowPassphrase.
-
由 Daniel P. Berrange 提交于
Introduce a new qemuDomainObjPrivate object which is used to store the private QEMU specific data associated with each virDomainObjPtr instance. This contains a single member, an instance of the new qemuMonitorPtr object which encapsulates the QEMU monitor state. The internals of the latter are private to the qemu_monitor* files, not to be shown to qemu_driver.c * src/qemu/qemu_conf.h: Definition of qemuDomainObjPrivate. * src/qemu/qemu_driver.c: Register a functions for creating and freeing qemuDomainObjPrivate instances with the domain capabilities. Remove the qemudDispatchVMEvent() watch since I/O watches are now handled by the monitor code itself. Pass a new qemuHandleMonitorEOF() callback into qemuMonitorOpen to allow notification when the monitor quits. * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Introduce the 'qemuMonitor' object. Temporarily add new APIs qemuMonitorWrite, qemuMonitorRead, qemuMonitorWaitForInput to allow text based monitor impl to perform I/O. * src/qemu/qemu_monitor_text.c: Call APIs for reading/writing to monitor instead of accessing the file handle directly.
-
由 Daniel P. Berrange 提交于
The qemu_driver.c code should not contain any code that interacts with the QEMU monitor at a low level. A previous commit moved all the command invocations out. This change moves out the code which actually opens the monitor device. * src/qemu/qemu_driver.c: Remove qemudOpenMonitor & methods called from it. * src/Makefile.am: Add qemu_monitor.{c,h} * src/qemu/qemu_monitor.h: Add qemuMonitorOpen() * src/qemu/qemu_monitor.c: All code for opening the monitor
-
由 Daniel P. Berrange 提交于
* src/util/pci.c, src/util/pci.h: Make the pciDeviceList struct opaque to callers of the API. Add accessor methods for managing devices in the list * src/qemu/qemu_driver.c: Update to use APIs instead of directly accessing pciDeviceList fields
-
由 Matthias Bolte 提交于
-
- 09 11月, 2009 1 次提交
-
-
由 Gerhard Stenzel 提交于
As it was basically unimplemented and more confusing than useful at the moment. * src/libvirt_private.syms: remove from internal symbols list * src/qemu/qemu_bridge_filter.c src/util/ebtables.c: remove code and one use of the unimplemented function
-
- 06 11月, 2009 6 次提交
-
-
由 Cole Robinson 提交于
This is what virsh already expects when printing output, and what 'man cpuset' claims to support.
-
由 Cole Robinson 提交于
-
由 Cole Robinson 提交于
Use this function in the qemu, uml, lxc, and test drivers.
-
由 Matthew Booth 提交于
* src/qemu/qemu_conf.c: Update qemudBuildCommandLineChrDevStr to use a virBuffer
-
由 Matthew Booth 提交于
* src/qemu_qemu_conf.c: Cleanup usage of virBuffer in qemudBuildCommandLine
-
由 Paolo Bonzini 提交于
* src/qemu/qemu_driver.c: in qemudDomainMigratePerform call doPeer2PeerMigrate for VIR_MIGRATE_PEER2PEER.
-
- 05 11月, 2009 3 次提交
-
-
由 Matthew Booth 提交于
allows the following to be specified in a domain: <channel type='pipe'> <source path='/tmp/guestfwd'/> <target type='guestfwd' address='10.0.2.1' port='4600'/> </channel> * proxy/Makefile.am: add network.c as dep of domain_conf.c * docs/schemas/domain.rng src/conf/domain_conf.[ch]: extend the domain schemas and the parsing/serialization side for the new construct QEmu support will add the following on the qemu command line: -chardev pipe,id=channel0,path=/tmp/guestfwd -net user,guestfwd=tcp:10.0.2.1:4600-chardev:channel0 * src/qemu/qemu_conf.c: Add argument output for channel * tests/qemuxml2(argv|xml)test.c: Add test for <channel> domain syntax
-
由 Matthew Booth 提交于
* src/qemu/qemu_conf.h: defines a new QEMUD_CMD_FLAG_CHARDEV flag * src/qemu/qemu_conf.c: parse the output for -chardev and set flag appropriately
-
由 Matthew Booth 提交于
A character device's target (it's interface in the guest) had only a single property: port. This patch is in preparation for adding targets which require other properties. Since this changes the conf type for character devices this affects a number of drivers: * src/conf/domain_conf.[ch] src/esx/esx_vmx.c src/qemu/qemu_conf.c src/qemu/qemu_driver.c src/uml/uml_conf.c src/uml/uml_driver.c src/vbox/vbox_tmpl.c src/xen/xend_internal.c src/xen/xm_internal.c: target properties are moved into a union in virDomainChrDef, and a targetType field is added to identify which union member should be used. All current code which touches a virDomainChrDef is updated both to use the new union field, and to populate targetType if necessary.
-
- 04 11月, 2009 4 次提交
-
-
由 Gerhard Stenzel 提交于
* src/qemu/qemu.conf src/qemu/qemu_conf.c src/qemu/qemu_conf.h: there is a new config type option for mac filtering * src/qemu/qemu_bridge_filter.[ch]: new module for the ebtable entry points * src/qemu/qemu_driver.c: plug the MAC filtering at the right places in the domain life cycle * src/Makefile.am po/POTFILES.in: add the new module
-
由 Cole Robinson 提交于
Pretty sure this would deadlock now that we have proper locking, so remove the code.
-
由 Cole Robinson 提交于
- Don't duplicate SystemError - Use proper error code in domain_conf - Fix a broken error call in qemu_conf - Don't use VIR_ERR_ERROR in security driver (isn't a valid code in this case)
-
由 Cole Robinson 提交于
All drivers have copy + pasted inadequate error reporting which wraps util.c:virGetHostname. Move all error reporting to this function, and improve what we report. Changes from v1: Drop the driver wrappers around virGetHostname. This means we still need to keep the new conn argument to virGetHostname, but I think it's worth it.
-
- 03 11月, 2009 7 次提交
-
-
由 Daniel Veillard 提交于
introduced on commit 9231aa7d * src/qemu/qemu_driver.c: in qemudRemoveDomainStatus fix a reference to an undefined variable buf and free up an allocated string
-
由 Chris Lalancette 提交于
When building with --disable-nls, I got a few messages like this: storage/storage_backend.c: In function 'virStorageBackendCreateQemuImg': storage/storage_backend.c:571: warning: format not a string literal and no format arguments Fix these up. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Chris Lalancette 提交于
qemudShutdownVMDaemon() calls qemudRemoveDomainStatus(), which then calls virFileDeletePID(). qemudShutdownVMDaemon() then unnecessarily calls virFileDeletePID() again. Remove this second usage of it, and also slightly refactor qemudRemoveDomainStatus() to VIR_WARN appropriate error messages. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Daniel P. Berrange 提交于
The LXC driver was mistakenly returning -1 for lxcStartup() in scenarios that are not an error. This caused the libvirtd to quit for unprivileged users. This fixes the return code of LXC driver, and also adds a "name" field to the virStateDriver struct and logging to make it easier to find these problems in the future * src/driver.h: Add a 'name' field to state driver to allow easy identification during failures * src/libvirt.c: Log name of failed driver for virStateInit failures * src/lxc/lxc_driver.c: Don't return a failure code for lxcStartup() if LXC is not available on this host, simply disable the driver. * src/network/bridge_driver.c, src/node_device/node_device_devkit.c, src/node_device/node_device_hal.c, src/opennebula/one_driver.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/secret/secret_driver.c, src/storage/storage_driver.c, src/uml/uml_driver.c, src/xen/xen_driver.c: Fill in name field in virStateDriver struct
-
由 Daniel P. Berrange 提交于
Rename virDomainIsActive to virDomainObjIsActive, and virInterfaceIsActive to virInterfaceObjIsActive and finally virNetworkIsActive to virNetworkObjIsActive. * src/conf/domain_conf.c, src/conf/domain_conf.h, src/conf/interface_conf.h, src/conf/network_conf.c, src/conf/network_conf.h, src/lxc/lxc_driver.c, src/network/bridge_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_driver.c, src/qemu/qemu_driver.c, src/test/test_driver.c, src/uml/uml_driver.c: Update for renamed APIs.
-
由 Daniel P. Berrange 提交于
Nearly all of the methods in src/util/util.h have error codes that must be checked by the caller to correct detect & report failure. Add ATTRIBUTE_RETURN_CHECK to ensure compile time validation of this * daemon/libvirtd.c: Add explicit check on return value of virAsprintf * src/conf/domain_conf.c: Add missing check on virParseMacAddr return value status & report error * src/network/bridge_driver.c: Add missing OOM check on virAsprintf and report error * src/qemu/qemu_conf.c: Add missing check on virParseMacAddr return value status & report error * src/security/security_selinux.c: Remove call to virRandomInitialize that's done in libvirt.c already * src/storage/storage_backend_logical.c: Add check & log on virRun return status * src/util/util.c: Add missing checks on virAsprintf/Run status * src/util/util.h: Annotate all methods with ATTRIBUTE_RETURN_CHECK if they return an error status code * src/vbox/vbox_tmpl.c: Add missing check on virParseMacAddr * src/xen/xm_internal.c: Add missing checks on virAsprintf * tests/qemuargv2xmltest.c: Remove bogus call to virRandomInitialize()
-
由 Daniel P. Berrange 提交于
The virDomainObjPtr object stores state about a running domain. This object is shared across all drivers so it is not appropriate to include driver specific state here. This patch adds the ability to request a blob of private data per domain object instance. The driver must provide a allocator & deallocator for this purpose THis patch abuses the virCapabilitiesPtr structure for storing the allocator/deallocator callbacks, since it is already being abused for other internal things relating to parsing. This should be moved out into a separate object at some point. * src/conf/capabilities.h: Add privateDataAllocFunc and privateDataFreeFunc fields * src/conf/domain_conf.c: Invoke the driver allocators / deallocators when creating/freeing virDomainObjPtr instances. * src/conf/domain_conf.h: Pass virCapsPtr into virDomainAssignDef to allow access to the driver specific allocator function * src/lxc/lxc_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_driver.c, src/qemu/qemu_driver.c, src/test/test_driver.c, src/uml/uml_driver.c: Update for change in virDomainAssignDef contract
-
- 29 10月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
The current virDomainObjListPtr object stores domain objects in an array. This means that to find a particular objects requires O(n) time, and more critically acquiring O(n) mutex locks. The new impl replaces the array with a virHashTable, keyed off UUID. Finding a object based on UUID is now O(1) time, and only requires a single mutex lock. Finding by name/id is unchanged in complexity. In changing this, all code which iterates over the array had to be updated to use a hash table iterator function callback. Several of the functions which were identically duplicating across all drivers were pulled into domain_conf.c * src/conf/domain_conf.h, src/conf/domain_conf.c: Change virDomainObjListPtr to use virHashTable. Add a initializer method virDomainObjListInit, and rename virDomainObjListFree to virDomainObjListDeinit, since its not actually freeing the container, only its contents. Also add some convenient methods virDomainObjListGetInactiveNames, virDomainObjListGetActiveIDs and virDomainObjListNumOfDomains which can be used to implement the correspondingly named public API entry points in drivers * src/libvirt_private.syms: Export new methods from domain_conf.h * src/lxc/lxc_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_conf.c, src/openvz/openvz_driver.c, src/qemu/qemu_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c: Update all code to deal with hash tables instead of arrays for domains
-
- 28 10月, 2009 2 次提交
-
-
由 Cole Robinson 提交于
The xen driver will generate a migration port if only a hostname is passed in the optional migrate URI, so let's do the same in qemu.
-
由 Cole Robinson 提交于
-
- 27 10月, 2009 1 次提交
-
-
由 Matthias Bolte 提交于
* src/qemu/qemu_conf.c: change the error message to refer to 'cgroup_controllers' instead of 'cgroup_device_acl'
-
- 26 10月, 2009 1 次提交
-
-
由 Chris Lalancette 提交于
Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 21 10月, 2009 1 次提交
-
-
由 Richard Jones 提交于
This adds simple support for configuring a guest with a QEMU/KVM virtual hardware watchdog device.
-
- 15 10月, 2009 1 次提交
-
-
由 Mark McLoughlin 提交于
If the the qemu and kvm binaries are the same, we don't include machine types in the kvm domain info. However, the code which refreshes the machine types info from the previous capabilities structure first looks at the kvm domain's info, finds it matches and then copies the empty machine types list over for the top-level qemu domain. That doesn't make sense, we shouldn't copy an empty machin types list. * src/qemu/qemu_conf.c: qemudGetOldMachinesFromInfo(): don't copy an empty machine types list.
-
- 14 10月, 2009 1 次提交
-
-
由 Chris Lalancette 提交于
Normally, when you migrate a domain from host A to host B, the domain on host A remains defined but shutoff and the domain on host B remains running but is a "transient". Add a new flag to virDomainMigrate() to allow the original domain to be undefined on source host A, and a new flag to virDomainMigrate() to allow the new domain to be persisted on the destination host B. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 13 10月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
The logic for running the decompression programs was broken in commit f2387093, so that for non-raw formats the decompression program was never run, and for raw formats, it tried to exec an argv[] with initial NULL in the program name. * src/qemu/qemu_driver.c: Fix logic in runing decompression program
-
- 09 10月, 2009 5 次提交
-
-
由 Daniel P. Berrange 提交于
Introduces several new public API options for migration - VIR_MIGRATE_PEER2PEER: With this flag the client only invokes the virDomainMigratePerform method, expecting the source host driver to do whatever is required to complete the entire migration process. - VIR_MIGRATE_TUNNELLED: With this flag the actual data for migration will be tunnelled over the libvirtd RPC channel. This requires that VIR_MIGRATE_PEER2PEER is also set. - virDomainMigrateToURI: This is variant of the existing virDomainMigrate method which does not require any virConnectPtr for the destination host. Given suitable driver support, this allows for all the same modes as virDomainMigrate() The URI for VIR_MIGRATE_PEER2PEER must be a valid libvirt URI. For non-p2p migration a hypervisor specific migration URI is used. virDomainMigrateToURI without a PEER2PEER flag is only support for Xen currently, and it involves XenD talking directly to XenD, no libvirtd involved at all. * include/libvirt/libvirt.h.in: Add VIR_MIGRATE_PEER2PEER flag for migration * src/libvirt_internal.h: Add feature flags for peer to peer migration (VIR_FEATURE_MIGRATE_P2P) and direct migration (VIR_MIGRATE_PEER2PEER mode) * src/libvirt.c: Implement support for VIR_MIGRATE_PEER2PEER and virDomainMigrateToURI APIs. * src/xen/xen_driver.c: Advertise support for DIRECT migration * src/xen/xend_internal.c: Add TODO item for p2p migration * src/libvirt_public.syms: Export virDomainMigrateToURI method * src/qemu/qemu_driver.c: Add support for PEER2PEER and migration, and adapt TUNNELLED migration. * tools/virsh.c: Add --p2p and --direct args and use the new virDomainMigrateToURI method where possible.
-
由 Daniel P. Berrange 提交于
Re-arrange the doTunnelMigrate method putting all non-QEMU local state setup steps first. This maximises chances of success before then starting destination QEMU for receiving incoming migration. Altogether this can reduce the number of goto cleanup labels to something more managable. * qemu/qemu_driver.c: Re-order steps in doTunnelMigrate
-
由 Daniel P. Berrange 提交于
Simplify the doTunnelMigrate code by pulling out the code for sending all tunnelled data into separate helper * qemu/qemu_driver.c: introduce doTunnelSendAll() method
-
由 Daniel P. Berrange 提交于
Simplify the doTunnelMigrate() method by pulling out the code which opens/closes the virConnectPtr object into a parent method * qemu/qemu_driver.c: Add doPeer2PeerMigrate which then calls doTunnelMigrate with dconn & dom_xml
-
由 Daniel P. Berrange 提交于
virStreamAbort is needed when the caller wishes to terminate the stream early, not when virStreamSend fails. * qemu/qemu_driver.c: Fix calling of virStreamAbort during tunnelled migration
-