- 16 5月, 2011 8 次提交
-
-
由 Daniel P. Berrange 提交于
Implement the v3 migration protocol, which has two extra steps, 'begin' on the source host and 'confirm' on the source host. All other methods also gain both input and output cookies to allow bi-directional data passing at all stages. The QEMU peer2peer migration method gains another impl to provide the v3 migration. This finally allows migration cookies to work with tunnelled migration, which is required for Spice seamless migration & the lock manager transfer * src/qemu/qemu_driver.c: Wire up migrate v3 APIs * src/qemu/qemu_migration.c, src/qemu/qemu_migration.h: Add begin & confirm methods, and peer2peer impl of v3
-
由 Daniel P. Berrange 提交于
The migration protocol has support for a 'cookie' parameter which is an opaque array of bytes as far as libvirt is concerned. Drivers may use this for passing around arbitrary extra data they might need during migration. The QEMU driver needs to do a few things: - Pass hostname/uuid to allow strict protection against localhost migration attempts - Pass SPICE/VNC server port from the target back to the source to allow seamless relocation of client sessions - Pass lock driver state from source to destination This patch introduces the basic glue for handling cookies but only includes the host/guest UUID & name. * src/libvirt_private.syms: Export virXMLParseStrHelper * src/qemu/qemu_migration.c, src/qemu/qemu_migration.h: Parsing and formatting of migration cookies * src/qemu/qemu_driver.c: Pass in cookie parameters where possible * src/remote/remote_protocol.h, src/remote/remote_protocol.x: Change cookie max length to 16384 bytes
-
由 Daniel P. Berrange 提交于
Add many version number annotations to the internal driver tables, to allow hvsupport.html to display more accurate information
-
由 Daniel P. Berrange 提交于
Change all the driver struct initializers to use the C99 style, leaving out unused fields. This will make it possible to add new APIs without changing every driver. eg change: qemudDomainResume, /* domainResume */ qemudDomainShutdown, /* domainShutdown */ NULL, /* domainReboot */ qemudDomainDestroy, /* domainDestroy */ to .domainResume = qemudDomainResume, .domainShutdown = qemudDomainShutdown, .domainDestroy = qemudDomainDestroy, And get rid of any existing C99 style initializersr which set NULL, eg change .listPools = vboxStorageListPools, .numOfDefinedPools = NULL, .listDefinedPools = NULL, .findPoolSources = NULL, .poolLookupByName = vboxStoragePoolLookupByName, to .listPools = vboxStorageListPools, .poolLookupByName = vboxStoragePoolLookupByName,
-
由 Daniel P. Berrange 提交于
Fix some driver names: s/virDrvCPUCompare/virDrvCompareCPU/ s/virDrvCPUBaseline/virDrvBaselineCPU/ s/virDrvQemuDomainMonitorCommand/virDrvDomainQemuMonitorCommand/ s/virDrvSecretNumOfSecrets/virDrvNumOfSecrets/ s/virDrvSecretListSecrets/virDrvListSecrets/ And some driver struct field names: s/getFreeMemory/nodeGetFreeMemory/
-
由 Jiri Denemark 提交于
Only in drivers which use virDomainObj, drivers that query hypervisor for domain status need to be updated separately in case their hypervisor supports this functionality. The reason is also saved into domain state XML so if a domain is not running (i.e., no state XML exists) the reason will be lost by libvirtd restart. I think this is an acceptable limitation.
-
由 Jiri Denemark 提交于
Reason is currently always set to 0 (i.e., *_UNKNOWN).
-
由 Jiri Denemark 提交于
-
- 13 5月, 2011 4 次提交
-
-
由 Cole Robinson 提交于
v2: Drop libvirt_private.syms changes v3: Adjust for new virDomainEventStateNew argument
-
由 Michal Privoznik 提交于
* src/qemu/qemu_driver.c: new qemuDomainScreenshot() function * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h, src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Monitor command
-
由 Michal Privoznik 提交于
This is needed if we want to transfer a temporary file. If the transfer is done with iohelper, we might run into a race condition, where we unlink() file before iohelper is executed. * src/fdstream.c, src/fdstream.h, src/util/iohelper.c: Add new option * src/lxc/lxc_driver.c, src/qemu/qemu_driver.c, src/storage/storage_driver.c, src/uml/uml_driver.c, src/xen/xen_driver.c: Expand existing function calls
-
由 Michal Privoznik 提交于
* src/driver.h: Stub code for new API * src/esx/esx_driver.c, src/libxl/libxl_driver.c, src/lxc/lxc_driver.c, src/openvz/openvz_driver.c, src/phyp/phyp_driver.c, src/qemu/qemu_driver.c, rc/remote/remote_driver.c, rc/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/vmware/vmware_driver.c, src/xen/xen_driver.c, src/xen/xen_driver.h, src/xen/xen_hypervisor.c, src/xen/xen_inotify.c, src/xen/xend_internal.c, src/xen/xm_internal.c, src/xen/xs_internal.c, src/xenapi/xenapi_driver.c: Add dummy entries in driver table for new APIs
-
- 12 5月, 2011 2 次提交
-
-
由 Eric Blake 提交于
We were 31/73 on whether to translate; since less than 50% translated and since VIR_INFO is less than VIR_WARN which also doesn't translate, this makes sense. * cfg.mk (sc_prohibit_gettext_markup): Add VIR_INFO, since it falls between WARN and DEBUG. * daemon/libvirtd.c (qemudDispatchSignalEvent, remoteCheckAccess) (qemudDispatchServer): Adjust offenders. * daemon/remote.c (remoteDispatchAuthPolkit): Likewise. * src/network/bridge_driver.c (networkReloadIptablesRules) (networkStartNetworkDaemon, networkShutdownNetworkDaemon) (networkCreate, networkDefine, networkUndefine): Likewise. * src/qemu/qemu_driver.c (qemudDomainDefine) (qemudDomainUndefine): Likewise. * src/storage/storage_driver.c (storagePoolCreate) (storagePoolDefine, storagePoolUndefine, storagePoolStart) (storagePoolDestroy, storagePoolDelete, storageVolumeCreateXML) (storageVolumeCreateXMLFrom, storageVolumeDelete): Likewise. * src/util/bridge.c (brProbeVnetHdr): Likewise. * po/POTFILES.in: Drop src/util/bridge.c.
-
由 Lai Jiangshan 提交于
These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead. How do these coversions works? The magic is using the gcc extension of ##. When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to avoid compile error. example: origin after CPP high_level_api("%d", a_int) low_level_api("%d", a_int) high_level_api("a string") low_level_api("a string") About 400 conversions. 8 special conversions: VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal) (for security) 6 conversions Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
- 11 5月, 2011 4 次提交
-
-
由 Daniel P. Berrange 提交于
Introduce a virProcessKill function that can be safely called even when the job mutex is held. This allows virDomainDestroy to kill any VM even if it is asleep in a monitor job. The PID will die and the thread asleep on the monitor will then wake up releasing the job mutex. * src/qemu/qemu_driver.c: Kill process before using qemuProcessStop to ensure job is released * src/qemu/qemu_process.c: Add virProcessKill for killing off QEMU processes
-
由 Matthias Bolte 提交于
This matches the public API and helps to get rid of some special case code in the remote generator. Rename driver API functions and XDR protocol structs. No functional change included outside of the remote generator.
-
由 Lai Jiangshan 提交于
-
由 Lai Jiangshan 提交于
-
- 06 5月, 2011 2 次提交
-
-
由 Daniel P. Berrange 提交于
As well as taint warnings going to the main libvirt log, add taint warnings to the per-domain logfile Domain id=3 is tainted: high-privileges Domain id=3 is tainted: disk-probing Domain id=3 is tainted: shell-scripts Domain id=3 is tainted: custom-monitor * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h: Enhance qemuDomainTaint to also log to the domain logfile * src/qemu/qemu_driver.c: Pass -1 for logFD to taint methods to auto-append to logfile * src/qemu/qemu_process.c: Pass open logFD at startup for taint methods
-
由 Daniel P. Berrange 提交于
Wire up logging of VM tainting to the QEMU driver - If running QEMU as root user/group or without capabilities being cleared - If passing custom QEMU command line args - If issuing custom QEMU monitor commands - If using a network interface config with an associated shell script - If using a disk config relying on format probing The warnings, per-VM appear in the main libvirtd logs 11:56:17.571: 10832: warning : qemuDomainObjTaint:712 : Domain id=1 name='l2' uuid=c7a3edbd-edaf-9455-926a-d65c16db1802 is tainted: high-privileges 11:56:17.571: 10832: warning : qemuDomainObjTaint:712 : Domain id=1 name='l2' uuid=c7a3edbd-edaf-9455-926a-d65c16db1802 is tainted: disk-probing The taint flags are reset when the VM is stopped. * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h: Helper APIs for logging taint warnings * src/qemu/qemu_driver.c: Log tainting with custom QEMU monitor commands and disk/net hotplug with unsupported configs * src/qemu/qemu_process.c: Log tainting at startup based on unsupported configs
-
- 05 5月, 2011 2 次提交
-
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_migration.c, src/qemu/qemu_migration.h: Remove qemuCaps parameters & use cached data * src/qemu/qemu_driver.c: Don't create & pass qemuCaps to migration methods
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_hotplug.h, src/qemu/qemu_hotplug.c: Remove qemuCaps parameters from all methods * src/qemu/qemu_driver.c: Don't create & pass qemuCaps to hotplug methods
-
- 04 5月, 2011 2 次提交
-
-
由 Eric Blake 提交于
Clang 2.8 wasn't quite able to follow that persistentDef was assigned earlier if (flags & VIR_DOMAIN_MEM_CONFIG) is true. Silence this false positive, to make clang analysis easier to use. * src/qemu/qemu_driver.c (qemudDomainSetMemoryFlags): Add an annotation to silence clang's claim of a NULL dereference.
-
由 Eric Blake 提交于
This code has had problems historically. As originally written, in commit 6bcf2501 (Jun 08), it could call unlink on a random string, nuking an unrelated file. Then commit 182a80b9 (Sep 09), the code was rewritten to allocate tmp, with both a use-after-free bug and a chance to call unlink(NULL). Commit e206946d (Mar 11) fixed the use-after-free, but not the NULL dereference. Thanks to clang for catching this! * src/qemu/qemu_driver.c (qemudDomainMemoryPeek): Don't call unlink on NULL.
-
- 02 5月, 2011 1 次提交
-
-
由 Christophe Fergeau 提交于
This commit fixes qemu/qemu_driver.c: In function 'qemuDomainModifyDeviceFlags': qemu/qemu_driver.c:4041:8: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] qemu/qemu_driver.c:4013:9: note: 'ret' was declared here The variable is set to -1 so that the error paths are taken when the code to set it didn't get a chance to run. Without initializing it, we could return some an undefined value from this function. While I was at it, I made a trivial whitespace change in the same function to improve readability.
-
- 30 4月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 29 4月, 2011 1 次提交
-
-
由 KAMEZAWA Hiroyuki 提交于
Support update of disks by MODIFY_CONFIG This patch includes changes for qemu's disk to support virDomainUpdateDeviceFlags() with VIR_DOMAIN_DEVICE_MODIFY_CONFIG. This patch adds support for CDROM/foppy disk types. Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> * src/qemu/qemu_driver.c (qemuDomainUpdateDeviceConfig): support cdrom/floppy.
-
- 28 4月, 2011 2 次提交
-
-
由 KAMEZAWA Hiroyuki 提交于
Support changes of disks by MODIFY_CONFIG for qemu. This patch includes patches for qemu's disk to support virDomainAt(De)tachDeviceFlags with VIR_DOMAIN_DEVICE_MODIFY_CONFIG. Other devices can be added incrementally. Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> * /src/conf/domain_conf.c (virDomainDiskIndexByName): returns array index of disk in vmdef. (virDomainDiskRemoveByName): removes a disk which has the name in vmdef. * src/qemu/qemu_driver.c (qemuDomainAttachDeviceConfig): add support for Disks. (qemuDomainDetachDeviceConfig): add support for Disks.
-
由 KAMEZAWA Hiroyuki 提交于
This patch adds functions for modify domain's persistent definition. To do error recovery in easy way, we use a copy of vmdef and update it. The whole sequence will be: make a copy of domain definition. if (flags & MODIFY_CONFIG) update copied domain definition if (flags & MODIF_LIVE) do hotplug. if (no error) save copied one to the file and update cached definition. else discard copied definition. This patch is mixuture of Eric Blake's work and mine. From: Eric Blake <eblake@redhat.com> Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> (virDomainObjCopyPersistentDef): make a copy of persistent vm definition (qemuDomainAttach/Detach/UpdateDeviceConfig) : callbacks. now empty (qemuDomainModifyDeviceFlags): add support for MODIFY_CONFIG and MODIFY_CURRENT
-
- 26 4月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 22 4月, 2011 3 次提交
-
-
由 KAMEZAWA Hiroyuki 提交于
This patch strips reusable part of qemuDomainUpdateDeviceFlags() and consolidate it to qemuDomainModifyDeviceFlags(). No functional changes. * src/qemu/qemu_driver.c (qemuDomainChangeDiskMediaLive) : pulled out code for updating disks. (qemuDomainUpdateDeviceLive) : core of UpdateDevice, extracted from UpdateDeviceFlags() (qemuDomainModifyDeviceFlags): add support for updating device in live domain. (qemuDomainUpdateDeviceFlags): reworked as a wrapper function of qemuDomainModifyDeviceFlags() Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 KAMEZAWA Hiroyuki 提交于
clean up At(De)tachDeviceFlags() for consolidation. qemuDomainAttachDeviceFlags()/qemuDomainDetachFlags()/ qemuDomainUpdateDeviceFlags() has similar logics and copied codes. This patch series tries to unify them to use shared code when it can. At first, clean up At(De)tachDeviceFlags() and devide it into functions. By this, this patch pulls out shared components between functions. Based on patch series by Eric Blake, I added some modification as switch-case with QEMU_DEVICE_ATTACH, QEMU_DEVICE_DETACH, QEMU_DEVICE_UPDATE * src/qemu/qemu_driver.c (qemuDomainAt(De)tachDeviceFlags) : pulled out to qemuDomainModifyDeviceFlags() (qemuDomainModifyDeviceFlags) : implements generic code for modifying domain. (qemuDomainAt(De)tachDeviceFlagsLive) : code for at(de)taching devices to domain in line. no changes in logic from old code. (qemuDomainAt(De)tachDeviceDiskLive) : for at(de)taching Disks. (qemuDomainAt(De)tachDeviceControllerLive) : for at(de)taching Controllers Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 KAMEZAWA Hiroyuki 提交于
Centralize device modification in the more flexible APIs, to allow future honoring of additional flags. Explicitly reject the VIR_DOMAIN_DEVICE_MODIFY_FORCE flag on attach/detach. Based on Eric Blake<eblake@redhat.com>'s work. * src/qemu/qemu_driver.c (qemudDomainAttachDevice)(qemudDomainAttachDeviceFlags): Swap bodies,rename... (qemudDomainDetachDevice, qemudDomainDetachDeviceFlags): Likewise. Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 18 4月, 2011 2 次提交
-
-
由 Wen Congyang 提交于
This patch does the following two things: 1. hold an extra reference while handling watchdog event If the domain is not persistent, and qemu quits unexpectedly before calling processWatchdogEvent(), vm will be freed and the function processWatchdogEvent() will be dangerous. 2. unlock qemu driver and vm before returning from processWatchdogEvent() When the function processWatchdogEvent() failed, we only free wdEvent, but forget to unlock qemu driver and vm, free dumpfile.
-
由 Wen Congyang 提交于
We do not lock qemu_driver when calling virThreadPoolNew(). If it failed, we will unlock qemu_driver. It is dangerous. We may use this pool during auto starting domains. So we must create it before calling qemuAutostartDomains(). Otherwise, libvirtd will crash.
-
- 15 4月, 2011 1 次提交
-
-
由 Stefan Berger 提交于
This patch enables the migration of Qemu VMs between hosts of different endianess. I tested this by migrating a i686 VM between a x86 and ppc64 host. I am converting the 'int's in the VM's state header to uint32_t assuming this doesn't break compatibility with existing deployments other than Linux.
-
- 14 4月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The methods qemuDomain{Get,Set}{Memory,Blkio,Scheduler}Parameters all forgot to do a check on virDomainIsActive(), resulting in bogus error messages from later parts of their impl * src/qemu/qemu_driver.c: Add missing checks on virDomainIsActive()
-
- 09 4月, 2011 1 次提交
-
-
由 Taku Izumi 提交于
This patch implements the code to support virDomainSetMaxMemory API, and to support VIR_DOMAIN_MEM_MAXIMUM flag in qemudDomainSetMemoryFlags function. As a result, we can change the maximum memory size of inactive QEMU guests. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
- 08 4月, 2011 2 次提交
-
-
由 Eric Blake 提交于
* tools/virsh.pod: Fix grammar, and clarify wording. * src/qemu/qemu_driver.c (qemudDomainObjStart): Drop redundant condition.
-
由 Taku Izumi 提交于
This patch adds virDomainSetMemoryFlags(,,VIR_DOMAIN_MEM_CURRENT) support code to qemu driver. Also, change virDomainObjIsActive to return bool, given its usage. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-