- 15 1月, 2011 3 次提交
-
-
由 Marc-André Lureau 提交于
-
由 Eric Blake 提交于
* src/conf/domain_conf.h (virDomainChrDeviceType): Drop monitor. * src/conf/domain_conf.c (virDomainChrDevice) (virDomainChrDefParseTargetXML, virDomainChrDefFormat): Drop monitor support. * src/qemu/qemu_command.h (qemuBuildCommandLine): Alter signature. * src/qemu/qemu_monitor.h (qemuMonitorOpen): Likewise. * src/qemu/qemu_domain.h (_qemuDomainObjPrivate): Change type of monConfig. * src/qemu/qemu_domain.c (qemuDomainObjPrivateFree) (qemuDomainObjPrivateXMLFormat, qemuDomainObjPrivateXMLParse): Adjust to type change. * src/qemu/qemu_command.c (qemuBuildCommandLine): Likewise. * src/qemu/qemu_driver.c (qemuPrepareMonitorChr) (qemudStartVMDaemon, qemuDomainXMLToNative, qemuConnectMonitor) (qemudShutdownVMDaemon): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise. * src/qemu/qemu_monitor.c (qemuMonitorOpen): Likewise. * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Likewise.
-
由 Eric Blake 提交于
This opens up the possibility of reusing the smaller ChrSourceDef for both qemu monitor and a passthrough smartcard device. * src/conf/domain_conf.h (_virDomainChrDef): Factor host details... (_virDomainChrSourceDef): ...into new struct. (virDomainChrSourceDefFree): New prototype. * src/conf/domain_conf.c (virDomainChrDefFree) (virDomainChrDefParseXML, virDomainChrDefFormat): Split... (virDomainChrSourceDefClear, virDomainChrSourceDefFree) (virDomainChrSourceDefParseXML, virDomainChrSourceDefFormat): ...into new functions. (virDomainChrDefParseTargetXML): Update clients to reflect type split. * src/vmx/vmx.c (virVMXParseSerial, virVMXParseParallel) (virVMXFormatSerial, virVMXFormatParallel): Likewise. * src/xen/xen_driver.c (xenUnifiedDomainOpenConsole): Likewise. * src/xen/xend_internal.c (xenDaemonParseSxprChar) (xenDaemonFormatSxprChr): Likewise. * src/vbox/vbox_tmpl.c (vboxDomainDumpXML, vboxAttachSerial) (vboxAttachParallel): Likewise. * src/security/security_dac.c (virSecurityDACSetChardevLabel) (virSecurityDACSetChardevCallback) (virSecurityDACRestoreChardevLabel) (virSecurityDACRestoreChardevCallback): Likewise. * src/security/security_selinux.c (SELinuxSetSecurityChardevLabel) (SELinuxSetSecurityChardevCallback) (SELinuxRestoreSecurityChardevLabel) (SELinuxSetSecurityChardevCallback): Likewise. * src/security/virt-aa-helper.c (get_files): Likewise. * src/lxc/lxc_driver.c (lxcVmStart, lxcDomainOpenConsole): Likewise. * src/uml/uml_conf.c (umlBuildCommandLineChr): Likewise. * src/uml/uml_driver.c (umlIdentifyOneChrPTY, umlIdentifyChrPTY) (umlDomainOpenConsole): Likewise. * src/qemu/qemu_command.c (qemuBuildChrChardevStr) (qemuBuildChrArgStr, qemuBuildCommandLine) (qemuParseCommandLineChr): Likewise. * src/qemu/qemu_domain.c (qemuDomainObjPrivateXMLFormat) (qemuDomainObjPrivateXMLParse): Likewise. * src/qemu/qemu_cgroup.c (qemuSetupChardevCgroup): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise. * src/qemu/qemu_driver.c (qemudFindCharDevicePTYsMonitor) (qemudFindCharDevicePTYs, qemuPrepareChardevDevice) (qemuPrepareMonitorChr, qemudShutdownVMDaemon) (qemuDomainOpenConsole): Likewise. * src/qemu/qemu_command.h (qemuBuildChrChardevStr) (qemuBuildChrArgStr): Delete, now that they are static. * src/libvirt_private.syms (domain_conf.h): New exports. * cfg.mk (useless_free_options): Update list. * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Update tests.
-
- 14 1月, 2011 2 次提交
-
-
由 Eric Blake 提交于
* src/qemu/qemu_capabilities.h (qemuCapsParseDeviceStr): New prototype. * src/qemu/qemu_capabilities.c (qemuCapsParsePCIDeviceStrs) Rename and split... (qemuCapsExtractDeviceStr, qemuCapsParseDeviceStr): ...to make it easier to add and test device-specific checks. (qemuCapsExtractVersionInfo): Update caller. * tests/qemuhelptest.c (testHelpStrParsing): Also test parsing of device-related flags. (mymain): Update expected flags. * tests/qemuhelpdata/qemu-0.12.1-device: New file. * tests/qemuhelpdata/qemu-kvm-0.12.1.2-rhel60-device: New file. * tests/qemuhelpdata/qemu-kvm-0.12.3-device: New file. * tests/qemuhelpdata/qemu-kvm-0.13.0-device: New file.
-
由 Eric Blake 提交于
* src/qemu/qemu_capabilities.c (qemuCapsProbeMachineTypes) (qemuCapsProbeCPUModels, qemuCapsParsePCIDeviceStrs) (qemuCapsExtractVersionInfo): Use virCommand rather than virExec.
-
- 13 1月, 2011 1 次提交
-
-
由 Osier Yang 提交于
If the emulator doesn't support SDL graphic, we should reject the use of SDL graphic xml with error messages, but not ignore it silently, and pretend things are fine. "-sdl" flag was exposed explicitly by qemu since 0.10.0, more detail: http://www.redhat.com/archives/libvir-list/2011-January/msg00442.html And we already have capability flag "QEMUD_CMD_FLAG_0_10", which could be used to prevent the patch affecting the older versions of QEMU. * src/qemu/qemu_command.c
-
- 11 1月, 2011 2 次提交
-
-
由 Richard W.M. Jones 提交于
Skip IB700 when assigning PCI slots. Note: the I6300ESB watchdog _is_ a PCI device. To test this: I applied this patch to libvirt-0.8.3-2.fc14 (rebasing it slightly: qemu_command.c didn't exist in that version) and installed this on my machine, then tested that I could successfully add an ib700 watchdog device to a guest, start the guest, and the ib700 was available to the guest. I also added an i6300esb (PCI) watchdog to another guest, and verified that libvirt assigned a PCI device to it, that the guest could be started, and that i6300esb was present in the guest. Note that if you previously had a domain with a ib700 watchdog, it would have had an <address type='pci' .../> clause added to it in the libvirt configuration. This patch does not attempt to remove this. You cannot start such a domain -- qemu gives an error if you try. With this patch you are able to remove the bogus address element without libvirt adding it back. Signed-off-by: NRichard W.M. Jones <rjones@redhat.com>
-
由 Daniel P. Berrange 提交于
The current security driver usage requires horrible code like if (driver->securityDriver && driver->securityDriver->domainSetSecurityHostdevLabel && driver->securityDriver->domainSetSecurityHostdevLabel(driver->securityDriver, vm, hostdev) < 0) This pair of checks for NULL clutters up the code, making the driver calls 2 lines longer than they really need to be. The goal of the patchset is to change the calling convention to simply if (virSecurityManagerSetHostdevLabel(driver->securityDriver, vm, hostdev) < 0) The first check for 'driver->securityDriver' being NULL is removed by introducing a 'no op' security driver that will always be present if no real driver is enabled. This guarentees driver->securityDriver != NULL. The second check for 'driver->securityDriver->domainSetSecurityHostdevLabel' being non-NULL is hidden in a new abstraction called virSecurityManager. This separates the driver callbacks, from main internal API. The addition of a virSecurityManager object, that is separate from the virSecurityDriver struct also allows for security drivers to carry state / configuration information directly. Thus the DAC/Stack drivers from src/qemu which used to pull config from 'struct qemud_driver' can now be moved into the 'src/security' directory and store their config directly. * src/qemu/qemu_conf.h, src/qemu/qemu_driver.c: Update to use new virSecurityManager APIs * src/qemu/qemu_security_dac.c, src/qemu/qemu_security_dac.h src/qemu/qemu_security_stacked.c, src/qemu/qemu_security_stacked.h: Move into src/security directory * src/security/security_stack.c, src/security/security_stack.h, src/security/security_dac.c, src/security/security_dac.h: Generic versions of previous QEMU specific drivers * src/security/security_apparmor.c, src/security/security_apparmor.h, src/security/security_driver.c, src/security/security_driver.h, src/security/security_selinux.c, src/security/security_selinux.h: Update to take virSecurityManagerPtr object as the first param in all callbacks * src/security/security_nop.c, src/security/security_nop.h: Stub implementation of all security driver APIs. * src/security/security_manager.h, src/security/security_manager.c: New internal API for invoking security drivers * src/libvirt.c: Add missing debug for security APIs
-
- 06 1月, 2011 2 次提交
-
-
由 Jiri Denemark 提交于
The warning is bogus since strtok_r doesn't use the value when it's first called and initializes it for the following calls.
-
由 Laine Stump 提交于
When dynamic_ownership=0, saved images must be owned by the same uid as is used to run the qemu process, otherwise restore won't work. To accomplish this, qemuSecurityDACRestoreSavedStateLabel() needs to simply return when it's called. This fix is in response to: https://bugzilla.redhat.com/show_bug.cgi?id=661720
-
- 05 1月, 2011 1 次提交
-
-
由 Stefan Berger 提交于
While doing some testing with Qemu and creating huge logfiles I encountered the case where the VM could not start anymore due to the lseek() to the end of the Qemu VM's log file failing. The patch below fixes the problem by replacing the previously used 'int' with 'off_t'. To reproduce this error, you could do the following: dd if=/dev/zero of=/var/log/libvirt/qemu/<name of VM>.log bs=1024 count=$((1024*2048)) and you should get an error like this: error: Failed to start domain <name of VM> error: Unable to seek to -2147482651 in /var/log/libvirt/qemu/<name of VM>.log: Success
-
- 24 12月, 2010 2 次提交
-
-
由 Eric Blake 提交于
* src/qemu/qemu_capabilities.h (QEMUD_CMD_FLAG_MIGRATE_QEMU_FD): New enum value. * src/qemu/qemu_capabilities.c (qemuCapsComputeCmdFlags): Populate flags according to qemu version. * tests/qemuhelptest.c (mymain): Adjust test.
-
由 Laine Stump 提交于
This patch fixes https://bugzilla.redhat.com/show_bug.cgi?id=664406 If qemu is run as a different uid, it has been unable to access mode 0660 files that are owned by a different user, but with a group that the qemu is a member of (aside from the one group listed in the passwd file), because initgroups() is not being called prior to the exec. initgroups will change the group membership of the process (and its children) to match the new uid. To make this happen, the setregid()/setreuid() code in qemuSecurityDACSetProcessLabel has been replaced with a call to virSetUIDGID(), which does both of those, plus calls initgroups. Similar, but not identical, code in qemudOpenAsUID() has been replaced with virSetUIDGID(). This not only consolidates the functionality to a single location, but also potentially fixes some as-yet unreported bugs.
-
- 23 12月, 2010 2 次提交
-
-
由 Matthias Bolte 提交于
Shorten qemuDomainSnapshotWriteSnapshotMetadata function name and make it take a snapshot pointer instead of dealing with the current snapshot. Update other functions accordingly. Add a qemuDomainSnapshotReparentChildren hash iterator to reparent the children of a snapshot that is being deleted. Use qemuDomainSnapshotWriteMetadata to write updated metadata to disk. This fixes a problem where outdated parent information breaks the snapshot tree and hinders the deletion of child snapshots. Reported by Philipp Hahn.
-
由 Jiri Denemark 提交于
Commit ed0d9f6c added support for automatic port allocation for SPICE but forgot to mark such ports as unused when they are not used anymore.
-
- 22 12月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* daemon/Makefile.am: Avoid spurious space before tabs. * src/Makefile.am: Likewise. * examples/dominfo/Makefile.am: Likewise. * examples/domsuspend/Makefile.am: Likewise. * tools/Makefile.am: Likewise. * src/datatypes.h (VIR_CONNECT_MAGIC): Likewise. * src/internal.h (TODO): Likewise. * src/qemu/qemu_monitor.h (QEMU_MONITOR_MIGRATE): Likewise. * src/xen/xen_hypervisor.c (XEN_V2_OP_GETAVAILHEAP): Likewise. * src/xen/xs_internal.h: Likewise.
-
- 21 12月, 2010 2 次提交
-
-
由 Josh Durgin 提交于
Network disks are accessed by qemu directly, and have no associated file on the host, so checking for file ownership etc. is unnecessary. Signed-off-by: NJosh Durgin <joshd@hq.newdream.net>
-
由 Eric Blake 提交于
* src/qemu/qemu_driver.c (qemudLogFD, qemudLogReadFD) (qemudStartup, qemudGetProcessInfo): Use heap instead of stack.
-
- 17 12月, 2010 9 次提交
-
-
由 Daniel P. Berrange 提交于
The QEMU driver file is far too large. Move all the hotplug helper code out into a separate file. No functional change. * src/qemu/qemu_hotplug.c, src/qemu/qemu_hotplug.h, src/Makefile.am: Add hotplug helper file * src/qemu/qemu_driver.c: Delete hotplug code
-
由 Daniel P. Berrange 提交于
To allow the APIs to be used from separate files, move the domain lock / job helper code into qemu_domain.c * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h: Add domain lock / job code * src/qemu/qemu_driver.c: Remove domain lock / job code
-
由 Daniel P. Berrange 提交于
To allow their use from other source files, move qemuDriverLock and qemuDriverUnlock to qemu_conf.h and make them non-static * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Add qemuDriverLock qemuDriverUnlock * src/qemu/qemu_driver.c: Remove qemuDriverLock and qemuDriverUnlock
-
由 Daniel P. Berrange 提交于
The QEMU driver file is far too large. Move all the hostdev helper code out into a separate file. No functional change. * src/qemu/qemu_hostdev.c, src/qemu/qemu_hostdev.h, src/Makefile.am: Add hostdev helper file * src/qemu/qemu_driver.c: Delete hostdev code
-
由 Daniel P. Berrange 提交于
The QEMU driver file is far too large. Move all the cgroup helper code out into a separate file. No functional change. * src/qemu/qemu_cgroup.c, src/qemu/qemu_cgroup.h, src/Makefile.am: Add cgroup helper file * src/qemu/qemu_driver.c: Delete cgroup code
-
由 Daniel P. Berrange 提交于
The QEMU driver file is far too large. Move all the audit helper code out into a separate file. No functional change. * src/qemu/qemu_audit.c, src/qemu/qemu_audit.h, src/Makefile.am: Add audit helper file * src/qemu/qemu_driver.c: Delete audit code
-
由 Daniel P. Berrange 提交于
Move the code for handling the QEMU virDomainObjPtr private data, and custom XML namespace into a separate file * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h: New file for private data & namespace code * src/qemu/qemu_driver.c, src/qemu/qemu_driver.h: Remove private data & namespace code * src/qemu/qemu_driver.h, src/qemu/qemu_command.h: Update includes * src/Makefile.am: Add src/qemu/qemu_domain.c
-
由 Daniel P. Berrange 提交于
The qemu_conf.c code is doing three jobs, driver config file loading, QEMU capabilities management and QEMU command line management. Move the command line code into its own file * src/qemu/qemu_command.c, src/qemu/qemu_command.h: New command line management code * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Delete command line code * src/qemu/qemu_conf.h, src/qemu_conf.c: Adapt for API renames * src/Makefile.am: add src/qemu/qemu_command.c * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_text.c: Add import of qemu_command.h
-
由 Daniel P. Berrange 提交于
The qemu_conf.c code is doing three jobs, driver config file loading, QEMU capabilities management and QEMU command line management. Move the capabilities code into its own file * src/qemu/qemu_capabilities.c, src/qemu/qemu_capabilities.h: New capabilities management code * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Delete capabilities code * src/qemu/qemu_conf.h: Adapt for API renames * src/Makefile.am: add src/qemu/qemu_capabilities.c
-
- 14 12月, 2010 4 次提交
-
-
由 Hu Tao 提交于
-
由 Hu Tao 提交于
-
由 Hu Tao 提交于
-
由 Osier Yang 提交于
Currently, all of domain "save/dump/managed save/migration" use the same function "qemudDomainWaitForMigrationComplete" to wait the job finished, but the error messages are all about "migration", e.g. when a domain saving job is canceled by user, "migration was cancled by client" will be throwed as an error message, which will be confused for user. As a solution, intoduce two new job types(QEMU_JOB_SAVE, QEMU_JOB_DUMP), and set "priv->jobActive" to "QEMU_JOB_SAVE" before saving, to "QEMU_JOB_DUMP" before dumping, so that we could get the real job type in "qemudDomainWaitForMigrationComplete", and give more clear message further. And as It's not important to figure out what's the exact job is in the DEBUG and WARN log, also we don't need translated string in logs, simply repace "migration" with "job" in some statements. * src/qemu/qemu_driver.c
-
- 11 12月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* src/util/command.h (virCommandAddArgBuffer) (virCommandAddEnvBuffer): New prototypes. * src/util/command.c (virCommandAddArgBuffer) (virCommandAddEnvBuffer): Implement them. * src/libvirt_private.syms (command.h): Export them. * src/qemu/qemu_conf.c (qemudBuildCommandLine): Use them, plugging a memory leak on rbd_hosts in the process.
-
- 10 12月, 2010 4 次提交
-
-
由 Josh Durgin 提交于
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: NJosh Durgin <joshd@hq.newdream.net>
-
由 MORITA Kazutaka 提交于
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: NMORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
-
由 Hu Tao 提交于
`dump' watchdog action lets libvirtd to dump the guest when receives a watchdog event (which probably means a guest crash) Currently only qemu is supported.
-
由 Hu Tao 提交于
This patch prepares for the next patch.
-
- 09 12月, 2010 3 次提交
-
-
由 Jiri Denemark 提交于
When we get an EOF event on monitor connection, it may be a result of either crash or graceful shutdown. QEMU which supports async events (i.e., we are talking to it using JSON monitor) emits SHUTDOWN event on graceful shutdown. In case we don't get this event by the time monitor connection is closed, we assume the associated domain crashed.
-
由 Ryan Harper 提交于
Currently libvirt doesn't confirm whether the guest has responded to the disk removal request. In some cases this can leave the guest with continued access to the device while the mgmt layer believes that it has been removed. With a recent qemu monitor command[1] we can deterministically revoke a guests access to the disk (on the QEMU side) to ensure no futher access is permitted. This patch adds support for the drive_del() command and introduces it in the disk removal paths. If the guest is running in a QEMU without this command we currently explicitly check for unknown command/CommandNotFound and log the issue. If QEMU supports the command we issue the drive_del command after we attempt to remove the device. The guest may respond and remove the block device before we get to attempt to call drive_del. In that case, we explicitly check for 'Device not found' from the monitor indicating that the target drive was auto-deleted upon guest responds to the device removal notification. 1. http://thread.gmane.org/gmane.comp.emulators.qemu/84745Signed-off-by: NRyan Harper <ryanh@us.ibm.com>
-
由 Ryan Harper 提交于
Currently libvirt doesn't confirm whether the guest has responded to the disk removal request. In some cases this can leave the guest with continued access to the device while the mgmt layer believes that it has been removed. With a recent qemu monitor command[1] we can deterministically revoke a guests access to the disk (on the QEMU side) to ensure no futher access is permitted. This patch adds support for the drive_unplug() command and introduces it in the disk removal paths. There is some discussion to be had about how to handle the case where the guest is running in a QEMU without this command (and the fact that we currently don't have a way of detecting what monitor commands are available). Changes since v2: - use VIR_ERROR to report when unplug command not found Changes since v1: - return > 0 when command isn't present, < 0 on command failure - detect when drive_unplug command isn't present and log error instead of failing entire command Signed-off-by: NRyan Harper <ryanh@us.ibm.com>
-
- 08 12月, 2010 1 次提交
-
-
由 Osier Yang 提交于
- qemudDomainAttachPciControllerDevice: Don't build "devstr" if "-device" of qemu is not available, as "devstr" will only be used by "qemuMonitorAddDevice", which depends on "-device" argument of qemu is supported. - "qemudDomainSaveImageOpen": Fix indent problem. * src/qemu/qemu_driver.c
-