- 07 9月, 2013 1 次提交
-
-
由 Eric Blake 提交于
While debugging a failure of 'virsh qemu-attach', I noticed that we were leaking the count of active domains on failure. This means that a libvirtd session that is supposed to quit after active domains disappear will hang around forever. * src/qemu/qemu_process.c (qemuProcessAttach): Undo count of active domains on failure. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 03 9月, 2013 1 次提交
-
-
由 Cole Robinson 提交于
QEMU ARM boards don't give us any way to explicitly wire in a -chardev, so use the old style -serial options. Unfortunately this isn't as simple as just turning off the CHARDEV flag for qemu-system-arm, as upcoming virtio support _will_ use device/chardev.
-
- 29 8月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
When using a <interface type="network"> that points to a network with hostdev forwarding mode a hostdev alias is created for the network. This allias is inserted into the hostdev list, but is backed with a part of the network object that it is connected to. When a VM is being stopped qemuProcessStop() calls networkReleaseActualDevice() which eventually frees the memory for the hostdev object. Afterwards when the domain definition is being freed by virDomainDefFree() an invalid pointer is accessed by virDomainHostdevDefFree() and may cause a crash of the daemon. This patch removes the entry in the hostdev list before freeing the depending memory to avoid this issue. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1000973
-
- 26 8月, 2013 2 次提交
-
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
We will have to pass a mock-up of the driver when testing monitor events.
-
- 21 8月, 2013 1 次提交
-
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=822052 When doing a live migration, if the destination fails for any reason after the point in which files should be labeled, then the cleanup of the destination would restore the labels to their defaults, even though the source is still trying to continue running with the image open. Bug 822052 mentioned one source of live migration failure - a mismatch in SELinux virt_use_nfs settings (on for source, off for destination); but I found other situations that would also trigger it (for example, having a graphics device tied to port 5999 on the source, and a different domain on the destination already using that port, so that the destination cannot reuse the port). In short, just as cleanup of the source on a successful migration must not relabel files (because the destination would be crippled by the relabel), cleanup of the destination on a failed migration must not relabel files (because the source would be crippled). * src/qemu/qemu_process.c (qemuProcessStart): Set flag to avoid label restoration when cleaning up on failed migration. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 15 8月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
This restores the error message when QMP probing is not used. https://bugzilla.redhat.com/show_bug.cgi?id=991334
-
- 01 8月, 2013 1 次提交
-
-
由 Guannan Ren 提交于
For disk with startupPolicy support, such as cdrom and floppy when its chain is broken, the startup policy will apply, otherwise, report an error.
-
- 30 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The VIR_DOMAIN_PAUSED_GUEST_PANICKED constant is badly named, leaking the QEMU event name. Elsewhere in the API we use 'CRASHED' rather than 'PANICKED', and the addition of 'GUEST' is redundant since all events are guest related. Thus rename it to VIR_DOMAIN_PAUSED_CRASHED, which matches with VIR_DOMAIN_RUNNING_CRASHED and VIR_DOMAIN_EVENT_CRASHED. It was added in commit 14e7e0ae which post-dates v1.1.0, so is safe to rename before 1.1.1 Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 24 7月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Currently the QEMU driver creates the VM's cgroup prior to forking, and then uses a virCommand hook to move the child into the cgroup. This won't work with systemd whose APIs do the creation of cgroups + attachment of processes atomically. Fortunately we have a handshake taking place between the QEMU driver and the child process prior to QEMU being exec()d, which was introduced to allow setup of disk locking. By good fortune this synchronization point can be used to enable the QEMU driver to do atomic setup of cgroups removing the use of the hook script. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Use the new virCgroupNewDetect function to determine cgroup placement of existing running VMs. This will allow the legacy cgroups creation APIs to be removed entirely Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 23 7月, 2013 1 次提交
-
-
由 Osier Yang 提交于
The translation must be done before both of cgroup and security setting, otherwise since the disk source is not translated yet, it might be skipped on cgroup and security setting.
-
- 20 7月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
In case libvirtd is asked to unplug a device but the device is actually unplugged later when libvirtd is not running, we need to detect that and remove such device when libvirtd starts again and reconnects to running domains.
-
- 19 7月, 2013 2 次提交
-
-
由 Jiri Denemark 提交于
-
由 Eric Blake 提交于
A future patch wants the DAC security manager to be able to safely get the supplemental group list for a given uid, but at the time of a fork rather than during initialization so as to pick up on live changes to the system's group database. This patch adds the framework, including the possibility of a pre-fork callback failing. For now, any driver that implements a prefork callback must be robust against the possibility of being part of a security stack where a later element in the chain fails prefork. This means that drivers cannot do any action that requires a call to postfork for proper cleanup (no grabbing a mutex, for example). If this is too prohibitive in the future, we would have to switch to a transactioning sequence, where each driver has (up to) 3 callbacks: PreForkPrepare, PreForkCommit, and PreForkAbort, to either clean up or commit changes made during prepare. * src/security/security_driver.h (virSecurityDriverPreFork): New callback. * src/security/security_manager.h (virSecurityManagerPreFork): Change signature. * src/security/security_manager.c (virSecurityManagerPreFork): Optionally call into driver, and allow returning failure. * src/security/security_stack.c (virSecurityDriverStack): Wrap the handler for the stack driver. * src/qemu/qemu_process.c (qemuProcessStart): Adjust caller. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 18 7月, 2013 3 次提交
-
-
由 Jiri Denemark 提交于
-
由 Michal Privoznik 提交于
-
由 Ján Tomko 提交于
When virAsprintf was changed from a function to a macro reporting OOM error in dc6f2dad, it was documented as returning 0 on success. This is incorrect, it returns the number of bytes written as asprintf does. Some of the functions were converted to use virAsprintf's return value directly, changing the return value on success from 0 to >= 0. For most of these, this is not a problem, but the change in virPCIDriverDir breaks PCI passthrough. The return value check in virhashtest pre-dates virAsprintf OOM conversion. vmwareMakePath seems to be unused.
-
- 16 7月, 2013 1 次提交
-
-
由 John Ferlan 提交于
At vm startup and attach attempt to set the balloon driver statistics collection period based on the value found in the domain xml file. This is not done at reconnect since it's possible that a collection period was set on the live guest and making the set period call would reset to whatever value is stored in the config file. Setting the stats collection period has a side effect of searching through the qom-list output for the virtio balloon driver and making sure that it has the right properties in order to allow setting of a collection period and eventually fetching of statistics. The walk through the qom-list is expensive and thus the balloonpath will be saved in the monitor private structure as well as a flag indicating that the initialization has already been attempted (in the event that a path is not found, no sense to keep checking). This processing model conforms to the qom object model model which requires setting object properties after device startup. That is, it's not possible to pass the period along via the startup code as it won't be recognized.
-
- 11 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 7月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 08 7月, 2013 2 次提交
-
-
由 Jiri Denemark 提交于
Whenever virPortAllocatorRelease is called with port == 0, it complains that the port is not in an allowed range, which is expectable as the port was never allocated. Let's make virPortAllocatorRelease ignore 0 ports in a similar way free() ignores NULL pointers.
-
由 Jiri Denemark 提交于
-
- 03 7月, 2013 4 次提交
-
-
由 Martin Kletzander 提交于
Commit 23e8b5d8 forgot to check the return value for all calls to qemuDomainChangeGraphicsPasswords().
-
由 Chen Fan 提交于
Add monitor callback API domainGuestPanic, that implements 'destroy', 'restart' and 'preserve' events of the 'on_crash' in the XML when domain crashed.
-
由 Chen Fan 提交于
Later code will need this outside of qemu_process.c
-
由 Chen Fan 提交于
Split the code to make the driver workpool more generalized
-
- 01 7月, 2013 1 次提交
-
-
由 Michal Novotny 提交于
Implement check whether (maximum) vCPUs doesn't exceed machine type's cpu-max settings. On older versions of QEMU the check is disabled. Signed-off-by: NMichal Novotny <minovotn@redhat.com>
-
- 11 6月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=971485 As of d7f9d827 we copy the listen address from the qemu.conf config file in case none has been provided via XML. But later, when migrating, we should not include such listen address in the migratable XML as it is something autogenerated, not requested by user. Moreover, the binding to the listen address will likely fail, unless the address is '0.0.0.0' or its IPv6 equivalent. This patch introduces a new boolean attribute to virDomainGraphicsListenDef to distinguish autofilled listen addresses. However, we must keep the attribute over libvirtd restarts, so it must be kept within status XML.
-
- 07 6月, 2013 1 次提交
-
-
由 Osier Yang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=964177 Though both libvirt and QEMU's document say RTC_CHANGE returns the offset from the host UTC, qemu actually returns the offset from the specified date instead when specific date is provided (-rtc base=$date). It's not safe for qemu to fix it in code, it worked like that for 3 years, changing it now may break other QEMU use cases. What qemu tries to do is to fix the document: http://lists.gnu.org/archive/html/qemu-devel/2013-05/msg04782.html And in libvirt side, instead of replying on the value from qemu, this converts the offset returned from qemu to the offset from host UTC, by: /* * a: the offset from qemu RTC_CHANGE event * b: The specified date (-rtc base=$date) * c: the host date when libvirt gets the RTC_CHANGE event * offset: What libvirt will report */ offset = a + (b - c); The specified date (-rtc base=$date) is recorded in clock's def as an internal only member (may be useful to exposed outside?). Internal only XML tag "basetime" is introduced to not lose the guest's basetime after libvirt restarting/reloading: <clock offset='variable' adjustment='304' basis='utc' basetime='1370423588'/>
-
- 06 6月, 2013 2 次提交
- 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.
-
- 23 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 21 5月, 2013 1 次提交
-
-
由 Osier Yang 提交于
-
- 20 5月, 2013 1 次提交
-
-
由 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)
-
- 17 5月, 2013 4 次提交
-
-
由 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 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.
-