- 05 2月, 2011 2 次提交
-
-
由 Eric Blake 提交于
qemu 0.13.0 (at least as built for Fedora 14, and also backported to RHEL 6.0 qemu) supported an older syntax for a spicevmc channel; it's not as flexible (it has an implicit name and hides the chardev aspect), but now that we support spicevmc, we might as well target both variants. * src/qemu/qemu_capabilities.h (QEMUD_CMD_FLAG_DEVICE_SPICEVMC): New flag. * src/qemu/qemu_capabilities.c (qemuCapsParseDeviceStr): Set it correctly. * src/qemu/qemu_command.h (qemuBuildVirtioSerialPortDevStr): Drop declaration. * src/qemu/qemu_command.c (qemuBuildVirtioSerialPortDevStr): Alter signature, check flag. (qemuBuildCommandLine): Adjust caller and check flag. * tests/qemuhelptest.c (mymain): Update test. * tests/qemuxml2argvtest.c (mymain): New test. * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc-old.xml: New file. * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc-old.args: Likewise.
-
由 Eric Blake 提交于
Adds <smartcard mode='passthrough' type='spicevmc'/>, which uses the new <channel name='smartcard'/> of <graphics type='spice'>. * docs/schemas/domain.rng: Support new XML. * docs/formatdomain.html.in: Document it. * src/conf/domain_conf.h (virDomainGraphicsSpiceChannelName): New enum value. (virDomainChrSpicevmcName): New enum. (virDomainChrSourceDef): Distinguish spicevmc types. * src/conf/domain_conf.c (virDomainGraphicsSpiceChannelName): Add smartcard. (virDomainSmartcardDefParseXML): Parse it. (virDomainChrDefParseXML, virDomainSmartcardDefParseXML): Set spicevmc name. (virDomainChrSpicevmc): New enum conversion functions. * src/libvirt_private.syms: Export new functions. * src/qemu/qemu_command.c (qemuBuildChrChardevStr): Conditionalize name. * tests/qemuxml2argvtest.c (domain): New test. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-spicevmc.args: New file. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-spicevmc.xml: Likewise.
-
- 04 2月, 2011 6 次提交
-
-
由 Daniel P. Berrange 提交于
Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=615757 Add a new character device backend for virtio serial channels that activates the QEMU spice agent on the main channel using the vdagent spicevmc connection. The <target> must be type='virtio', and supports an optional name that specifies how the guest will see the channel (for now, name must be com.redhat.spice.0). <channel type='spicevmc'> <target type='virtio'/> <address type='virtio-serial' controller='1' bus='0' port='3'/> </channel> * docs/schemas/domain.rng: Support new XML. * docs/formatdomain.html.in: Document it. * src/conf/domain_conf.h (virDomainChrType): New enum value. * src/conf/domain_conf.c (virDomainChr): Add spicevmc. (virDomainChrDefParseXML, virDomainChrSourceDefParseXML) (virDomainChrDefParseTargetXML): Parse and enforce proper use. (virDomainChrSourceDefFormat, virDomainChrDefFormat): Format. * src/qemu/qemu_command.c (qemuBuildChrChardevStr) (qemuBuildCommandLine): Add qemu support. * tests/qemuxml2argvtest.c (domain): New test. * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml: New file. * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.args: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
* src/qemu/qemu_command.c (qemuBuildCommandLine): Emit smartcard options. (qemuAssignDeviceAliases): Assign an alias for smartcards. (qemuBuildControllerDevStr): Manage the usb-ccid controller. * tests/qemuxml2argvtest.c (mymain): Add new tests. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-host.args: New file. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-host-certificates.args: Likewise. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough.args: Likewise. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-controller.args: Likewise.
-
由 Eric Blake 提交于
Qemu smartcard/spicevmc support exists on branches (such as http://cgit.freedesktop.org/~alon/qemu/commit/?h=usb_ccid.v15&id=024a37b) but is not yet upstream. The added -help output matches a scratch build that will be close to the RHEL 6.1 qemu-kvm. * src/qemu/qemu_capabilities.h (QEMUD_CMD_FLAG_CCID_EMULATED) (QEMUD_CMD_FLAG_CCID_PASSTHRU, QEMUD_CMD_FLAG_CHARDEV_SPICEVMC): New flags. * src/qemu/qemu_capabilities.c (qemuCapsComputeCmdFlags) (qemuCapsParseDeviceStr): Check for smartcard capabilities. (qemuCapsExtractVersionInfo): Tweak comment. * tests/qemuhelptest.c (mymain): New test. * tests/qemuhelpdata/qemu-kvm-0.12.1.2-rhel61: New file. * tests/qemuhelpdata/qemu-kvm-0.12.1.2-rhel61-device: Likewise.
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
Currently users who want to use virDomainQemuMonitorCommand() API or it's virsh equivalent has to use the same protocol as libvirt uses for communication to qemu. Since the protocol is QMP with current qemu and HMP much more usable for humans, one ends up typing something like the following: virsh qemu-monitor-command DOM \ '{"execute":"human-monitor-command","arguments":{"command-line":"info kvm"}}' which is not a very convenient way of debugging qemu. This patch introduces --hmp option to qemu-monitor-command, which says that the provided command is in HMP. If libvirt uses QMP to talk with qemu, the command will automatically be converted into QMP. So the example above is simplified to just virsh qemu-monitor-command --hmp DOM "info kvm" Also the result is converted from {"return":"kvm support: enabled\r\n"} to just plain HMP: kvm support: enabled If libvirt talks to qemu in HMP, --hmp flag is obviously a noop.
-
由 Eric Blake 提交于
* src/qemu/qemu_driver.c (qemudShutdownVMDaemon): Check that vm is still active. Reported by Wen Congyang as follows: Steps to reproduce this bug: 1. use gdb to debug libvirtd, and set breakpoint in the function qemuConnectMonitor() 2. start a vm, and the libvirtd will be stopped in qemuConnectMonitor() 3. kill -STOP $(cat /var/run/libvirt/qemu/<domain>.pid) 4. continue to run libvirtd in gdb, and libvirtd will be blocked in the function qemuMonitorSetCapabilities() 5. kill -9 $(cat /var/run/libvirt/qemu/<domain>.pid) Here is log of the qemu: ========= LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin ... char device redirected to /dev/pts/3 2011-01-27 09:38:48.101: shutting down 2011-01-27 09:41:26.401: shutting down ========= The vm is shut down twice. I do not know whether this behavior has side effect, but I think we should shutdown the vm only once.
-
- 03 2月, 2011 2 次提交
-
-
由 Eric Blake 提交于
* src/qemu/THREADS.txt: Improve documentation.
-
由 Niels de Vos 提交于
Depending if the qemu binary supports multiple pci-busses, the device options will contain "bus=pci" or "bus=pci.0". Only x86_64 and i686 seem to have support for multiple PCI-busses. When a guest of these architectures is started, set the QEMUD_CMD_FLAG_PCI_MULTIBUS flag. Signed-off-by: NNiels de Vos <ndevos@redhat.com>
-
- 01 2月, 2011 1 次提交
-
-
由 Osier Yang 提交于
Command line building for incoming tunneled migration is missed, as a result, all the tunneled migration will fail with "unknown migration protocol". * src/qemu/qemu_command.c
-
- 31 1月, 2011 2 次提交
-
-
由 Osier Yang 提交于
* src/qemu/qemu_driver.c
-
由 Wen Congyang 提交于
Bug manifests itself by: 1. # virsh attach-disk --target sdb ... 2. # virsh attach-disk --target sdh ... error: Failed to attach disk error: operation failed: target scsi:0 already exists sdh uses scsi:1, rather than scsi:0. * src/qemu/qemu_hotplug.c: properly set controller idx in qemuDomainFindOrCreateSCSIDiskController()
-
- 29 1月, 2011 4 次提交
-
-
由 Matthias Bolte 提交于
Use it in all places where a memory or storage request size is converted to a larger granularity. This avoids requesting too small memory or storage sizes that could result from the truncation done by a simple division. This extends the round up fix in 6002e040 to the whole codebase. Instead of reporting errors for odd values in the VMX code round them up. Update the QEMU Argv tests accordingly as the original memory size 219200 isn't a even multiple of 1024 and is rounded up to 215 megabyte now. Change it to 219100 and 219136. Use two different values intentionally to make sure that rounding up works. Update virsh.pod accordingly, as rounding down and rejecting are replaced by rounding up.
-
由 Eric Blake 提交于
Fixes test failure that was overlooked after commit 1e1f7a89. * daemon/Makefile.am (check-local): Let 'make check' fail on error. * daemon/test_libvirtd.aug: Move qemu-specific option... * src/qemu/test_libvirtd_qemu.aug: ...into correct test. * src/qemu/libvirtd_qemu.aug: Parse new option.
-
由 Eric Blake 提交于
qemu allows the user to choose what io storage api should be used, either the default (threads) or native (linux aio) which in the latter case can result in better performance. Based on a patch originally by Matthias Dahl. Red Hat Bugzilla #591703 Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Matthias Dahl 提交于
Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 28 1月, 2011 6 次提交
-
-
由 Daniel P. Berrange 提交于
The refactoring of QEMU command startup was comitted with a couple of VIR_WARN lines left in from debugging. * src/qemu/qemu_driver.c: Remove log warning lines
-
由 Daniel P. Berrange 提交于
When qemuMonitorSetCapabilities() fails, there is no need to call qemuMonitorClose(), because the caller will already see the error code and tear down the entire VM. The extra call to qemuMonitorClose resulted in a double-free due to it removing a ref count prematurely. * src/qemu/qemu_driver.c: Remove premature close of monitor
-
由 Eric Blake 提交于
Regression in commit caa805ea let a lot of bad messages slip in. * cfg.mk (msg_gen_function): Fix function name. * src/qemu/qemu_cgroup.c (qemuRemoveCgroup): Fix fallout from 'make syntax-check'. * src/qemu/qemu_driver.c (qemudDomainGetInfo) (qemuDomainWaitForMigrationComplete, qemudStartVMDaemon) (qemudDomainSaveFlag, qemudDomainAttachDevice) (qemuDomainUpdateDeviceFlags): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainAttachHostUsbDevice) (qemuDomainDetachPciDiskDevice, qemuDomainDetachSCSIDiskDevice): Likewise.
-
由 Hu Tao 提交于
When attaching device from a xml file and the device is mis-configured, virsh gives mis-leading message "out of memory". This patch fixes this. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
* src/qemu/qemu_command.c (qemuBuildChrChardevStr): Alter the chardev alias. (qemuBuildCommandLine): Output an id for the chardev counterpart. * tests/qemuxml2argvdata/*: Update tests to match. Reported by Daniel P. Berrange.
-
由 Wen Congyang 提交于
Steps to reproduce this bug: 1. service libvirtd start 2. virsh start <domain> 3. kill -STOP $(cat /var/run/libvirt/qemu/<domain>.pid) 4. service libvirtd restart 5. kill -9 $(cat /var/run/libvirt/qemu/<domain>.pid) Then libvirtd will core dump or be in deadlock state. Make sure that json is built into libvirt and the version of qemu is newer than 0.13.0. The reason of libvirtd cores dump is that: We add vm->refs when we alloc the memory, and decrease it in the function qemuHandleMonitorEOF() in other thread. We add vm->refs in the function qemuConnectMonitor() and decrease it when the vm is inactive. The libvirtd will block in the function qemuMonitorSetCapabilities() because the vm is stopped by signal SIGSTOP. Now the vm->refs is 2. Then we kill the vm by signal SIGKILL. The function qemuMonitorSetCapabilities() failed, and then we will decrease vm->refs in the function qemuMonitorClose(). In another thread, mon->fd is broken and the function qemuHandleMonitorEOF() is called. If qemuHandleMonitorEOF() decreases vm->refs before qemuConnectMonitor() returns, vm->refs will be decrease to 0 and the memory is freed. We will call qemudShutdownVMDaemon() as qemuConnectMonitor() failed. The memory has been freed, so qemudShutdownVMDaemon() is too dangerous. We will reference NULL pointer in the function virDomainConfVMNWFilterTeardown(): ============= void virDomainConfVMNWFilterTeardown(virDomainObjPtr vm) { int i; if (nwfilterDriver != NULL) { for (i = 0; i < vm->def->nnets; i++) virDomainConfNWFilterTeardown(vm->def->nets[i]); } } ============ vm->def->nnets is not 0 but vm->def->nets is NULL(We don't set vm->def->nnets to 0 when we free vm). We should add an extra reference of vm to avoid vm to be deleted if qemuConnectMonitor() failed. Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
-
- 26 1月, 2011 4 次提交
-
-
由 Laine Stump 提交于
If a guest image is saved in compressed format, and the restore fails in some way after the intermediate process used to uncompress the image has been started, but before qemu has been started to hook up to the uncompressor, libvirt will endlessly wait for the uncompressor to finish, but it never will because it's still waiting to have something hooked up to drain its output. The solution is to close the pipes on both sides of the uncompressor, then send a SIGTERM before calling waitpid on it (only if the restore has failed, of course).
-
由 Daniel P. Berrange 提交于
Handle poll errors in the same way as hangup event * src/qemu/qemu_monitor.c: Handle error events
-
由 Laine Stump 提交于
This patch is a partial resolution to the following bug: https://bugzilla.redhat.com/show_bug.cgi?id=667756 (to complete the fix, an updated selinux-policy package is required, to add the policy that allows libvirt to set the context of a fifo, which was previously not allowed). Explanation : When an incoming migration is over a pipe (for example, if the image was compressed and is being fed through gzip, or was on a root-squash nfs server, so needed to be opened by a child process running as a different uid), qemu cannot read it unless the selinux context label for the pipe has been set properly. The solution is to check the fd used as the source of the migration just before passing it to qemu; if it's a fifo (implying that it's a pipe), we call the newly added virSecurityManagerSetFDLabel() function to set the context properly.
-
由 Osier Yang 提交于
The problem was introduced by commit 4303c91c, which removed the checking of domain state, this patch is to fix it. Otherwise, improper error will be thrown, e.g. error: Failed to save domain rhel6 state error: cannot resolve symlink /var/lib/libvirt/qemu/save/rhel6.save: No such file or directory
-
- 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 3 次提交
-
-
由 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.
-