- 06 5月, 2015 2 次提交
-
-
由 John Ferlan 提交于
If the virStringSearch() returns a 0 (zero), then each of the uses of the call will just jump to cleanup forgetting to free the returned empty list. Expand the scope a bit of each use and free at cleanup.
-
由 John Ferlan 提交于
The returned socks from virNetSocketNewListenTCP needs to be VIR_FREE'd as well as seach of the Close/Unref on all the socks[i] that is already done
-
- 05 5月, 2015 9 次提交
-
-
由 Jim Fehlig 提交于
The xend driver and the parsing/formating code in src/xenconfig have long supported soundhw. Add support in the libxl driver too.
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1176020 We had a check for the vcpu count total number in <numa> before, however this check is not good enough. There are some examples: 1. one of cpu id is out of maxvcpus, can set success(cpu count = 5 < 10): <vcpu placement='static'>10</vcpu> <cell id='0' cpus='0-3,100' memory='512000' unit='KiB'/> 2. use the same cpu in 2 cell, can set success(cpu count = 8 < 10): <vcpu placement='static'>10</vcpu> <cell id='0' cpus='0-3' memory='512000' unit='KiB'/> <cell id='1' cpus='0-3' memory='512000' unit='KiB'/> 3. use the same cpu in 2 cell, cannot set success(cpu count = 11 > 10): <vcpu placement='static'>10</vcpu> <cell id='0' cpus='0-6' memory='512000' unit='KiB'/> <cell id='1' cpus='0-3' memory='512000' unit='KiB'/> Add a check for numa cpus, check if duplicate use one cpu in more than one cell. Signed-off-by: NLuyao Huang <lhuang@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The only version that's supported in QEMU is version 2, currently. Fortunately, it is enabled by aarch64 automatically, so there's nothing for us that needs to be put onto command line. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Some platforms, like aarch64, don't have APIC but GIC. So there's no reason to have <apic/> feature turned on. However, we are still missing <gic/> feature. This commit introduces the feature to XML parser and formatter, adds documentation and updates RNG schema. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
When migrating a domain while changing its name and using VIR_MIGRATE_PERSIST_DEST flag, libvirt would fail to properly change the name in the persistent definition. The inconsistency results in weird behavior when dumping domain XML, destroying the domain, restarting libvirtd and likely in several other situations. Since the new name is already stored in vm->def->name, we just need to make sure the persistent definition uses this new name too. https://bugzilla.redhat.com/show_bug.cgi?id=1076354Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Cole Robinson 提交于
Currently we try to chown any directory passed to virDirCreate, even if the user didn't request any explicit owner/group via the pool/vol XML. This causes issues with qemu:///session: try to build a pool of a root owned directory like /tmp, and it fails trying to chown the directory to the session user. Instead it should just leave things as they are, unless the user requests changing permissions via the pool XML. Similarly this is annoying if creating a storage pool via system libvirtd of an existing directory in user $HOME, it's now owned by root. The virDirCreate function is pretty convoluted, since it needs to fork off in certain specific cases. Try to document that, to make it clear where exactly we are changing behavior.
-
由 Cole Robinson 提交于
The current code attempts to handle this, but it only catches mkdir failing with EEXIST. However if say trying to build /tmp for an unprivileged qemu:///session, mkdir will fail with EPERM. Rather than catch any errors, just don't attempt mkdir if the directory already exists.
-
由 Cole Robinson 提交于
This means pool XML actually reports accurate user/group/mode/label. This uses UpdateVolTargetInfoFD in a bit of a hackish way, but it works
-
由 Cole Robinson 提交于
virDirCreate will give us fine grained details about what actually failed.
-
- 04 5月, 2015 12 次提交
-
-
由 Jiri Denemark 提交于
Neither migrate URI nor lister address make any sense for tunnelled migration. https://bugzilla.redhat.com/show_bug.cgi?id=1066375 https://bugzilla.redhat.com/show_bug.cgi?id=1073233Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Marc-André Lureau 提交于
Fill qemu command line vmport argument as required.
-
由 Marc-André Lureau 提交于
The vmport machine argument works with pc machine kind, not with xen for example.
-
由 Marc-André Lureau 提交于
Move common functions being used by the following virQEMUCapsSupportsVmport commit.
-
由 Marc-André Lureau 提交于
Set the capability based on qmp query, or qemu version. The qmp query includes vmport with 2.2, but no longer with 2.3. It lists only non-machine specific capabilities, so check the qemu version too until a machine-specific query is supported.
-
由 Marc-André Lureau 提交于
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1218145 Jump to endjob instead of cleanup to fix this deadlock. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
由 Pavel Hrdina 提交于
Now that we have macros for exclusive flags and flag requirements we can use them to cleanup the code for setvcpus and error out for all wrong flag combination. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Similar to VIR_EXLUSIVE_FLAGS, it will error out if flag requirement is not met. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Inspired by commit 7e437ee7 that introduced similar macros for virsh commands so we don't have to repeat the same code all over. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 01 5月, 2015 1 次提交
-
-
由 John Ferlan 提交于
Found by Laine and discussed a bit on internal IRC. Commit id c56fe7f1 added support for creating a command line to support scsi-disk.channel. Series was here: http://www.redhat.com/archives/libvir-list/2012-February/msg01052.html Which pointed to a design proposal here: http://permalink.gmane.org/gmane.comp.emulators.libvirt/50428 Which states (in part): Libvirt should check for the QEMU "scsi-disk.channel" property. If it is unavailable, QEMU will only support channel=lun=0 and 0<=target<=7. However, the check added was ensuring that bus != lun *and* bus != 0. So if bus == lun and both were non zero, we'd never make the second check. Changing this to an *or* check fixes the check, but still is less readable than the just checking each for 0
-
- 30 4月, 2015 5 次提交
-
-
由 Peter Krempa 提交于
Since the qemu capabilities are not initialized for offline VMs the caller might get suboptimal error message: $ virsh blockjob VM PATH --bandwidth 1 error: unsupported configuration: block jobs not supported with this QEMU binary Move the checks after we make sure that the VM is alive.
-
由 Jiri Denemark 提交于
Only USB addresses are allowed for USB disks. Report an error if another address is configured. https://bugzilla.redhat.com/show_bug.cgi?id=1043436Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=858147Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Just as we allow stopping filesystem pools when they were unmounted externally, do not fail to stop an iscsi pool when someone else closed the session externally. Reported at: https://bugzilla.redhat.com/show_bug.cgi?id=1171984
-
由 Jim Fehlig 提交于
Provide integration with libvirt's lock manager in the libxl driver. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 29 4月, 2015 11 次提交
-
-
由 Cole Robinson 提交于
The phyp driver stuffed it into a DomainDefPtr during its attachdevice routine, but the value is never advertised via capabilities so it should be safe to drop. Have the phyp driver use OSTYPE_LINUX, which is what it advertises via capabilities.
-
由 Michael Chapman 提交于
In qemuMigrationDriveMirror we can start all disk mirrors in parallel. We wait until they are all ready, or one of them aborts. In qemuMigrationCancelDriveMirror, we wait until all mirrors are properly stopped. This is necessary to ensure that destination VM is fully in sync with the (paused) source VM. If a drive mirror can not be cancelled, then the destination is not in a consistent state. In this case it is not safe to continue with the migration. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Michael Chapman 提交于
The !modern code path needs to call qemuBlockJobEventProcess directly. the modern code path will call it via qemuBlockJobSyncWait. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Michael Chapman 提交于
Other threads may be blocked in qemuBlockJobSyncWait. Ensure that they're woken up when the domain is stopped. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Michael Chapman 提交于
qemuBlockJobSyncBegin and qemuBlockJobSyncEnd delimit a region of code where block job events are processed "synchronously". qemuBlockJobSyncWait and qemuBlockJobSyncWaitWithTimeout wait for an event generated by a block job. The Wait* functions may be called multiple times while the synchronous block job is active. Any pending block job event will be processed by only when Wait* or End is called. disk->blockJobStatus is reset by these functions, so if it is needed a pointer to a virConnectDomainEventBlockJobStatus variable should be passed as the last argument. It is safe to pass NULL if you do not care about the block job status. All functions assume the VM object is locked. The Wait* functions will unlock the object for as long as they are waiting. They will return -1 and report an error if the domain exits before an event is received. Typical use is as follows: virQEMUDriverPtr driver; virDomainObjPtr vm; /* locked */ virDomainDiskDefPtr disk; virConnectDomainEventBlockJobStatus status; qemuBlockJobSyncBegin(disk); ... start block job ... if (qemuBlockJobSyncWait(driver, vm, disk, &status) < 0) { /* domain died while waiting for event */ ret = -1; goto error; } ... possibly start other block jobs or wait for further events ... qemuBlockJobSyncEnd(driver, vm, disk, NULL); To perform other tasks periodically while waiting for an event: virQEMUDriverPtr driver; virDomainObjPtr vm; /* locked */ virDomainDiskDefPtr disk; virConnectDomainEventBlockJobStatus status; unsigned long long timeout = 500 * 1000ull; /* milliseconds */ qemuBlockJobSyncBegin(disk); ... start block job ... do { ... do other task ... if (qemuBlockJobSyncWaitWithTimeout(driver, vm, disk, timeout, &status) < 0) { /* domain died while waiting for event */ ret = -1; goto error; } } while (status == -1); qemuBlockJobSyncEnd(driver, vm, disk, NULL); Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Michael Chapman 提交于
We will want to use synchronous block jobs from qemu_migration as well, so split this function out into a new source file. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Peter Krempa 提交于
While qemu would reject the configuration we can check whether it makes sense to plug the device upfront.
-
由 Peter Krempa 提交于
slot id, if specified, has to be less than the slots count.
-
由 Peter Krempa 提交于
If the added memory device would exceed the maximum memory size, reject it. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1216046
-
由 Peter Krempa 提交于
The documentation states that for shallow block copy the image has to have the same guest visible content as backing file of the current image if the file is being reused. This condition can be achieved also with a raw file (or a qcow without a backing file) so remove the condition that would disallow it. (This patch additionally fixes crash described in https://bugzilla.redhat.com/show_bug.cgi?id=1215569 )
-
由 Maxim Nestratov 提交于
New functions utilize previosly added prlsdkDelDisk and prlsdkGetDiskIndex Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
-