- 15 6月, 2016 1 次提交
-
-
由 Chunyan Liu 提交于
Support creating guest with USB host device in config file. Currently libxl only supports xen PV guest, and only supports specifying USB host device by 'bus number' and 'device number', for example: <hostdev mode='subsystem' type='usb' managed='no'> <source> <address bus='1' device='3'/> </source> </hostdev> Signed-off-by: NChunyan Liu <cyliu@suse.com> Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 14 6月, 2016 1 次提交
-
-
由 Jim Fehlig 提交于
Move capabilities code out of libxl_conf.{ch} and into new libxl_capabilities.{ch} files. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 13 6月, 2016 1 次提交
-
-
由 Wang Yufei 提交于
In libxl driver we do virObjectRef in libxlDomainObjBeginJob, If virCondWaitUntil failed, it goes to error, do virObjectUnref, There's a chance that someone undefine the vm at the same time, and refs unref to zero, vm is freed in libxlDomainObjBeginJob. But the vm outside function is not Null, we do virObjectUnlock(vm). That's how we overwrite the vm memory after it's freed. I fix it. Signed-off-by: NWang Yufei <james.wangyufei@huawei.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 07 6月, 2016 1 次提交
-
-
由 Peter Krempa 提交于
Until now we weren't able to add checks that would reject configuration once accepted by the parser. This patch adds a new callback and infrastructure to add such checks. In this patch all the places where rejecting a now-invalid configuration wouldn't be a good idea are marked with a new parser flag.
-
- 06 6月, 2016 1 次提交
-
-
由 Ján Tomko 提交于
Remove the live attribute and mark the definition as transient whether the domain is runing or not. There were only two callers left calling with live=false: * testDomainStartState, where the domain already is active because we assigned vm->def->id just a few lines above the call * virDomainObjGetPersistentDef, which now only calls virDomainObjSetDefTransient for an active domain
-
- 25 5月, 2016 1 次提交
-
-
由 Jim Fehlig 提交于
Xen only supports network-based disks with the qemu (aka qdisk) driver. Set the driverName to 'qemu' in libxlDomainDeviceDefPostParse() if not already set. When starting a domain with network-based disks, ensure the driverName is 'qemu'. Resolves: https://bugzilla.opensuse.org/show_bug.cgi?id=981094
-
- 20 5月, 2016 1 次提交
-
-
由 Jovanka Gulicoska 提交于
Convert to virGetLastErrorMessage() in the rest of the code
-
- 11 5月, 2016 2 次提交
-
-
由 Jim Fehlig 提交于
Xen 4.6 introduced a new migration stream commonly referred to as "migration V2". Xen 4.6 and newer always produce this new stream, whereas Xen 4.5 and older always produce the legacy stream. Support for migration stream V2 can be detected at build time with LIBXL_HAVE_SRM_V2 from libxl.h. The legacy and V2 streams are not compatible, but a V2 host can accept and convert a legacy stream. Commit e7440656 changed the libxl driver to use the lowest libxl API version possible (version 0x040200) to ensure the driver builds against older Xen releases. The old 4.2 restore API does not support specifying a stream version and assumes a legacy stream, even if the incoming stream is migration V2. Thinking it has been given a legacy stream, libxl will fail to convert an incoming stream that is already V2, which causes the entire restore operation to fail. Xen's libvirt-related OSSTest has been failing since commit e7440656 landed in libvirt.git master. One of the more recent failures can be seen here http://lists.xenproject.org/archives/html/xen-devel/2016-05/msg00071.html This patch changes the call to libxl_domain_create_restore() to include the stream version if LIBXL_HAVE_SRM_V2 is defined. The version field of the libxlSavefileHeader struct is also updated to '2' when LIBXL_HAVE_SRM_V2 is defined, ensuring the stream version in the header matches the actual stream version produced by Xen. Along with bumping the libxl API requirement to 0x040400, this patch fixes save/restore on a migration V2 Xen host. Oddly, migration has never used the libxlSavefileHeader. It handles passing configuration in the Begin and Prepare phases, and then calls libxl directly to transfer domain state/memory in the Perform phase. A subsequent patch will add stream version handling in the Begin and Prepare phase handshaking, which will fix the migration related OSSTest failures. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Jim Fehlig 提交于
In LIBXL_API_VERSION 0x040400, the libxl_domain_create_restore API gained a parameter for specifying restore parameters. Switch to using version 0x040400, which will be useful in a subsequent commit to specify the Xen migration stream version when restoring. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 16 4月, 2016 1 次提交
-
-
由 Jim Fehlig 提交于
To ensure the libvirt libxl driver will build with future versions of Xen where the libxl API may change in incompatible ways, explicitly use LIBXL_API_VERSION 0x040200. The libxl driver does use new libxl APIs that have been added since Xen 4.2, but currently it does not make use of any changes made to existing APIs such as libxl_domain_create_restore or libxl_set_vcpuaffinity. The version can be bumped if/when the libxl driver consumes the changed APIs. Further details can be found in the following discussion thread https://www.redhat.com/archives/libvir-list/2016-April/msg00178.htmlSigned-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 14 4月, 2016 1 次提交
-
-
由 Chunyan Liu 提交于
Add codes to support creating domain with network defition of assigning SRIOV VF from a pool. Signed-off-by: NChunyan Liu <cyliu@suse.com> Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 08 4月, 2016 1 次提交
-
-
由 Wei Liu 提交于
In the latest libxenlight code, libxl_domain_create_restore accepts a new argument. Update libvirt's libxl driver for that. Use the macro provided by libxenlight to detect which version should be used. The new parameter (send_back_fd) is set to -1 because libvirt provides no such fd. Signed-off-by: NWei Liu <wei.liu2@citrix.com> Message-id: 1459866012-27081-1-git-send-email-wei.liu2@citrix.com
-
- 30 3月, 2016 3 次提交
-
-
由 Jim Fehlig 提交于
Remove disabling domain death events from libxlDomainStart error path. The domain death event is already disabled in libxlDomainCleanup. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Chunyan Liu 提交于
libxlDomainStart allocates and reserves resources that were not being released in error paths. libxlDomainCleanup already handles the job of releasing resources, and libxlDomainStart should call it when encountering a failure. Change the error handling logic to call libxlDomainCleanup on failure. This includes acquiring the lease sooner and allowing it to be released in libxlDomainCleanup on failure, similar to the way other resources are reclaimed. With the lease now released in libxlDomainCleanup, the release_dom label can be renamed to cleanup_dom to better reflect its changed semantics. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Jim Fehlig 提交于
Rename cleanup_dom label to destroy_dom, which better describes what it does. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 09 3月, 2016 1 次提交
-
-
由 Peter Krempa 提交于
Introduce a helper to check supported device and domain config and move the memory hotplug checks to it. The advantage of this approach is that by default all new features are considered unsupported by all hypervisors unless specifically changed rather than the previous approach where every hypervisor would need to declare that a given feature is unsupported.
-
- 25 2月, 2016 1 次提交
-
-
由 Joao Martins 提交于
Introduce support for domainInterfaceStats API call for querying network interface statistics. Consequently it also enables the use of `virsh domifstat <dom> <interface name>` command plus seeing the interfaces names instead of "-" when doing `virsh domiflist <dom>`. After successful guest creation we fill the network interfaces names based on domain, device id and append suffix if it's emulated in the following form: vif<domid>.<devid>[-emu]. We extract the network interfaces info from the libxl_domain_config object in libxlDomainCreateIfaceNames() to generate ifname. On domain cleanup we also clear ifname, in case it was set by libvirt (i.e. being prefixed with "vif"). We also skip these two steps in case the name of the interface was manually inserted by the administrator. Since the introduction of netprefix (commit a040ba9e), ifnames with a registered prefix will be freed on virDomain{Obj,Def}Format*, thus eliminating the migration issues observed with the reverted commit d2e5538b whereas source and destination would have the same ifname. For getting the interface statistics we resort to virNetInterfaceStats and let libvirt handle the platform specific nits. Note that the latter is not yet supported in FreeBSD. Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
-
- 24 2月, 2016 1 次提交
-
-
由 Chunyan Liu 提交于
Signed-off-by: NChunyan Liu <cyliu@suse.com>
-
- 08 2月, 2016 2 次提交
-
-
由 Peter Krempa 提交于
Now with the new struct the data can be stored in a much saner place.
-
由 Peter Krempa 提交于
This step can be omitted, so that drivers can decide what to do when the user requests to use default vcpu pinning.
-
- 05 2月, 2016 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virDomainObjFormat and virDomainSaveStatus methods both call into virDomainDefFormat, so should be providing a non-NULL virCapsPtr instance. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 04 2月, 2016 1 次提交
-
-
由 Joao Martins 提交于
And use the newly added caps->host.netprefix (if it exists) for interface names that match the autogenerated target names. Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
-
- 27 1月, 2016 1 次提交
-
-
由 Pavel Hrdina 提交于
The current code was a little bit odd. At first we've removed all possible implicit input devices from domain definition to add them later back if there was any graphics device defined while parsing XML description. That's not all, while formating domain definition to XML description we at first ignore any input devices with bus different to USB and VIRTIO and few lines later we add implicit input devices to XML. This seems to me as a lot of code for nothing. This patch may look to be more complicated than original approach, but this is a preferred way to modify/add driver specific stuff only in those drivers and not deal with them in common parsing/formating functions. The update is to add those implicit input devices into config XML to follow the real HW configuration visible by guest OS. There was also inconsistence between our behavior and QEMU's in the way, that in QEMU there is no way how to disable those implicit input devices for x86 architecture and they are available always, even without graphics device. This applies also to XEN hypervisor. VZ driver already does its part by putting correct implicit devices into live XML. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 11 1月, 2016 1 次提交
-
-
由 Martin Kletzander 提交于
This way both Domain and Device PostParse functions can act based on the flags. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 16 12月, 2015 1 次提交
-
-
由 Joao Martins 提交于
Introduce support for domainGetJobInfo to get info about the ongoing job. If the job is active it will update the timeElapsed which is computed with the "started" field added to struct libxlDomainJobObj. For now we support just the very basic info and all jobs have VIR_DOMAIN_JOB_UNBOUNDED (i.e. no completion time estimation) plus timeElapsed computed. Openstack Kilo uses the Job API to monitor live-migration progress which is currently nonexistent in libxl driver and therefore leads to a crash in the nova compute node. Right now, migration doesn't use jobs in the source node and will return VIR_DOMAIN_JOB_NONE. Though nova handles this case and will migrate it properly instead of crashing. Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
-
- 09 12月, 2015 1 次提交
-
-
由 Pavel Hrdina 提交于
We should make a copy of current definition to preserve a persistent definition, because we later update the definition with live changes. The live definition is discarded on domain shutdown and replaced by the copy we make before starting the domain. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 08 12月, 2015 1 次提交
-
-
由 Jim Fehlig 提交于
This reverts commit d2e5538b. A migration regression was introduced by this commit. When migrating a domain, its active XML is sent to the destination libvirtd, where it is parsed as inactive XML. d2e5538b copied the libxl generated interface name into the active config, which was being passed to the migration destination and being parsed into inactive config. Attempting to start the config could result in failure if an interface with the same generated name already exists. The qemu driver behaves similarly, but the parser contains a hack to skip interface names starting with 'vnet' when parsing inactive XML. We could extend the hack to skip names starting with 'vif' too, but a better fix would be to expose these hypervisor-specific interface name prefixes in capabilities. See the following discussion thread for more details https://www.redhat.com/archives/libvir-list/2015-December/msg00262.html For the pending 1.3.0 release, it is best to revert d2e5538b. It can be added again post release, after moving the prefix to capabilities.
-
- 03 12月, 2015 1 次提交
-
-
由 Joao Martins 提交于
Introduce support for domainInterfaceStats API call for querying network interface statistics. Consequently it also enables the use of `virsh domifstat <dom> <interface name>` command plus seeing the interfaces names instead of "-" when doing `virsh domiflist <dom>`. After successful guest creation we fill the network interfaces names based on domain, device id and append suffix if it's emulated in the following form: vif<domid>.<devid>[-emu]. We extract the network interfaces info from the libxl_domain_config object in libxlDomainCreateIfaceNames() to generate ifname. On domain cleanup we also clear ifname, in case it was set by libvirt (i.e. being prefixed with "vif"). We also skip these two steps in case the name of the interface was manually inserted by the adminstrator. For getting the interface statistics we resort to virNetInterfaceStats and let libvirt handle the platform specific nits. Note that the latter is not yet supported in FreeBSD. Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
-
- 13 8月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
This needs a reorder of XML option definitions. It might come in handy one day. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 09 7月, 2015 1 次提交
-
-
由 Jim Fehlig 提交于
Set the state of virDomainObj in the functions that actually change the domain state, instead of the generic libxlDomainCleanup function. This approach gives functions calling libxlDomainCleanup more flexibility wrt when and how they change virDomainObj state via virDomainObjSetState. The prior approach of calling virDomainObjSetState in libxlDomainCleanup resulted in the following incorrect coding pattern in the various functions that change domain state libxlDomain<DoStateTransition> call libxl function to do state transition emit lifecycle event libxlDomainCleanup virDomainObjSetState Once simple manifestation of this bug is seeing a domain running in virt-manager after selecting the shutdown button, even after the domain has long shutdown.
-
- 20 6月, 2015 1 次提交
-
-
由 Ian Campbell 提交于
If vm->def->cputune.nvcpupin is 0 in libxlDomainSetVcpuAffinities (as seems to be the case on arm) then the VIR_FREE after cleanup: would be operating on an uninitialised pointer in map.map. Fix this by using libxl_bitmap_init and libxl_bitmap_dispose in the appropriate places (like VIR_FREE, libxl_bitmap_dispose is also idempotent, so there is no double free on exit from the loop). libxl_bitmap_dispose is slightly preferable since it also sets map.size back to 0, avoiding a potential source of confusion. This fixes the crashes we've been seeing in the Xen automated tests on ARM. I had a glance at the handful of other users of libxl_bitmap and none of them looked to have a similar issue. Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
-
- 19 6月, 2015 1 次提交
-
-
由 Jiri Denemark 提交于
So that they can format private data (e.g., disk private data) stored elsewhere in the domain object. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 04 6月, 2015 2 次提交
-
-
由 Peter Krempa 提交于
The vCPU pinning definition gets removed when the domain definition is being freed later. If there is no next configuration it would remove the configured pinning.
-
由 Ján Tomko 提交于
-
- 03 6月, 2015 2 次提交
-
-
由 Peter Krempa 提交于
Libxl's vcpu pinning would work only if the vcpu array was ordered and was not sparse. Remove the condition and iterate the pinning array properly.
-
由 Peter Krempa 提交于
-
- 29 5月, 2015 2 次提交
-
-
由 Jim Fehlig 提交于
libxl recently gained support for QXL video device. Support it in the libxl driver too. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Jim Fehlig 提交于
A later change will use the PortAllocator for SPICE too. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 30 4月, 2015 1 次提交
-
-
由 Jim Fehlig 提交于
Provide integration with libvirt's lock manager in the libxl driver. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 21 4月, 2015 1 次提交
-
-
由 Cole Robinson 提交于
This needs to specified in way too many places for a simple validation check. The ostype/arch/virttype validation checks later in DomainDefParseXML should catch most of the cases that this was covering.
-