- 18 11月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
This allows its error messages to be more specific.
-
- 12 11月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
If the managedsave image is corrupted, e.g. the XML part is, we fail to parse it and throw an error, e.g.: error: Failed to start domain jms8 error: XML error: missing security model when using multiple labels This is okay, as we can't really start the machine and avoid undefined qemu behaviour. On the other hand, the error message doesn't give a clue to users what should they do. The consensus here would be to thrown a warning to logs saying "Hey, you've got a corrupted file". Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 30 10月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The following sequence 1. Define a persistent QMEU guest 2. Start the QEMU guest 3. Stop libvirtd 4. Kill the QEMU process 5. Start libvirtd 6. List persistent guests At the last step, the previously running persistent guest will be missing. This is because of a race condition in the QEMU driver startup code. It does 1. Load all VM state files 2. Spawn thread to reconnect to each VM 3. Load all VM config files Only at the end of step 3, does the 'virDomainObjPtr' get marked as "persistent". There is therefore a window where the thread reconnecting to the VM will remove the persistent VM from the list. The easy fix is to simply switch the order of steps 2 & 3. In addition to this though, we must only attempt to reconnect to a VM which had a non-zero PID loaded from its state file. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 21 10月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Most of the usage of getuid()/getgid() is in cases where we are considering what privileges we have. As such the code should be using the effective IDs, not real IDs. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 18 10月, 2013 2 次提交
-
-
-
由 Wang Yufei 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1019053 When we migrate vms concurrently, there's a chance that libvirtd on destination assigns the same port for different migrations, which will lead to migration failure during prepare phase on destination. So we use virPortAllocator here to solve the problem. Signed-off-by: NWang Yufei <james.wangyufei@huawei.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 15 10月, 2013 1 次提交
-
-
由 Eric Blake 提交于
'const fooPtr' is the same as 'foo * const' (the pointer won't change, but it's contents can). But in general, if an interface is trying to be const-correct, it should be using 'const foo *' (the pointer is to data that can't be changed). Fix up offenders in src/qemu. * src/qemu/qemu_bridge_filter.h (networkAllowMacOnPort) (networkDisallowMacOnPort): Use intended type. * src/qemu/qemu_bridge_filter.c (networkAllowMacOnPort) (networkDisallowMacOnPort): Likewise. * src/qemu/qemu_command.c (qemuBuildTPMBackendStr) (qemuBuildTPMDevStr, qemuBuildCpuArgStr) (qemuBuildObsoleteAccelArg, qemuBuildMachineArgStr) (qemuBuildSmpArgStr, qemuBuildNumaArgStr): Likewise. * src/qemu/qemu_conf.c (qemuSharedDeviceEntryCopy): Likewise. * src/qemu/qemu_driver.c (qemuDomainSaveImageStartVM): Likewise. * src/qemu/qemu_hostdev.c (qemuDomainHostdevNetConfigVirtPortProfile): Likewise. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONAttachCharDevCommand): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 14 10月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
The regular save image code has the support to compress images using a specified algorithm. This was not implemented for external checkpoints although it shares most of the backend code. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1017227
-
由 Peter Krempa 提交于
The regular save image code has the support to compress images using a specified algorithm. This was not implemented for managed save although it shares most of the backend code.
-
- 11 10月, 2013 3 次提交
-
-
由 Michal Privoznik 提交于
This configuration knob is there to override default listen address for -incoming for all qemu domains. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=994364 Whenever we check for ABI stability, we have new xml (e.g. provided by user, or obtained from snapshot, whatever) which we compare to old xml and see if ABI won't break. However, if the new xml was produced via virDomainGetXMLDesc(..., VIR_DOMAIN_XML_MIGRATABLE) it lacks some devices, e.g. 'pci-root' controller. Hence, the ABI stability check fails even though it is stable. Moreover, we can't simply fix virDomainDefCheckABIStability because removing the correct devices is task for the driver. For instance, qemu driver wants to remove the usb controller too, while LXC driver doesn't. That's why we need special qemu wrapper over virDomainDefCheckABIStability which removes the correct devices from domain XML, produces MIGRATABLE xml and calls the check ABI stability function. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 10 10月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Avoid mixed brace style in an if statement and fix formatting of error messages.
-
- 07 10月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virConnectPtr is passed around loads of nwfilter code in order to provide it as a parameter to the callback registered by the virt drivers. None of the virt drivers use this param though, so it serves no purpose. Avoiding the need to pass a virConnectPtr means that the nwfilterStateReload method no longer needs to open a bogus QEMU driver connection. This addresses a race condition that can lead to a crash on startup. The nwfilter driver starts before the QEMU driver and registers some callbacks with DBus to detect firewalld reload. If the firewalld reload happens while the QEMU driver is still starting up though, the nwfilterStateReload method will open a connection to the partially initialized QEMU driver and cause a crash. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 04 10月, 2013 2 次提交
-
-
由 Cole Robinson 提交于
-
由 Cole Robinson 提交于
Makes things more readable IMO
-
- 27 9月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1011330 (case A) While activeScsiHostdevs and webSocketPorts were allocated in qemuStateInitialize, they were not freed in qemuStateCleanup. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 26 9月, 2013 1 次提交
-
-
由 Chen Hanxiao 提交于
The return value of virDomainControllerFind >=0 means that the specific controller was found. But some functions invoke it and treat 0 as not found. This patch fix these incorrect invocation. Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
-
- 24 9月, 2013 1 次提交
-
-
由 Giuseppe Scrivano 提交于
Signed-off-by: NGiuseppe Scrivano <gscrivan@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 18 9月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
virDomainSetBlockIoTuneEnsureACL was incorrectly called after we already started a job. As a result of this, the job was not cleaned up when an access driver had forbidden the action.
-
- 17 9月, 2013 5 次提交
-
-
由 Peter Krempa 提交于
If the ABI compatibility check with the "migratable" user XML is successful, we would leak the originally parsed XML from the user that would not be used in this case. Reported by Ján Tomko.
-
由 Peter Krempa 提交于
The function implemented common behavior that can be reused for other hypervisor drivers that use the virDomainObj data structures. Factor out the core into a separate helper func.
-
由 Peter Krempa 提交于
The function implemented common behavior that can be reused for other hypervisor drivers that use the virDomainObj data structures. Factor out the core into a separate helper func.
-
由 Peter Krempa 提交于
In the original implementation of external checkpoints I've mistakenly used the live definition to be stored in the save image. The normal approach is to use the "migratable" definition. This was discovered when commit 07966f6a changed the behavior to use a converted XML from the user to do the compatibility check to fix problem when using the regular machine saving. As the previous patch added a compatibility layer, we can now change the type of the XML in the image. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1008340
-
由 Peter Krempa 提交于
External checkpoints have a bug in the implementation where they use the normal definition instead of the "migratable" one. This causes errors when the snapshot is being reverted using the workaround method via qemuDomainRestoreFlags() with a custom XML. This issue was introduced when commit 07966f6a changed the code to compare "migratable" XMLs from the user as we should have used migratable in the image too. This patch adds a compatibility layer, so that fixing the snapshot code won't make existing snapshots fail to load. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1008340
-
- 16 9月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
The function existed in two identical instances in lxc and qemu. Move it to vircgroup.c and simplify it. Refactor the callers too.
-
- 12 9月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
When reverting a live internal snapshot with a live guest the ABI compatiblity check was comparing a "migratable" definition with a normal one. This resulted in the check failing with: revert requires force: Target device address type none does not match source pci This patch generates a "migratable" definition from the actual one to check against the definition from the snapshot to avoid this problem. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1006886
-
- 10 9月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Osier Yang pointed out that ever since commit 31cb030a, the signature of qemuDomainObjEndJob was changed to return a bool. While comparison against 0 or > 0 still gives the right results, it looks fishy; we also had one place that was comparing < 0 which is effectively dead code. * src/qemu/qemu_migration.c (qemuMigrationPrepareAny): Fix dead code bug. (qemuMigrationBegin): Use more canonical form of bool check. * src/qemu/qemu_driver.c (qemuAutostartDomain) (qemuDomainCreateXML, qemuDomainSuspend, qemuDomainResume) (qemuDomainShutdownFlags, qemuDomainReboot, qemuDomainReset) (qemuDomainDestroyFlags, qemuDomainSetMemoryFlags) (qemuDomainSetMemoryStatsPeriod, qemuDomainInjectNMI) (qemuDomainSendKey, qemuDomainGetInfo, qemuDomainScreenshot) (qemuDomainSetVcpusFlags, qemuDomainGetVcpusFlags) (qemuDomainRestoreFlags, qemuDomainGetXMLDesc) (qemuDomainCreateWithFlags, qemuDomainAttachDeviceFlags) (qemuDomainUpdateDeviceFlags, qemuDomainDetachDeviceFlags) (qemuDomainBlockResize, qemuDomainBlockStats) (qemuDomainBlockStatsFlags, qemuDomainMemoryStats) (qemuDomainMemoryPeek, qemuDomainGetBlockInfo) (qemuDomainAbortJob, qemuDomainMigrateSetMaxDowntime) (qemuDomainMigrateGetCompressionCache) (qemuDomainMigrateSetCompressionCache) (qemuDomainMigrateSetMaxSpeed) (qemuDomainSnapshotCreateActiveInternal) (qemuDomainRevertToSnapshot, qemuDomainSnapshotDelete) (qemuDomainQemuMonitorCommand, qemuDomainQemuAttach) (qemuDomainBlockJobImpl, qemuDomainBlockCopy) (qemuDomainBlockCommit, qemuDomainOpenGraphics) (qemuDomainGetBlockIoTune, qemuDomainGetDiskErrors) (qemuDomainPMSuspendForDuration, qemuDomainPMWakeup) (qemuDomainQemuAgentCommand, qemuDomainFSTrim): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 09 9月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Failure to attach to a domain during 'virsh qemu-attach' left the list of domains in an odd state: $ virsh qemu-attach 4176 error: An error occurred, but the cause is unknown $ virsh list --all Id Name State ---------------------------------------------------- 2 foo shut off $ virsh qemu-attach 4176 error: Requested operation is not valid: domain is already active as 'foo' $ virsh undefine foo error: Failed to undefine domain foo error: Requested operation is not valid: cannot undefine transient domain $ virsh shutdown foo error: Failed to shutdown domain foo error: invalid argument: monitor must not be NULL It all stems from leaving the list of domains unmodified on the initial failure; we should follow the lead of createXML which removes vm on failure (the actual initial failure still needs to be fixed in a later patch, but at least this patch gets us to the point where we aren't getting stuck with an unremovable "shut off" transient domain). While investigating, I also found a leak in qemuDomainCreateXML; the two functions should behave similarly. Note that there are still two unusual paths: if dom is not allocated, the user will see an OOM error even though the vm remains registered (but oom errors already indicate tricky cleanup); and if the vm starts and then quits again all before the job ends, it is possible to return a non-NULL dom even though the dom will no longer be useful for anything (but this at least lets the user know their short-lived vm ran). * src/qemu/qemu_driver.c (qemuDomainCreateXML): Don't leak vm on failure to obtain job. (qemuDomainQemuAttach): Match cleanup of qemuDomainCreateXML. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 05 9月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The VIR_FREE() macro will cast away any const-ness. This masked a number of places where we passed a 'const char *' string to VIR_FREE. Fortunately in all of these cases, the variable was not in fact const data, but a heap allocated string. Fix all the variable declarations to reflect this. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 04 9月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=999352 Since commit v1.0.5-56-g449e6b1b (Pull parsing of migration xml up into QEMU driver APIs) any attempt to rename a domain during migration fails with the following error message: internal error Incoming cookie data had unexpected name DOM vs DOM2 This is because migration cookies always use the original domain name and the mentioned commit failed to propagate the name back to qemuMigrationPrepareAny.
-
- 26 8月, 2013 3 次提交
-
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Peter Krempa 提交于
When cpu hotplug fails without reporting an error, we would fail the command but update the count of vCPUs anyways. Commit 761fc481 fixed the case when CPU hot-unplug failed silently, but forgot to fix up the value in this case. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1000357
-
- 22 8月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
The virDomainOpenGraphics method accepts a UNIX socket FD from the client app. It must set the label on this FD otherwise QEMU will be prevented from receiving it with recvmsg. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Peter Krempa 提交于
Re-arrange the code so that the returned bitmap is always initialized to NULL even on early failures and return an error message as some callers are already expecting it. Fix up the rest not to shadow the error.
-
- 17 8月, 2013 1 次提交
-
-
由 Don Dugger 提交于
Currently the virConnectBaselineCPU API does not expose the CPU features that are part of the CPU's model. This patch adds a new flag, VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, that causes the API to explicitly list all features that are part of that model. Signed-off-by: NDon Dugger <donald.d.dugger@intel.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 31 7月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
To allow testing of the cpu updater function, this function needs to be available separately. Export it from qemu_agent.c where it should belong.
-
- 26 7月, 2013 1 次提交
-
-
由 John Ferlan 提交于
Adjust these drivers to handle their Autostart functionality after each of the drivers has gone through their Initialization functions
-