- 25 1月, 2011 1 次提交
-
-
由 Cole Robinson 提交于
In QEMU, the card itself is a PCI device, but it requires a codec (either -device hda-output or -device hda-duplex) to actually output sound. Specifying <sound model='ich6'/> gives us -device intel-hda -device hda-duplex I think it's important that a simple <sound model='ich6'/> sets up a useful codec, to have consistent behavior with all other sound cards. This is basically Dan's proposal of <sound model='ich6'> <codec type='output' slot='0'/> <codec type='duplex' slot='3'/> </sound> without the codec bits implemented. The important thing is to keep a consistent API here, we don't want some <sound> devs require tweaking codecs but not others. Steps I see to accomplishing this: - every <sound> device has a <codec type='default'/> (unless codecs are manually specified) - <codec type='none'/> is required to specify 'no codecs' - new audio settings like mic=on|off could then be exposed in <sound> or <codec> in a consistent manner for all sound models v2: Use model='ich6' v3: Use feature detection, from eblake Set codec id, bus, and cad values v4: intel-hda isn't supported if -device isn't available v5: Comment spelling fixes
-
- 22 1月, 2011 8 次提交
-
-
由 Cole Robinson 提交于
- Add augeas tests - Clarify vnc_auto_unix_socket precedence in qemu.conf
-
由 Cole Robinson 提交于
If vnc_auto_unix_socket is enabled, any VNC devices without a hardcoded listen or socket value will be setup to serve over a unix socket in /var/lib/libvirt/qemu/$vmname.vnc. We store the generated socket path in the transient VM definition at CLI build time.
-
由 Cole Robinson 提交于
QEMU supports serving VNC over a unix domain socket rather than traditional TCP host/port. This is specified with: <graphics type='vnc' socket='/foo/bar/baz'/> This provides better security access control than VNC listening on 127.0.0.1, but will cause issues with tools that rely on the lax security (virt-manager in fedora runs as regular user by default, and wouldn't be able to access a socket owned by 'qemu' or 'root'). Also not currently supported by any clients, though I have patches for virt-manager, and virt-viewer should be simple to update. v2: schema: Make listen vs. socket a <choice>
-
由 Cole Robinson 提交于
This will allow us to record transient runtime state in vm->def, like default VNC parameters. Accomplish this by adding an extra 'live' parameter to SetDefTransient, with similar semantics to the 'live' flag for AssignDef.
-
由 Jim Fehlig 提交于
When restoring a saved qemu instance via JSON monitor, the vm is left in a paused state. Turns out the 'cont' cmd was failing with "MigrationExpected" error class and "An incoming migration is expected before this command can be executed" error description due to migration (restore) not yet complete. Detect if 'cont' cmd fails with "MigrationExpecte" error class and retry 'cont' cmd. V2: Fix potential double-free noted by Laine Stump
-
由 Osier Yang 提交于
Report VIR_ERR_CONFIG_UNSUPPORTED instead of VIR_ERR_INTERNAL_ERROR, as it's valid in our domain schema, just unsupported by hypervisor here. * src/qemu/qemu_command.c
-
由 Daniel P. Berrange 提交于
The code which set VNC passwords correctly had fallback for the set_password command, but was lacking it for the expire_password command. This made it impossible to start a guest. It also failed to check whether QEMU was still running after the initial 'set_password' command completed * src/qemu/qemu_hotplug.c: Fix error handling when password expiry fails * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_text.c: Fix return code for missing expire_password command
-
由 Daniel P. Berrange 提交于
Avoid overwriting the real error message with a generic OOM failure message, when machine type probe fails * src/qemu/qemu_driver.c: Don't overwrite error
-
- 21 1月, 2011 1 次提交
-
-
由 Wen Congyang 提交于
The function virUnrefConnect() may call virReleaseConnect() to release the dest connection, and the function virReleaseConnect() will call conn->driver->close(). So the function virUnrefConnect() should be surrounded by qemuDomainObjEnterRemoteWithDriver() and qemuDomainObjExitRemoteWithDriver() to prevent possible deadlock between two communicating libvirt daemons. See commit f0c8e1cb for further details. Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
-
- 19 1月, 2011 5 次提交
-
-
由 Jiri Denemark 提交于
In some circumstances, libvirtd would issue two STOPPED events after it stopped a domain. This was because an EOF event can arrive after a qemu process is killed but before qemuMonitorClose() is called. qemuHandleMonitorEOF() should ignore EOF when the domain is not running. I wasn't able to reproduce this bug directly, only after adding an artificial sleep() into qemudShutdownVMDaemon().
-
由 Jiri Denemark 提交于
-
由 Matthias Bolte 提交于
VIR_ERR_OPERATION_INVALID means that the operation is not valid for the current state of the involved object.
-
由 Matthias Bolte 提交于
VIR_ERR_INVALID_* is meant for invalid pointers only.
-
由 Eric Blake 提交于
Fixes regression introduced in commit 22115181, where all qemu 0.12.x fails to start, as does qemu 0.13.x lacking the pci-assign device. Prior to 22115181, the code was just ignoring a non-zero exit status from the qemu child, but the virCommand code checked this to avoid masking any other issues, which means the real bug of provoking non-zero exit status has been latent for a longer time. * src/qemu/qemu_capabilities.c (qemuCapsExtractVersionInfo): Check for -device driver,? support. (qemuCapsExtractDeviceStr): Avoid failure if all probed devices are unsupported. Reported by Ken Congyang.
-
- 18 1月, 2011 2 次提交
-
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=620363 When using -incoming stdio or -incoming exec:, qemu keeps the stdin fd open long after the migration is complete. Not to mention that exec:cat is horribly inefficient, by doubling the I/O and going through a popen interface in qemu. The new -incoming fd: of qemu 0.12.0 closes the fd after using it, and allows us to bypass an intermediary cat process for less I/O. * src/qemu/qemu_command.h (qemuBuildCommandLine): Add parameter. * src/qemu/qemu_command.c (qemuBuildCommandLine): Support migration via fd: when possible. Consolidate migration handling into one spot, now that it is more complex. * src/qemu/qemu_driver.c (qemudStartVMDaemon): Update caller. * tests/qemuxml2argvtest.c (mymain): Likewise. * tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.args: New file. * tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml: Likewise.
-
由 Jiri Denemark 提交于
Support for this is included in qemu and seabios from upstream git.
-
- 15 1月, 2011 7 次提交
-
-
由 Nikunj A. Dadhania 提交于
Display or set unlimited values for memory parameters. Unlimited is represented by INT64_MAX in memory cgroup. Signed-off-by: NNikunj A. Dadhania <nikunj@linux.vnet.ibm.com> Reported-by: NJustin Clift <jclift@redhat.com>
-
由 Laine Stump 提交于
This is in response to a request in: https://bugzilla.redhat.com/show_bug.cgi?id=665293 In short, under heavy load, it's possible for qemu's networking to lock up due to the tap device's default 1MB sndbuf being inadequate. adding "sndbuf=0" to the qemu commandline -netdevice option will alleviate this problem (sndbuf=0 actually sets it to 0xffffffff). Because we must be able to explicitly specify "0" as a value, the standard practice of "0 means not specified" won't work here. Instead, virDomainNetDef also has a sndbuf_specified, which defaults to 0, but is set to 1 if some value was given. The sndbuf value is put inside a <tune> element of each <interface> in the domain. The intent is that further tunable settings will also be placed inside this element. <interface type='network'> ... <tune> <sndbuf>0</sndbuf> ... </tune> </interface>
-
由 Laine Stump 提交于
This patch is in response to https://bugzilla.redhat.com/show_bug.cgi?id=643050 The existing libvirt support for the vhost-net backend to the virtio network driver happens automatically - if the vhost-net device is available, it is always enabled, otherwise the standard userland virtio backend is used. This patch makes it possible to force whether or not vhost-net is used with a bit of XML. Adding a <driver> element to the interface XML, eg: <interface type="network"> <model type="virtio"/> <driver name="vhost"/> will force use of vhost-net (if it's not available, the domain will fail to start). if driver name="qemu", vhost-net will not be used even if it is available. If there is no <driver name='xxx'/> in the config, libvirt will revert to the pre-existing automatic behavior - use vhost-net if it's available, and userland backend if vhost-net isn't available.
-
由 Marc-André Lureau 提交于
We try to use that command first when setting a VNC/SPICE password. If that doesn't work we fallback to the legacy VNC only password Allow an expiry time to be set, if that doesn't work, throw an error if they try to use SPICE. Change since v1: - moved qemuInitGraphicsPasswords to qemu_hotplug, renamed to qemuDomainChangeGraphicsPasswords. - updated what looks like a typo (that appears to work anyway) in initial patch from Daniel: - ret = qemuInitGraphicsPasswords(driver, vm, - VIR_DOMAIN_GRAPHICS_TYPE_SPICE, - &vm->def->graphics[0]->data.vnc.auth, - driver->vncPassword); + ret = qemuInitGraphicsPasswords(driver, vm, + VIR_DOMAIN_GRAPHICS_TYPE_SPICE, + &vm->def->graphics[0]->data.spice.auth, + driver->spicePassword); Based on patch by Daniel P. Berrange <berrange@redhat.com>.
-
由 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 1 次提交
-
-
由 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
-