- 14 5月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Follows on the heels of other bool cleanups, such as commit 93002b98. * src/qemu/qemu_monitor.h (qemuMonitorOpen, qemuMonitorOpenFD): Update json parameter type. * src/qemu/qemu_monitor.c (qemuMonitorOpen, qemuMonitorOpenFD): Likewise. (_qemuMonitor): Adjust field type. * src/qemu/qemu_domain.h (_qemuDomainObjPrivate): Likewise. * src/qemu/qemu_domain.c (qemuDomainObjPrivateXMLParse): Adjust client. * src/qemu/qemu_process.c (qemuProcessStart): Likewise. * tests/qemumonitortestutils.c (qemuMonitorTestNew): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 03 5月, 2013 1 次提交
-
-
由 Eric Blake 提交于
POSIX says pthread_t is opaque. We can't guarantee if it is scaler or a pointer, nor what size it is; and BSD differs from Linux. We've also had reports of gcc complaining on attempts to cast it, if we use a cast to the wrong type (for example, pointers have to be cast to void* or intptr_t before being narrowed; while casting a function return of scalar pthread_t to void* triggers a different warning). Give up on casts, and use unions to get at decent bits instead. And rather than futz around with figuring which 32 bits of a potentially 64-bit pointer are most likely to be unique, convert the rest of the code base to use 64-bit values when using a debug id. Based on a report by Guido Günther against kFreeBSD, but with a fix that doesn't regress commit 4d970fd2 for FreeBSD. * src/util/virthreadpthread.c (virThreadSelfID, virThreadID): Use union to get at a decent bit representation of thread_t bits. * src/util/virthread.h (virThreadSelfID, virThreadID): Alter signature. * src/util/virthreadwin32.c (virThreadSelfID, virThreadID): Likewise. * src/qemu/qemu_domain.h (qemuDomainJobObj): Alter type of owner. * src/qemu/qemu_domain.c (qemuDomainObjTransferJob) (qemuDomainObjSetJobPhase, qemuDomainObjReleaseAsyncJob) (qemuDomainObjBeginNestedJob, qemuDomainObjBeginJobInternal): Fix clients. * src/util/virlog.c (virLogFormatString): Likewise. * src/util/vireventpoll.c (virEventPollInterruptLocked): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 16 4月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Instead of calling virCgroupForDomain every time we need the virCgrouPtr instance, just do it once at Vm startup and cache a reference to the object in qemuDomainObjPrivatePtr until shutdown of the VM. Removing the virCgroupPtr from the QEMU driver state also means we don't have stale mount info, if someone mounts the cgroups filesystem after libvirtd has been started Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 05 4月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
This patch implements the devices post parse callback and uses it to fill the default qemu network card model into the XML if none is specified. Libvirt assumes that the network card model for qemu is the "rtl8139". Record this in the XML using the new callback to avoid user confusion.
-
- 14 3月, 2013 1 次提交
-
-
由 Viktor Mihajlovski 提交于
This commit adds the QEMU driver support for CCW addresses. The current QEMU only allows virtio devices to be attached to the CCW bus. We named the new capability indicating that support QEMU_CAPS_VIRTIO_CCW accordingly. The fact that CCW devices can only be assigned to domains with a machine type of s390-ccw-virtio requires a few extra checks for machine type in qemu_command.c on top of querying QEMU_CAPS_VIRTIO_{CCW|S390}. The majority of the new functions deals with CCW address generation and management. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
- 13 3月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
The virCaps structure gathered a ton of irrelevant data over time that. The original reason is that it was propagated to the XML parser functions. This patch aims to create a new data structure virDomainXMLConf that will contain immutable data that are used by the XML parser. This will allow two things we need: 1) Get rid of the stuff from virCaps 2) Allow us to add callbacks to check and add driver specific stuff after domain XML is parsed. This first attempt removes pointers to private data allocation functions to this new structure and update all callers and function that require them.
-
- 01 3月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
This reverts the hack done in commit 568a6cda Author: Jiri Denemark <jdenemar@redhat.com> Date: Fri Feb 15 15:11:47 2013 +0100 qemu: Avoid deadlock in autodestroy since we now have a fix which avoids the deadlock scenario entirely
-
由 Jiri Denemark 提交于
qemuProcessStart expects to be run with a job already set and every caller except for qemuMigrationPrepareAny use it correctly. This bug can be observed in libvirtd logs during incoming migration as warning : qemuDomainObjEnterMonitorInternal:979 : This thread seems to be the async job owner; entering monitor without asking for a nested job is dangerous
-
- 23 2月, 2013 2 次提交
-
-
由 Michal Privoznik 提交于
This migration cookie is meant for two purposes. The first is to be sent in begin phase from source to destination to let it know we support new implementation of VIR_MIGRATE_NON_SHARED_{DISK,INC} so destination can start NBD server. Then, the second purpose is, destination can let us know, on which port the NBD server is running.
-
由 Jiri Denemark 提交于
As a side effect, this also fixes reporting disk migration process. It was added to memory migration progress, which was wrong. Disk progress has dedicated fields in virDomainJobInfo structure.
-
- 21 2月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
Since closeCallbacks were turned into virObjectLockable, we can no longer call virQEMUCloseCallbacks APIs from within a registered close callback.
-
- 13 2月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
With the majority of fields in the virQEMUDriverPtr struct now immutable or self-locking, there is no need for practically any methods to be using the QEMU driver lock. Only a handful of helper APIs in qemu_conf.c now need it
-
- 08 2月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
To avoid confusion between 'virCapsPtr' and 'qemuCapsPtr' do some renaming of various fucntions/variables. All instances of 'qemuCapsPtr' are renamed to 'qemuCaps'. To avoid that clashing with the 'qemuCaps' typedef though, rename the latter to virQEMUCaps. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 05 1月, 2013 2 次提交
-
-
由 John Eckersberg 提交于
The functionality provided in virchrdev.c (previously virconsole.c) is applicable to other types of character devices besides consoles, such as channels. This patch is just code motion, renaming things such as "console" or "pty", instead using more general terms such as "character device" or "device path".
-
由 John Eckersberg 提交于
This is just code motion, in preparation to rename identifiers to be less console-specific.
-
- 21 12月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 29 11月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
Replace the following names * struct qemu_snap_remove with virQEMUSnapRemovePtr * struct qemu_snap_reparent with virQEMUSnapReparentPtr * struct qemu_save_header with virQEMUSaveHeaderPtr * enum qemu_save_formats with virQEMUSaveFormat Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Remove the obsolete 'qemud' naming prefix and underscore based type name. Introduce virQEMUDriverPtr as the replacement, in common with LXC driver naming style
-
- 12 11月, 2012 1 次提交
-
-
由 Michal Privoznik 提交于
Currently, if user calls virDomainAbortJob we just issue 'migrate_cancel' and hope for the best. However, if user calls the API in wrong phase when migration hasn't been started yet (perform phase) the cancel request is just ignored. With this patch, the request is remembered and as soon as perform phase starts, migration is cancelled.
-
- 03 11月, 2012 1 次提交
-
-
由 Peter Krempa 提交于
The new external system checkpoints will require an async job while the snapshot is taken. This patch adds QEMU_ASYNC_JOB_SNAPSHOT to track this job type.
-
- 20 10月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Technically, we should not be re-probing any file that qemu might be currently writing to. As such, we should cache the backing file chain prior to starting qemu. This patch adds the cache, but does not use it until the next patch. Ultimately, we want to also store the chain in domain XML, so that it is remembered across libvirtd restarts, and so that the only kosher way to modify the backing chain of an offline domain will be through libvirt API calls, but we aren't there yet. So for now, we merely invalidate the cache any time we do a live operation that alters the chain (block-pull, block-commit, external disk snapshot), as well as tear down the cache when the domain is not running. * src/conf/domain_conf.h (_virDomainDiskDef): New field. * src/conf/domain_conf.c (virDomainDiskDefFree): Clean new field. * src/qemu/qemu_domain.h (qemuDomainDetermineDiskChain): New prototype. * src/qemu/qemu_domain.c (qemuDomainDetermineDiskChain): New function. * src/qemu/qemu_driver.c (qemuDomainAttachDeviceDiskLive) (qemuDomainChangeDiskMediaLive): Pre-populate chain. (qemuDomainSnapshotCreateSingleDiskActive): Uncache chain before snapshot. * src/qemu/qemu_process.c (qemuProcessHandleBlockJob): Update chain after block pull.
-
- 11 10月, 2012 1 次提交
-
-
由 Jiri Denemark 提交于
Using VIR_DOMAIN_XML_MIGRATABLE flag, one can request domain's XML configuration that is suitable for migration or save/restore. Such XML may contain extra run-time stuff internal to libvirt and some default configuration may be removed for better compatibility of the XML with older libvirt releases. This flag may serve as an easy way to get the XML that can be passed (after desired modifications) to APIs that accept custom XMLs, such as virDomainMigrate{,ToURI}2 or virDomainSaveFlags.
-
- 21 9月, 2012 1 次提交
-
-
由 Eric Blake 提交于
https://www.gnu.org/licenses/gpl-howto.html recommends that the 'If not, see <url>.' phrase be a separate sentence. * tests/securityselinuxhelper.c: Remove doubled line. * tests/securityselinuxtest.c: Likewise. * globally: s/; If/. If/
-
- 13 9月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
The current qemu capabilities are stored in a virBitmapPtr object, whose type is exposed to callers. We want to store more data besides just the flags, so we need to move to a struct type. This object will also need to be reference counted, since we'll be maintaining a cache of data per binary. This change introduces a 'qemuCapsPtr' virObject class. Most of the change is just renaming types and variables in all the callers Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 24 8月, 2012 1 次提交
-
-
由 Eric Blake 提交于
This has several benefits: 1. Future snapshot-related code has a definite place to go (and I _will_ be adding some) 2. Snapshot errors now use the VIR_FROM_DOMAIN_SNAPSHOT error classification, which has been underutilized (previously only in libvirt.c) * src/conf/domain_conf.h, domain_conf.c: Split... * src/conf/snapshot_conf.h, snapshot_conf.c: ...into new files. * src/Makefile.am (DOMAIN_CONF_SOURCES): Build new files. * po/POTFILES.in: Mark new file for translation. * src/vbox/vbox_tmpl.c: Update caller. * src/esx/esx_driver.c: Likewise. * src/qemu/qemu_command.c: Likewise. * src/qemu/qemu_domain.h: Likewise.
-
- 09 8月, 2012 1 次提交
-
-
由 Jiri Denemark 提交于
Previously, qemu did not respond to monitor commands during migration if the limit was too high. This prevented us from raising the limit earlier. The qemu issue seems to be fixed (according to my testing) and we may remove the 32Mb/s limit.
-
- 07 8月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Switch virDomainObjPtr to use the virObject APIs for reference counting. The main change is that virObjectUnref does not return the reference count, merely a bool indicating whether the object still has any refs left. Checking the return value is also not mandatory. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 23 7月, 2012 1 次提交
-
-
由 Osier Yang 提交于
Per the FSF address could be changed from time to time, and GNU recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html) You should have received a copy of the GNU General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>. This patch removes the explicit FSF address, and uses above instead (of course, with inserting 'Lesser' before 'General'). Except a bunch of files for security driver, all others are changed automatically, the copyright for securify files are not complete, that's why to do it manually: src/security/security_selinux.h src/security/security_driver.h src/security/security_selinux.c src/security/security_apparmor.h src/security/security_apparmor.c src/security/security_driver.c
-
- 15 6月, 2012 1 次提交
-
-
由 Wen Congyang 提交于
This patch updates qemu driver to allow the client to choose the vmcore's format: memory only or including device state.
-
- 07 5月, 2012 1 次提交
-
-
由 Jiri Denemark 提交于
When we added the default USB controller into domain XML, we efficiently broke migration to older versions of libvirt that didn't support USB controllers at all (0.9.4 and earlier) even for domains that don't use anything that the older libvirt can't provide. We still want to present the default USB controller in any XML seen by a user/app but we can safely remove it from the domain XML used during migration. If we are migrating to a new enough libvirt, it will add the controller XML back, while older libvirt won't be confused with it although it will still tell qemu to create the controller. Similar approach can be used in the future whenever we find out we always enabled some kind of device without properly advertising it in domain XML.
-
- 05 5月, 2012 1 次提交
-
-
由 Jiri Denemark 提交于
Always use appropriate qemuDomain{,Def}Format wrapper since it may do some additional magic based on the flags.
-
- 11 4月, 2012 2 次提交
-
-
由 Jiri Denemark 提交于
In case an API fails with "cannot acquire state change lock", searching for the API that possibly forgot to end its job is not always easy. Let's keep track of the job owner and print it out for easier identification.
-
由 Jiri Denemark 提交于
As reported by Daniel Berrangé, we have a huge performance regression for virDomainGetInfo() due to the change which makes virDomainEndJob() save the XML status file every time it is called. Previous to that change, 2000 calls to virDomainGetInfo() took ~2.5 seconds. After that change, 2000 calls to virDomainGetInfo() take 2 *minutes* 45 secs. We made the change to be able to recover from libvirtd restart in the middle of a job. However, only destroy and async jobs are taken care of. Thus it makes more sense to only save domain state XML when these jobs are started/stopped.
-
- 22 3月, 2012 3 次提交
-
-
由 Jiri Denemark 提交于
Destination daemon should not rely on the client or source daemon (depending on the type of migration) to call Finish when migration fails, because the client may crash before it can do so. The domain prepared for incoming migration is set to be destroyed (and migration job cleaned up) when connection with the client closes but this is not enough. If the associated qemu process crashes after Prepare step and the domain is cleaned up before the connection gets closed, autodestroy is not called for the domain and migration jobs remains set. In case the domain is defined on destination host (i.e., it is not completely removed once destroyed) we keep the job set for ever. To fix this, we register a cleanup callback which is responsible to clean migration-in job when a domain dies anywhere between Prepare and Finish steps. Note that we can't blindly clean any job when spotting EOF on monitor since normally an API is running at that time.
-
由 Jiri Denemark 提交于
Add support for registering cleanup callbacks to be run when a domain transitions to shutoff state.
-
由 Jiri Denemark 提交于
This reverts commit 61f2b6ba and most of commit d8916dc8, which effectively brings back commit ef1065cf written by Jim Fehlig: The qemu migration speed default is 32MiB/s as defined in migration.c /* Migration speed throttling */ static int64_t max_throttle = (32 << 20); There's no need to throttle migration when targeting a file, so set migration speed to unlimited prior to migration, and restore to libvirt default value after migration. Default units is MB for migrate_set_speed monitor command, so (INT64_MAX / (1024 * 1024)) is used for unlimited migration speed. This was reverted because migration to file could not be canceled and even monitored since qemu was not processing any monitor commands until the migration finished. This is now different as we make sure the file descriptor we pass to qemu is able to properly report EAGAIN. Recent qemu changes might have helped as well. I tested managedsave with this patch in and indeed, it is 10x faster while I can still monitor its progress.
-
- 13 3月, 2012 1 次提交
-
-
由 Jiri Denemark 提交于
When host-model and host-passthrouh CPU modes were introduced, qemu driver was properly modify to update guest CPU definition during migration so that we use the right CPU at the destination. However, similar treatment is needed for (managed)save and snapshots since they need to save the exact CPU so that a domain can be properly restored. To avoid repetition of such situation, all places that need live XML share the code which generates it. As a side effect, this patch fixes error reporting from qemuDomainSnapshotWriteMetadata().
-
- 27 2月, 2012 1 次提交
-
-
由 Peter Krempa 提交于
This patch fixes console corruption, that happens if two concurrent sessions are opened for a single console on a domain. Result of this corruption was that each of the console streams recieved just a part of the data written to the pipe so every console rendered unusable. New helper function for safe console handling is used to establish the console stream connection. This function ensures that no other libvirt client is using the console (with the ability to disconnect consoles of libvirt clients) and that no UUCP style lockfile is placed on the PTY device. * src/qemu/qemu_domain.h - add data structure to domain's private data dealing with console connections * src/qemu/qemu_domain.c: - allocate/free domain's console data structure * src/qemu/qemu_driver.c - use the new helper function for console handling
-
- 24 1月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
There is now a standard QEMU guest agent that can be installed and given a virtio serial channel <channel type='unix'> <source mode='bind' path='/var/lib/libvirt/qemu/f16x86_64.agent'/> <target type='virtio' name='org.qemu.guest_agent.0'/> </channel> The protocol that runs over the guest agent is JSON based and very similar to the JSON monitor. We can't use exactly the same code because there are some odd differences in the way messages and errors are structured. The qemu_agent.c file is based on a combination and simplification of qemu_monitor.c and qemu_monitor_json.c * src/qemu/qemu_agent.c, src/qemu/qemu_agent.h: Support for talking to the agent for shutdown * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h: Add thread helpers for talking to the agent * src/qemu/qemu_process.c: Connect to agent whenever starting a guest * src/qemu/qemu_monitor_json.c: Make variable static
-
- 16 12月, 2011 1 次提交
-
-
由 Jim Fehlig 提交于
In commit 6f84e110 I mistakenly set default migration speed to 33554432 Mb! The units of migMaxBandwidth is Mb, with conversion handled in qemuMonitor{JSON,Text}SetMigrationSpeed(). Also, remove definition of QEMU_DOMAIN_FILE_MIG_BANDWIDTH_MAX since it is no longer used after reverting commit ef1065cf.
-