- 22 2月, 2018 1 次提交
-
-
由 Jim Fehlig 提交于
libxl supports setting the domain real time clock to local time or UTC via the localtime field of libxl_domain_build_info. Adjustment of the clock is also supported via the rtc_timeoffset field. The libvirt libxl driver has never supported these settings, instead relying on libxl's default of a UTC real time clock with adjustment set to 0. There is at least one user that would like the ability to change the defaults https://www.redhat.com/archives/libvirt-users/2018-February/msg00059.html Add support for specifying a local time clock and for specifying an adjustment for both local time and UTC clocks. Add a test case to verify the XML to libxl_domain_config conversion. Local time clock and clock adjustment is already supported by the XML <-> xl.cfg converter. What is missing is an explicit test for the conversion. There are plenty of existing tests that all use UTC with 0 adjustment. Hijack test-fullvirt-tsc-timer to test a local time clock with 1 hour adjustment. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 20 2月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
The controller model is slightly unusual in that the default value is -1, not 0. As a result the default value is not covered by any of the existing enum cases. This in turn means that any switch() statements that think they have covered all cases, will in fact not match the default value at all. In the qemuDomainDeviceCalculatePCIConnectFlags() method this has caused a serious mistake where we fallthrough from the SCSI controller case, to the VirtioSerial controller case, and from the USB controller case to the IDE controller case. By adding explicit enum constant starting at -1, we can ensure switches remember to handle the default case. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 09 12月, 2017 1 次提交
-
-
vif-* scripts support it for a long time, and expect addresses to be separated by spaces. Add appropriate support to libxl driver. Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
- 13 11月, 2017 1 次提交
-
-
由 Wim ten Have 提交于
This patch generates a NUMA distance-aware libxl description from the information extracted from a NUMA distance-aware libvirt XML file. By default, if no NUMA node distance information is supplied in the libvirt XML file, this patch uses the distances 10 for local and 20 for remote nodes/sockets. Signed-off-by: NWim ten Have <wim.ten.have@oracle.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com> Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 07 11月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Similarly to how we store gluster names, split the name into a pool and image portions when paring the XML and store them separately.
-
- 19 10月, 2017 2 次提交
-
-
由 Pavel Hrdina 提交于
There is no need to have two different enums where one has the same values as the other one with some additions. Currently for on_poweroff and on_reboot we allow only subset of actions that are allowed for on_crash. This was covered in parse time using two different enums. Now to make sure that we don't allow setting actions that are not supported we need to check it while validating domain config. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 20 9月, 2017 1 次提交
-
-
由 Ashish Mittal 提交于
Add a new virStorageNetProtocol for Veritas HyperScale (VxHS) disks Signed-off-by: NAshish Mittal <Ashish.Mittal@veritas.com> Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 24 7月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Currently, @port is type of string. Well, that's overkill and waste of memory. Port is always an integer. Use it as such. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 11 7月, 2017 1 次提交
-
-
由 Daniel P. Berrange 提交于
The HOST_NAME_MAX, INET_ADDRSTRLEN and VIR_LOOPBACK_IPV4_ADDR constants are only used by a handful of files, so are better kept in virsocketaddr.h or the source file that uses them. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 13 6月, 2017 1 次提交
-
-
由 Marc Hartmayer 提交于
Use ATTRIBUTE_FALLTHROUGH, introduced by commit 5d84f596, instead of comments to indicate that the fall through is an intentional behavior. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
- 07 6月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
virDomainXMLOption gains driver specific callbacks for parsing and formatting save cookies. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
- 05 6月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
While checking for ABI stability, drivers might pose additional checks that are not valid for general case. For instance, qemu driver might check some memory backing attributes because of how qemu works. But those attributes may work well in other drivers. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 24 5月, 2017 1 次提交
-
-
由 Jim Fehlig 提交于
Attempting to start a domain with USB hostdevs but no USB controllers fails with the rather cryptic error libxl: error: libxl_qmp.c:287:qmp_handle_error_response: received an error message from QMP server: Bus 'xenusb-0.0' not found This can be fixed by creating default USB controllers. When no USB controllers are defined, create the number of 8 port controllers necessary to accommodate the number of defined USB devices. Note that USB controllers are already created as needed in the domainAttachDevice code path. E.g. a USB controller will be created, if necessary, when attaching a USB device with 'virsh attach-device dom usbdev.xml'.
-
- 23 5月, 2017 1 次提交
-
-
由 Jim Fehlig 提交于
If a VNC listen address is not specified in domXML, libxl will default to 127.0.0.1, but this is never reflected in the domXML. In the case of spice, a missing listen address resulted in listening on all interfaces, i.e. '0.0.0.0'. If not specified, set the listen address in virDomainGraphicsDef struct to the libxl default when creating the frame buffer device. Additionally, set default spice listen address to 127.0.0.1.
-
- 28 4月, 2017 1 次提交
-
-
由 Wim ten Have 提交于
Xen feature nestedhvm is the option on Xen 4.4+ which enables nested virtualization when mode host-passthrough is applied. nested HVM is enabled by adding below on the target domain; <cpu mode='host-passthrough'/> Virtualization on target domain can be disabled by specifying such under feature policy rule on target name; [On Intel (VT-x) architecture] <feature policy='disable' name='vmx'/> or: [On AMD (AMD-V) architecture] <feature policy='disable' name='svm'/> Signed-off-by: NJoao Martins <joao.m.martins@oracle.com> Signed-off-by: NWim ten Have <wim.ten.have@oracle.com>
-
- 16 2月, 2017 1 次提交
-
-
由 Jim Fehlig 提交于
Commit 4ab0c959 fixed a memory leak in libxlDriverGetDom0MaxmemConf but introduced a potential double free of mem_tokens *** Error in `/usr/sbin/libvirtd': double free or corruption (out): 0x00007fffc808cfd0 *** Avoid double free by setting mem_tokens to NULL after calling virStringListFree.
-
- 11 2月, 2017 1 次提交
-
-
由 John Ferlan 提交于
If either the "if (STRPREFIX(mem_tokens[j], "max:"))" is never entered or the "if (virStrToLong_ull(mem_tokens[j] + 4, &p, 10, maxmem) < 0)" break is hit, control goes back to the outer loop processing 'cmd_tokens' and it's possible that the 'mem_tokens' would be overwritten. Found by Coverity
-
- 10 2月, 2017 3 次提交
-
-
由 Jim Fehlig 提交于
When the libxl driver is initialized, it creates a virDomainDef object for dom0 and adds it to the list of domains. Total memory for dom0 was being set from the max_memkb field of libxl_dominfo struct retrieved from libxl, but this field can be set to LIBXL_MEMKB_DEFAULT (~0ULL) if dom0 maximum memory has not been explicitly set by the user. This patch adds some simple parsing of the Xen commandline, looking for a dom0_mem parameter that also specifies a 'max' value. If not specified, dom0 maximum memory is effectively all physical host memory. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Jim Fehlig 提交于
When a user does not explicitly set a <driver> in the disk config, libvirt defers selection of a default to libxl. This approach works fine when starting a domain with such configuration or attaching a disk to a running domain. But when detaching such a disk, libxl will fail with "unrecognized disk backend type: 0". libxl makes no attempt to recalculate a default backend (driver) on detach and simply fails when uninitialized. This patch updates the libvirt disk config with the backend selected by libxl when starting a domain or attaching a disk to a running domain. Another benefit of this approach is that the live XML is also updated with the backend driver selected by libxl.
-
由 Jim Fehlig 提交于
When starting a domian, a libxl_domain_config object is created from virDomainDef. Any virDomainDiskDef devices with a format of VIR_STORAGE_FILE_NONE are mapped to LIBXL_DISK_FORMAT_RAW in the corresponding libxl_disk_device, but the virDomainDiskDef format is never updated to reflect the change. A better place to set a default format for disk devices is the device post-parse callback, ensuring the virDomainDiskDef object reflects the default format.
-
- 09 2月, 2017 2 次提交
-
-
由 Jim Fehlig 提交于
The typical pattern when calling libxl functions that populate a structure is libxl_foo foo; libxl_foo_init(&foo); libxl_get_foo(ctx, &foo); ... libxl_foo_dispose(&foo); Fix several instances of libxl_physinfo missing the init and dispose calls. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Jim Fehlig 提交于
libxlGetAutoballoonConf is supposed to honor user-specified autoballoon setting in libxl.conf. As written, the user-specified setting could be overwritten by the subsequent logic to check dom0_mem parameter. If user-specified setting is present and correct, accept it. Only fallback to checking Xen dom0_mem command line parameter if user-specfied setting is not present. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 25 1月, 2017 2 次提交
-
-
由 Jim Fehlig 提交于
While at it, use members of libxl_tsc_mode enum instead of literal int values.
-
由 Jim Fehlig 提交于
The current logic around configuring timers in libxl based on virDomainDef object is a bit brain dead. Unsupported timers are silently ignored and tsc is only recognized if it is the first timer specified. Change the logic to reject unsupported timers and honor the tsc timer regardless of its order when multiple timers are specified.
-
- 12 1月, 2017 1 次提交
-
-
由 Cédric Bosdonnat 提交于
List indexes where mixed up in the code looping over the USB input devices.
-
- 11 1月, 2017 1 次提交
-
-
由 Cédric Bosdonnat 提交于
libxl doesn't provide a way to write one log for each domain. Thus we need to demux the messages. If our logger doesn't know to which domain to attribute a message, then it will write it to the default log file. Starting with Xen 4.9 (commit f9858025 and following), libxl will write the domain ID in an easy to grab manner. The logger introduced by this commit will use it to demux the libxl log messages. Thanks to the default log file, this logger will also work with older versions of Xen.
-
- 15 12月, 2016 2 次提交
-
-
由 Joao Martins 提交于
libvirt libxl picks its own default with respect to the default NIC to use. libxlMakeNic is the one responsible for this and on boot it picks LIBXL_NIC_TYPE_VIF_IOEMU for HVM domains such that it accomodates both PV and emulated one. The good behaving guest at boot will then select the pv and unplug the emulated device. Now, on HVM when attaching an interface it will pick the same default that is LIBXL_NIC_TYPE_VIF_IOEMU which as a result will fail the attach (see xen commit 32e9d0f ("libxl: nic type defaults to vif in hotplug for hvm guest"). Xen doesn't yet support the hotplug of emulated devices, but we don't want to rule out that case either, which might get support in the future. Hence we simply reverse the defaults when we are attaching the interface which allows libvirt to prefer the PV nic first without adding "model='netfront'" following the same pattern as above commit. Also to avoid ruling out the emulated one we set to LIBXL_NIC_TYPE_IOEMU when setting a model type that is not 'netfront'. Signed-off-by: NJoao Martins <joao.m.martins@oracle.com> Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Cédric Bosdonnat 提交于
If libxl has QED disk format support, then pass the feature over to the user.
-
- 22 10月, 2016 1 次提交
-
-
由 John Ferlan 提交于
Change the virDomainChrDef to use a pointer to 'source' and allocate that pointer during virDomainChrDefNew. This has tremendous "fallout" in the rest of the code which mainly has to change source.$field to source->$field. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 28 9月, 2016 1 次提交
-
-
由 Joao Martins 提交于
And allow libxl to handle channel element which creates a Xen console visible to the guest as a low-bandwitdh communication channel. If type is PTY we also fetch the tty after boot using libxl_channel_getinfo to fetch the tty path. On socket case, we autogenerate a path if not specified in the XML. Path autogenerated is slightly different from qemu driver: qemu stores also on "channels/target" but it creates then a directory per domain with each channel target name. libxl doesn't appear to have a clear definition of private files associated with each domain, so for simplicity we do it slightly different. On qemu each autogenerated channel goes like: channels/target/<domain-name>/<target name> Whereas for libxl: channels/target/<domain-name>-<target name> Should note that if path is not specified it won't persist, existing only on live XML, unless user had initially specified it. Since support for libxl channels only came on Xen >= 4.5 we therefore need to conditionally compile it with LIBXL_HAVE_DEVICE_CHANNEL. After this patch and having a qemu guest agent: $ cat domain.xml | grep -a1 channel | head -n 5 | tail -n 4 <channel type='unix'> <source mode='bind' path='/tmp/channel'/> <target type='xen' name='org.qemu.guest_agent.0'/> </channel> $ virsh create domain.xml $ echo '{"execute":"guest-network-get-interfaces"}' | socat stdio,ignoreeof unix-connect:/tmp/channel {"execute":"guest-network-get-interfaces"} {"return": [{"name": "lo", "ip-addresses": [{"ip-address-type": "ipv4", "ip-address": "127.0.0.1", "prefix": 8}, {"ip-address-type": "ipv6", "ip-address": "::1", "prefix": 128}], "hardware-address": "00:00:00:00:00:00"}, {"name": "eth0", "ip-addresses": [{"ip-address-type": "ipv4", "ip-address": "10.100.0.6", "prefix": 24}, {"ip-address-type": "ipv6", "ip-address": "fe80::216:3eff:fe40:88eb", "prefix": 64}], "hardware-address": "00:16:3e:40:88:eb"}, {"name": "sit0"}]} Signed-off-by: NJoao Martins <joao.m.martins@oracle.com> Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 24 9月, 2016 1 次提交
-
-
由 Cédric Bosdonnat 提交于
If passing an empty usbdevice_list to libxl, qemu will always get an -usb parameter for HVM guests with only non-USB input devices. This causes qemu to crash when passing pvusb device on HVM guests. The solution is to allocate the list only when an item to put in it is found.
-
- 03 9月, 2016 1 次提交
-
-
由 Bob Liu 提交于
Add support for multi serial devices, after this patch virsh can be used to connect different serial devices of running domains. E.g. vish # console <xxx> --devname serial<xxx> Note: This depends on a xen/libxl bug fix to have libxl_console_get_tty(...) correctly returning the tty path (as opposed to always returning the first one). [0] https://lists.xen.org/archives/html/xen-devel/2016-08/msg00438.htmlSigned-off-by: NBob Liu <bob.liu@oracle.com>
-
- 02 9月, 2016 1 次提交
-
-
由 Cédric Bosdonnat 提交于
libxl only has API to address the host USB devices by bus/device. Find the bus/device if the user only provided the vendor/product of the USB device. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 04 8月, 2016 1 次提交
-
-
由 Jim Fehlig 提交于
Long, long ago before libxl_get_required_shadow_memory() was made publicly available, its code was copied to the libxl driver for calculating shadow memory requirements of HVM domains. Long ago, libxl_get_required_shadow_memory() was exported in libxl_utils.h and included in xen-devel packages everywhere. Remove the copied code, which has become stale, and let libxl provode a proper shadow memory value.
-
- 02 8月, 2016 1 次提交
-
-
由 Chunyan Liu 提交于
To support USB Controller in xen guest domains, just add USB controller in domain config xml as following: <controller type='usb' model='qusb2' ports='4'/> Signed-off-by: NChunyan Liu <cyliu@suse.com>
-
- 27 7月, 2016 1 次提交
-
-
由 Peter Krempa 提交于
Allow using 'ssh' protocol in backing chains and later for disks themselves.
-
- 12 7月, 2016 1 次提交
-
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 27 6月, 2016 1 次提交
-
-
由 Laine Stump 提交于
All the same information was already there, just in slightly different places in the virDomainNetDef.
-
- 24 6月, 2016 1 次提交
-
-
由 John Ferlan 提交于
Move the enum into a new src/util/virsecret.h, rename it to be virSecretLookupType. Add a src/util/virsecret.h in order to perform a couple of simple operations on the secret XML and virSecretLookupTypeDef for clearing and copying. This includes quite a bit of collateral damage, but the goal is to remove the "virStorage*" and replace with the virSecretLookupType so that it's easier to to add new lookups that aren't necessarily storage pool related. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-