- 22 9月, 2015 3 次提交
-
-
由 Peter Krempa 提交于
Add a simple helper so that the code doesn't have to rewrite the same condition multiple times.
-
由 Pavel Fedin 提交于
Since test suite now correctly creates capabilities cache, the hack is not needed any more. Signed-off-by: NPavel Fedin <p.fedin@samsung.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Fedin 提交于
The main purpose of this patch is to introduce test mode to virQEMUCapsCacheLookup(). This is done by adding a global variable, which effectively overrides binary name. This variable is supposed to be set by test suite. The second addition is qemuTestCapsCacheInsert() function which allows the test suite to actually populate the cache. Signed-off-by: NPavel Fedin <p.fedin@samsung.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 21 9月, 2015 1 次提交
- 18 9月, 2015 14 次提交
-
-
由 Michal Privoznik 提交于
So far this function was not kept in sync with changing virDomainDiskDef. Fill in all the missing checks and reorganize their order so it's easier to track which items are not being checked for. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
I always felt like this function is qemu specific rather than libvirt-wide. Other drivers may act differently on virDomainDef change and in fact may require talking to underlying hypervisor even if something else's than disk->src has changed. I know that the function is still incomplete, but lets break that into two commits that are easier to review. This one is pure code movement. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Firstly, our coding guidelines suggest using 'cleanup' label instead of 'end'. Then, @ret should be set to value representing success as the last statement before the 'cleanup' label. And while I am at this function, lets enumerate all the possible enum items (virDomainDiskDevice) and avoid using 'default' in switch(). Pooh. Also, nothing bad happens if we look up the disk to change in the domain upfront. In fact, it's going to be helpful later when we want to keep some old values for performing a rollback. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
This new private API should return true iff sources of two disks differs in sense that qemu should be instructed to change the disk backend. For instance, ejecting a CDROM is such case, or pointing disk into a different ISO location, and so on. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
While we currently only allow changing a media in a disk, this is going to change in a while, so the function name would be invalid. Moreover, the old name does not match the pattern laid out by other update functions. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1159219 So, in 11e058ca I've tried to make UpdateDevice update startupPolicy too. And it worked well until somebody came around and pushed d0dc6c03 which accidentally removed my contribution. Redo my commit. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
When persistently migrating a domain to a destination host where the same domain already exists (i.e., it is persistent and shutdown at the destination), we would happily throw away the original persistent definition without properly freeing it. And when updating the definition fails for some reason we don't properly revert to the original state leaving the domain broken. In addition to fixing these issues, the patch also makes sure the domain definition parsed from a migration cookie is either used or freed. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
For quite a long time we don't need to postpone queueing events until the end of the function since we no longer have the big driver lock. Let's make the code of qemuMigrationFinish simpler by queuing events at the time we generate them. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Every single call to qemuDomainEventQueue() uses the following pattern: if (event) qemuDomainEventQueue(driver, event); Let's move the check for valid event to qemuDomainEventQueue and simplify all callers. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Finish is the final state in v2 of our migration protocol. If something fails, we have no option to abort the migration and resume the original domain. Non fatal errors (such as failure to start guest CPUs or make the domain persistent) has to be treated as success. Keeping the domain running while reporting the failure was just asking for trouble. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Whenever something fails during incoming migration in Finish phase before we started guest CPUs, we need to kill the domain in addition to reporting the failure. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
When we save status XML at the point during migration where we have already started the domain on destination, we can't really go back and abort migration. Thus the only thing we can do is to log a warning and report success. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Offline migration is quite special because we don't really need to do anything but make the domain persistent. Let's do it separately from normal migration to avoid cluttering the code with !(flags & VIR_MIGRATE_OFFLINE). Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Separate code which makes incoming domain persistent into qemuMigrationPersist. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 16 9月, 2015 2 次提交
-
-
由 John Ferlan 提交于
Commit id 'f1f68ca3' added code to remove the directory paths for auto-generated sockets, but that code could be called before the paths were created resulting in generating error messages from virFileDeleteTree indicating that the file doesn't exist. Rather than "enforce" all callers to make the non-NULL and existence checks, modify the virFileDeleteTree API to silently ignore NULL on input and non-existent directory trees.
-
由 Andrea Bolognani 提交于
When looking for a QEMU binary suitable for running ppc64le guests we have to take into account the fact that we use the QEMU target as key for the hash, so direct comparison is not good enough. Factor out the logic from virQEMUCapsFindBinaryForArch() to a new virQEMUCapsFindTarget() function and use that both when looking for QEMU binaries available on the system and when looking up QEMU capabilities later. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1260753
-
- 15 9月, 2015 2 次提交
-
-
由 Pavel Fedin 提交于
Fixes the following error when attempting to add a disk with bus='virtio' to a machine which actually supports virtio-mmio (caught with ARM virt): virtio disk cannot have an address of type 'virtio-mmio' The problem has been likely introduced by e8d55172. Before that qemuAssignDevicePCISlots() was never called for ARM "virt" machine. Signed-off-by: NPavel Fedin <p.fedin@samsung.com>
-
由 Michal Privoznik 提交于
We may want to do some decisions in drivers based on fact if we are running as privileged user or not. Propagate this info there. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 14 9月, 2015 2 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Peter Krempa 提交于
Commit 8125113c added code that should remove the disk backend if the fronted hotplug failed for any reason. The code had a bug though as it used the disk string for unplug rather than the backend alias. Fix the code by pre-creating an alias string and using it instead of the disk string. In cases where qemu does not support QEMU_CAPS_DEVICE, we ignore the unplug of the backend since we can't really create an alias in that case. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1262399
-
- 12 9月, 2015 1 次提交
-
-
由 Cole Robinson 提交于
There's a couple reports of things failing in this area (bug 1259070), but it's tough to tell what's going wrong without stderr from qemu-bridge-helper. So let's report stderr in the error message Couple new examples: virbr0 is inactive: internal error: /usr/libexec/qemu-bridge-helper --use-vnet --br=virbr0 --fd=21: failed to communicate with bridge helper: Transport endpoint is not connected stderr=failed to get mtu of bridge `virbr0': No such device bridge isn't on the ACL: internal error: /usr/libexec/qemu-bridge-helper --use-vnet --br=br0 --fd=21: failed to communicate with bridge helper: Transport endpoint is not connected stderr=access denied by acl file
-
- 10 9月, 2015 4 次提交
-
-
由 Andrea Bolognani 提交于
Up until now, the default has been rtl8139, but no check was in place to make sure that device was actually available. Now we try rtl8139, e1000 and virtio-net in turn, checking for availability before using any of them: this means we have a much better chance for the guest to be able to boot.
-
由 Andrea Bolognani 提交于
This capability can be used to detect whether or not the QEMU binary supports the virtio-net-* network device.
-
由 Andrea Bolognani 提交于
This capability can be used to detect whether or not the QEMU binary supports the e1000 network device.
-
由 Andrea Bolognani 提交于
This capability can be used to detect whether or not the QEMU binary supports the rtl8139 network device.
-
- 09 9月, 2015 2 次提交
-
-
由 Martin Kletzander 提交于
Commit f1f68ca3 did not report an error if virFileMakePath() returned -1. Well, who would've guessed function with name starting with 'vir' sets an errno instead of reporting an error the libvirt way. Anyway, let's fix it, so the output changes from: $ virsh start arm error: Failed to start domain arm error: An error occurred, but the cause is unknown to: $ virsh start arm error: Failed to start domain arm error: Cannot create directory '/var/lib/libvirt/qemu/domain-arm': Not a directory Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1146886Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Peter Krempa 提交于
If the current live definition does not have memory hotplug enabled, but the persistent one does libvirt would reject migration if the destination does not support memory hotplug even if the user didn't want to persist the VM at the destination and thus the XML containing the memory hotplug definition would not be used. To fix this corner case the code will check for memory hotplug in the newDef only if VIR_MIGRATE_PERSIST_DEST was used.
-
- 05 9月, 2015 1 次提交
-
-
由 John Ferlan 提交于
Commit id '2e7cea24' added a check for an error from Finish instead of 'unexpected error'; however, if for some reason there wasn't an error, then virGetLastError could return NULL resulting in the NULL pointer deref to err->domain.
-
- 04 9月, 2015 2 次提交
-
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1258361 When attaching a disk, controller, or rng using an address type ccw or s390, we need to ensure the support is provided by both the machine.os and the emulator capabilities (corollary to unconditional setting when address was not provided for the correct machine.os and emulator. For an inactive guest, an addition followed by a start would cause the startup to fail after qemu_command builds the command line and attempts to start the guest. For an active guest, libvirtd would crash.
-
由 John Ferlan 提交于
Rather than have different usages of STR function in order to determine whether the domain is s390-ccw or s390-ccw-virtio, make a single API which will check the machine.os prefix. Then use the function.
-
- 02 9月, 2015 1 次提交
-
-
由 Jonathan Toppins 提交于
Adds a new interface type using UDP sockets, this seems only applicable to QEMU but have edited tree-wide to support the new interface type. The interface type required the addition of a "localaddr" (local address), this then maps into the following xml and qemu call. <interface type='udp'> <mac address='52:54:00:5c:67:56'/> <source address='127.0.0.1' port='11112'> <local address='127.0.0.1' port='22222'/> </source> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </interface> QEMU call: -net socket,udp=127.0.0.1:11112,localaddr=127.0.0.1:22222 Notice the xml "local" entry becomes the "localaddr" for the qemu call. reference: http://lists.gnu.org/archive/html/qemu-devel/2011-11/msg00629.htmlSigned-off-by: NJonathan Toppins <jtoppins@cumulusnetworks.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 28 8月, 2015 1 次提交
-
-
由 Jim Fehlig 提交于
This reverts commit 1ce7c1d2, which introduced a significant semantic change to the virDomainGetInfo() API. Additionally, the change was only made to 2 of the 15 virt drivers. Conflicts: src/qemu/qemu_driver.c Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 27 8月, 2015 2 次提交
-
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1226234#c3 If the qemu monitor fails to remove the memory from the guest for any reason, the auditlog message will incorrectly use the current actual memory (via virDomainDefGetMemoryActual) instead of the value we were attempting to reduce to. The result is the 'new-mem' and 'old-mem' values for the auditlog message would be identical. This patch creates a local 'newmem' which accounts for the current memory size minus the memory which is being removed. NB, for the success case this results in the same value that would be returned by virDomainDefGetMemoryActual without the need to do the math. This follows the existing code which would subtract the size for cur_balloon. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1226234#c3 Prior to this patch, after successfully hot plugging memory the audit log indicated that the update failed, e.g.: type=VIRT_RESOURCE ... old-mem=1024000 new-mem=1548288 \ exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=pts/2 res=failed This patch will adjust where virDomainAuditMemory is called to ensure the proper 'ret' value is used based on success or failure. Additionally, the audit message should include the size of the memory we were attempting to change to rather than the current actual size. On failure to add, the message showed the same value for old-mem and new-mem. In order to do this, introduce a 'newmem' local which will compute the new size based on the oldmem size plus the size of memory we are about to add. NB: This would be the same as calling the virDomainDefGetMemoryActual again on success, but avoids the overhead of recalculating. Plus cur_balloon is already adjusted by the same value, so this follows that. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
- 26 8月, 2015 2 次提交
-
-
由 Martin Kletzander 提交于
Commit f1f68ca3 overused mdir_name() event though it was not needed in the latest version, hence labelling directory one level up in the tree and not the one it should. If anyone with SElinux managed to try run a domain with guest agent set up, it's highly possible that they will need to run 'restorecon -F /var/lib/libvirt/qemu/channel/target' to fix what was done. Reported-by: NLuyao Huang <lhuang@redhat.com> Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1253107 Make a call virCgroupGetBlkioWeight to re-read blkio.weight right after it is set in order to keep internal data up-to-date. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-