- 18 9月, 2015 13 次提交
-
-
由 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>
-
- 17 9月, 2015 2 次提交
-
-
由 Chunyan Liu 提交于
After attach-device a <hostdev> with --config, new device doesn't show up in dumpxml and in guest. To fix that, set dev->data.hostdev = NULL after work so that the pointer is not freed, since vmdef has the pointer and still need it. Signed-off-by: NChunyan Liu <cyliu@suse.com>
-
由 Matthias Bolte 提交于
Tool such as libguestfs need the datacenter path to get access to disk images. The ESX driver knows the correct datacenter path, but this information cannot be accessed using libvirt API yet. Also, it cannot be deduced from the connection URI in a robust way. Expose the datacenter path in the domain XML as <vmware:datacenterpath> node similar to the way the <qemu:commandline> node works. The new node is ignored while parsing the domain XML. In contrast to <qemu:commandline> it is output only.
-
- 16 9月, 2015 5 次提交
-
-
由 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.
-
由 Michal Privoznik 提交于
We have the same argument to many other commands that produce an XML based on what user typed. But unfortunately attach-interface was missing it. Maybe nobody had needed it yet. Well, I did just now. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 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
-
由 Jim Fehlig 提交于
libxl/libxl_conf.c: In function 'libxlDriverConfigNew': libxl/libxl_conf.c:1560:30: error: 'log_level' may be used uninitialized in this function [-Werror=maybe-uninitialized]
-
由 Jim Fehlig 提交于
Instead of a hardcoded DEBUG log level, use the overall daemon log level specified in libvirtd.conf when opening a log stream with libxl. libxl is very verbose when DEBUG log level is set, resulting in huge log files that can potentially fill a disk. Control of libxl verbosity should be placed in the administrator's hands.
-
- 15 9月, 2015 6 次提交
-
-
由 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 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1124841 If running in session mode it may happen that we fail to set correct SELinux label, but the image may still be readable to the qemu process. Take this into account. Signed-off-by: NMichal Privoznik <mprivozn@redhat.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>
-
由 Michal Privoznik 提交于
We have plenty of callbacks in the driver. Some of these callbacks require more than one argument to be passed. For that we currently have a data type (struct) per each callback. Well, so far for only one - SELinuxSCSICallbackData. But lets turn it into more general name so it can be reused in other callbacks too instead of each one introducing a new, duplicate data type. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The check is done in virSecuritySELinuxSetFilecon itself. There's no need to check it again. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Christian Loehle 提交于
Signed-off-by: NChristian Loehle <cloehle@linutronix.de>
-
- 14 9月, 2015 4 次提交
-
-
由 Andrea Bolognani 提交于
This allows the Wikipedia link to be recognized correctly by eg. gnome-terminal's Open Link and Copy Link Address features.
-
由 Martin Kletzander 提交于
Commit f1f68ca3 tried fixing running multiple domains under various users, but if the user can't browse the directory, it's hard for the qemu running under that user to create the monitor socket. The permissions need to be fixed in two places in the spec file due to support for both installations with and without driver modules. Creating a directory with '$(MKDIR_P) -m' shouldn't fail even on systems where autoconf needs to fallback to 'install-sh -d'. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1146886Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 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 2 次提交
-
-
由 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
-
由 Daniel P. Berrange 提交于
The xenXMConfigCacheRefresh method scans /etc/xen and loads all config files it finds. It then scans its internal hash table and purges any (previously) loaded config files whose refresh timestamp does not match the timestamp recorded at the start of xenXMConfigCacheRefresh(). There is unfortunately a subtle flaw in this, because if loading the config files takes longer than 1 second, some of the config files will have a refresh timestamp that is 1 or more seconds different (newer) than is checked for. So we immediately purge a bunch of valid config files we just loaded. To avoid this flaw, we must pass the timestamp we record at the start of xenXMConfigCacheRefresh() into the xenXMConfigCacheAddFile() method, instead of letting the latter call time(NULL) again. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 11 9月, 2015 2 次提交
-
-
由 Martin Kletzander 提交于
Mock libraries are not built with testutils.c, but there's one which uses VIR_TEST_DEBUG. But because that debug should be an error, if we change it, then it will not only be more semantically correct, but mingw compiler will be happier as well. It also follows suit with all other mock libraries. For few other things, used in this file, need libvirt.la to be added into LIBADD for mingw as well. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Ian Campbell 提交于
commit 4b53d0d4 "libxl: don't remove persistent domain on start failure" cleans up the vm object and sets it to NULL if the vm is not persistent, however at end job vm (now NULL) is dereferenced via the call to libxlDomainObjEndJob. Avoid this by skipping "endjob" and going straight to "cleanup" in this case. Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
-
- 10 9月, 2015 5 次提交
-
-
由 Daniel P. Berrange 提交于
We have a new libvirt-appdev-guide-python which we need to promote to users. Rewrite the existing page to mention it too. Also use the new URL location which is automatically refreshed once a day. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 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 1 次提交
-
-
由 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>
-