- 31 5月, 2013 4 次提交
-
-
由 Peter Krempa 提交于
If snapshot creation failed for example due to invalid use of the "REUSE_EXTERNAL" flag, libvirt killed access to the original image file instead of the new image file. On machines with selinux this kills the whole VM as the selinux context is enforced immediately. * qemu_driver.c:qemuDomainSnapshotUndoSingleDiskActive(): - Kill access to the new image file instead of the old one. Partially resolves: https://bugzilla.redhat.com/show_bug.cgi?id=906639
-
由 Peter Krempa 提交于
After deleting "WithDriver" from the async job function the code was unaligned.
-
由 Eric Blake 提交于
A bug in Cygwin [1] and poor error messages from gcc [2] lead to this confusing compilation error: qemu/qemu_monitor.c:418:9: error: passing argument 2 of 'sendmsg' from incmpatible pointer type /usr/include/sys/socket.h:42:11: note: expected 'const struct msghdr *' but argument is of type 'struct msghdr *' [1] http://cygwin.com/ml/cygwin/2013-05/msg00451.html [2] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57475 * src/qemu/qemu_monitor.c (includes): Include <sys/socket.h> before <sys/un.h>. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
This is a recurring problem for cygwin :) For example, see commit 23a4df88. qemu/qemu_driver.c: In function 'qemuStateInitialize': qemu/qemu_driver.c:691:13: error: format '%d' expects type 'int', but argument 8 has type 'uid_t' [-Wformat] * src/qemu/qemu_driver.c (qemuStateInitialize): Add casts. * daemon/remote.c (remoteDispatchAuthList): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 30 5月, 2013 3 次提交
-
-
由 Eric Blake 提交于
A cygwin build of the qemu driver fails with: qemu/qemu_process.c: In function 'qemuPrepareCpumap': qemu/qemu_process.c:1803:31: error: 'CPU_SETSIZE' undeclared (first use in this function) CPU_SETSIZE is a Linux extension in <sched.h>; a bit more portable is using sysconf if _SC_NPROCESSORS_CONF is defined (several platforms have it, including Cygwin). Ultimately, I would have preferred to use gnulib's 'nproc' module, but it is currently under an incompatible license. * src/qemu/qemu_conf.h (QEMUD_CPUMASK_LEN): Provide definition on cygwin. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Cole Robinson 提交于
Since as the code indicates it doesn't work yet, so let's be explicit about it.
-
由 Cole Robinson 提交于
By actually showing the Open() error to the user
-
- 29 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
Currently, if there's an error opening /dev/vhost-net (e.g. because it doesn't exist) but it's not required we proceed with vhostfd array filled with -1 and vhostfdSize unchanged. Later, when constructing the qemu command line only non-negative items within vhostfd array are taken into account. This means, vhostfdSize may be greater than the actual count of non-negative items in vhostfd array. This results in improper command line arguments being generated, e.g.: -netdev tap,fd=21,id=hostnet0,vhost=on,vhostfd=(null)
-
- 28 5月, 2013 1 次提交
-
-
由 Cole Robinson 提交于
If we are just ejecting media, ret == -1 even after the retry loop determines that the tray is open, as requested. This means media disconnect always report's error. Fix it, and fix some other mini issues: - Don't overwrite the 'eject' error message if the retry loop fails - Move the retries decrement inside the loop, otherwise the final loop might succeed, yet retries == 0 and we will raise error - Setting ret = -1 in the disk->src check is unneeded - Fix comment typos cc: mprivozn@redhat.com
-
- 27 5月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
"error" label in qemuMigrationCookieGraphicsAlloc is now used unconditionally thanks to VIR_STRDUP.
-
- 25 5月, 2013 1 次提交
-
-
由 Sergey Fionov 提交于
Currently qemuDomainReboot() does reboot in two phases: qemuMonitorSystemPowerdown() and qemuProcessFakeReboot(). qemuMonitorSystemPowerdown() shutdowns the domain and saves domain state/reason as VIR_DOMAIN_SHUTDOWN_UNKNOWN. qemuProcessFakeReboot() sets domain state/reason to VIR_DOMAIN_RESUMED_UNPAUSED but does not save domain state changes. Subsequent restart of libvirtd leads to restoring domain state/reason to saved that is VIR_DOMAIN_SHUTDOWN_UNKNOWN and to automatic shutdown of the domain. This commit adds virDomainSaveStatus() into qemuProcessFakeReboot() to avoid unexpected shutdowns.
-
- 24 5月, 2013 2 次提交
-
-
由 Michal Privoznik 提交于
With previous patch, we accept negative value as length of string to duplicate. So there is no need to pass strlen(src) in case we want to do duplicate the whole string.
-
由 Martin Kletzander 提交于
Function qemuDomainSetBlockIoTune() was checking QEMU capabilities even when !(flags & VIR_DOMAIN_AFFECT_LIVE) and the domain was shutoff, resulting in the following problem: virsh # domstate asdf; blkdeviotune asdf vda --write-bytes-sec 100 shut off error: Unable to change block I/O throttle error: unsupported configuration: block I/O throttling not supported with this QEMU binary Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=965016
-
- 23 5月, 2013 2 次提交
-
-
由 Michal Privoznik 提交于
- 22 5月, 2013 5 次提交
-
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
In order to learn libvirt multiqueue several things must be done: 1) The '/dev/net/tun' device needs to be opened multiple times with IFF_MULTI_QUEUE flag passed to ioctl(fd, TUNSETIFF, &ifr); 2) Similarly, '/dev/vhost-net' must be opened as many times as in 1) in order to keep 1:1 ratio recommended by qemu and kernel folks. 3) The command line construction code needs to switch from 'fd=X' to 'fds=X:Y:...:Z' and from 'vhostfd=X' to 'vhostfds=X:Y:...:Z'. 4) The monitor handling code needs to learn to pass multiple FDs.
-
由 Michal Privoznik 提交于
Currently, we have one huge function to construct qemu command line. This is very ineffective esp. if there's a fault somewhere.
-
由 Guannan Ren 提交于
example: qemu ${otherargs} \ -vnc 127.0.0.1:0,share=allow-exclusive
-
由 Guannan Ren 提交于
QEMU_CAPS_VNC_SHARE_POLICY (qemu >= 1.1)
-
- 21 5月, 2013 4 次提交
-
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
Commit f60a50c7 intended to remove the warning only, but not with the "return 0" together.
-
由 Guannan Ren 提交于
-
由 Michal Privoznik 提交于
In 84c59ffa I've tried to fix changing ejectable media process. The process should go like this: 1) we need to call 'eject' on the monitor 2) we should wait for 'DEVICE_TRAY_MOVED' event 3) now we can issue 'change' command However, while waiting in step 2) the domain monitor was locked. So even if qemu reported the desired event, the proper callback was not called immediately. The monitor handling code needs to lock the monitor in order to read the event. So that's the first lock we must not hold while waiting. The second one is the domain lock. When monitor handling code reads an event, the appropriate callback is called then. The first thing that each callback does is locking the corresponding domain as a domain or its device is about to change state. So we need to unlock both monitor and VM lock. Well, holding any lock while sleep()-ing is not the best thing to do anyway.
-
- 20 5月, 2013 5 次提交
-
-
由 Osier Yang 提交于
Since 0d70656a, it starts to access the sysfs files to build the qemu command line (by virSCSIDeviceGetSgName, which is to find out the scsi generic device name by adpater:bus:target:unit), there is no way to work around, qemu wants to see the scsi generic device like "/dev/sg6" anyway. And there might be other places which need to access sysfs files when building qemu command line in future. Instead of increasing the arguments of qemuBuildCommandLine, this introduces a new callback for qemuBuildCommandLine, and thus tests can register their own callbacks for sysfs test input files accessing. * src/qemu/qemu_command.h: (New callback struct qemuBuildCommandLineCallbacks; extern buildCommandLineCallbacks) * src/qemu/qemu_command.c: (wire up the callback struct) * src/qemu/qemu_driver.c: (Use the new syntax of qemuBuildCommandLine) * src/qemu/qemu_hotplug.c: Likewise * src/qemu/qemu_process.c: Likewise * tests/testutilsqemu.[ch]: (Helper testSCSIDeviceGetSgName; callback struct testCallbacks;) * tests/qemuxml2argvtest.c: (Use testCallbacks) * src/tests/qemuxmlnstest.c: (Like above)
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
-
- 17 5月, 2013 11 次提交
-
-
由 Guannan Ren 提交于
Resolves:https://bugzilla.redhat.com/show_bug.cgi?id=927620 #kill -STOP `pidof qemu-kvm` #virsh destroy $guest --graceful error: Failed to destroy domain testVM error: An error occurred, but the cause is unknown With --graceful, SIGTERM always is emitted to kill driver process, but it won't success till burning out waiting time in case of process being stopped. But domain destroy without --graceful can work, SIGKILL will be emitted to the stopped process after 10 secs which always kills a process even one that is currently stopped. So report an error after burning out waiting time in this case.
-
由 Osier Yang 提交于
Just like previous patches, this changes qemuCheckSharedDisk into qemuCheckSharedDevice, which takes a virDomainDeviceDefPtr argument instead.
-
由 Daniel P. Berrange 提交于
Change bbe97ae9 caused the QEMU driver to ignore ENOENT errors from cgroups, in order to cope with missing /proc/cgroups. This is not good though because many other things can cause ENOENT and should not be ignored. The callers expect to see ENXIO when cgroups are not present, so adjust the code to report that errno when /proc/cgroups is missing Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Jiri Denemark 提交于
-
由 Martin Kletzander 提交于
Commit 632f78ca introduced a regression which causes schedinfo being unable to set some parameters. When migrating to priv->cgroup there was missing variable left out and due to passed NULL to underlying function, the setting failed. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=963592
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
Just like what previous patches do, it refactors qemuSetUnprivSGIO to take the virDomainDeviceDefPtr as argument instead.
-
由 Osier Yang 提交于
unpriv_sgio setting is tight with the shared device helpers, let's put them together in qemu_conf.c
-
由 Osier Yang 提交于
SCSI host device will also support "sgio", and perhaps we could use "sgio" in other places too in future, renaming the enum to reuse.
-
由 Osier Yang 提交于
This adds the shared device entry when starting domain (more exactly, when preparing host devices), and remove the entry when destroying domain (when reattaching host devices).
-
由 Osier Yang 提交于
This changes the helpers qemu{Add,Remove}SharedDisk into qemu{Add,Remove}SharedDevice, as most of the code in the helpers can be reused for scsi host device. To track the shared scsi host device, first it finds out the device path (e.g. /dev/s[dr]*) which is mapped to the sg device, and use device ID of the found device path (/dev/s[dr]*) as the hash key. This is because of the device ID is not unique between between /dev/s[dr]* and /dev/sg*, e.g. % sg_map /dev/sg0 /dev/sda /dev/sg1 /dev/sr0 % ls -l /dev/sda brw-rw----. 1 root disk 8, 0 May 2 19:26 /dev/sda %ls -l /dev/sg0 crw-rw----. 1 root disk 21, 0 May 2 19:26 /dev/sg0
-