- 21 8月, 2019 3 次提交
-
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Now that virDomainXMLNamespace matches virXMLNamespace, we no longer need to keep both around. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 23 4月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
The @firmware string is allocated, but never freed. 4 bytes in 1 blocks are definitely lost in loss record 1 of 44 at 0x483579F: malloc (vg_replace_malloc.c:299) by 0x76FB469: strdup (strdup.c:42) by 0x497B6DE: virStrdup (virstring.c:966) by 0x48F6FD3: virConfGetValueString (virconf.c:908) by 0x4B3E9B6: virVMXGetConfigStringHelper (vmx.c:736) by 0x4B3EA6B: virVMXGetConfigString (vmx.c:756) by 0x4B41AEA: virVMXParseConfig (vmx.c:1832) by 0x10B8E4: testCompareFiles (vmx2xmltest.c:79) by 0x10BAB8: testCompareHelper (vmx2xmltest.c:124) by 0x10D058: virTestRun (testutils.c:174) by 0x10CDDA: mymain (vmx2xmltest.c:288) by 0x10F11C: virTestMain (testutils.c:1096) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPino Toscano <ptoscano@redhat.com>
-
- 17 4月, 2019 2 次提交
-
-
由 Cole Robinson 提交于
Convert the vmware/vmx driver to net model enum, which requires adding enum values for vlance, vmxnet, vmxnet2, and vmxnet3. Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
To ease converting the net->model value to an enum, add the wrapper functions: virDomainNetGetModelString virDomainNetSetModelString virDomainNetStreqModelString virDomainNetStrcaseeqModelString Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 16 4月, 2019 2 次提交
-
-
由 Pino Toscano 提交于
When writing the VMX file from the domain XML, write the firmware key according to the firmware autoselection. Though, at the moment only 'efi' is supported. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NPino Toscano <ptoscano@redhat.com>
-
由 Pino Toscano 提交于
Convert the firmware key to a type of autoselected firmware. Only the 'efi' firmware is allowed for now, in case the key is present. It seems VMware (at least ESXi) does not write the key in VMX files when setting BIOS as firmware. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NPino Toscano <ptoscano@redhat.com>
-
- 12 4月, 2019 1 次提交
-
-
由 Cole Robinson 提交于
Standardize on putting the _LAST enum value on the second line of VIR_ENUM_IMPL invocations. Later patches that add string labels to VIR_ENUM_IMPL will push most of these to the second line anyways, so this saves some noise. Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 03 4月, 2019 2 次提交
-
-
由 Peter Krempa 提交于
Parsing of the cpu affinity list was using virParseNumber. Modernize it to get rid of the virParseNumber call. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
'cpumasklen' is only written to since ee7d23ba. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 07 3月, 2019 2 次提交
-
-
由 Andrea Bolognani 提交于
When dealing with internal paths we don't need to worry about whether or not suffixes are lowercase since we have full control over them, which means we can avoid performing case-insensitive string comparisons. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> ACKed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Andrea Bolognani 提交于
Despite its name, this is really just a general-purpose string manipulation function, so it should be moved to the virstring module and renamed accordingly. In addition to the obvious s/File/String/, also tweak the name to make it clear that the presence of the suffix is verified using case-insensitive comparison. A few trivial whitespace changes are squashed in. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> ACKed-by: NPeter Krempa <pkrempa@redhat.com>
-
- 05 3月, 2019 1 次提交
-
-
由 Cole Robinson 提交于
Add <controller type='scsi' model handling for virtio transitional devices. Ex: <controller type='scsi' model='virtio-transitional'/> * "virtio-transitional" maps to qemu "virtio-scsi-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-scsi-non-transitional" The naming here doesn't match the pre-existing model=virtio-scsi. The prescence of '-scsi' there seems kind of redundant as we have type='scsi' already, so I decided to follow the pattern of other patches and use virtio-transitional etc. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 04 2月, 2019 1 次提交
-
-
由 Cole Robinson 提交于
Missing semicolon at the end of macros can confuse some analyzers (like cppcheck <filename>), and we have a mix of semicolon and non-semicolon usage through the code. Let's standardize on using a semicolon for VIR_ENUM_DECL calls. Drop the semicolon from the final statement of the macro, so the compiler will require callers to add a semicolon. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 05 12月, 2018 1 次提交
-
-
由 Yuri Chornoivan 提交于
Signed-off-by: NYuri Chornoivan <yurchor@ukr.net> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 19 7月, 2018 1 次提交
-
-
由 Erik Skultety 提交于
Since 2.10 QEMU supports a new display type egl-headless which uses the drm nodes for OpenGL rendering copying back the rendered bits back to QEMU into a dma-buf which can be accessed by standard "display" apps like VNC or SPICE. Although this display type can be used on its own, for any practical use case it makes sense to pair it with either VNC or SPICE display. The clear benefit of this display is that VNC gains OpenGL support, which it natively doesn't have, and SPICE gains remote OpenGL support (native OpenGL support only works locally through a UNIX socket, i.e. listen type=socket/none). Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 22 6月, 2018 1 次提交
-
-
由 Pino Toscano 提交于
Most probably this was a limitation in older ESX versions, and it seems it does not exist anymore in more recent versions; see the following thread: https://www.redhat.com/archives/libvir-list/2018-May/msg02159.html https://www.redhat.com/archives/libvir-list/2018-June/msg00043.html Hence, allow an odd number (greater than 1) of vCPUs, since most probably older versions of ESXi will error out anyway. https://bugzilla.redhat.com/show_bug.cgi?id=1584091Signed-off-by: NPino Toscano <ptoscano@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 11 6月, 2018 1 次提交
-
-
由 Fabiano Fidêncio 提交于
Signed-off-by: NFabiano Fidêncio <fabiano@fidencio.org> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 29 5月, 2018 1 次提交
-
-
由 Ján Tomko 提交于
Further patches will introduce validation and a default setting of def->os.bootDevs in postParse. Introduce a feature flag to opt out of this and set it in the vmx driver, otherwise we would be adding it <boot dev='hd'/> into every vmx config despite having no way to change it. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 04 5月, 2018 1 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 20 4月, 2018 2 次提交
-
-
由 Pino Toscano 提交于
When writing the VMX file from the domain XML, write cpuid.coresPerSocket if there is a specified CPU topology in the guest. Use the domain XML of esx-in-the-wild-9 in vmx2xml as testcase for xml2vmxtest. Signed-off-by: NPino Toscano <ptoscano@redhat.com> Acked-by: NRichard W.M. Jones <rjones@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Pino Toscano 提交于
Convert the cpuid.coresPerSocket key as both number of CPU sockets, and cores per socket. Add the VMX file attached to RHBZ#1568148 as testcase esx-in-the-wild-9; adapt the resulting XML of testcase esx-in-the-wild-8 to the CPU topology present in that VMX. https://bugzilla.redhat.com/show_bug.cgi?id=1568148Signed-off-by: NPino Toscano <ptoscano@redhat.com> Acked-by: NRichard W.M. Jones <rjones@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 01 4月, 2018 3 次提交
-
-
由 Pino Toscano 提交于
Scan the parsed VMX file, and gather the biggest index of the network interfaces there: this way, it is possible to parse all the available network interfaces, instead of just 4 maximum. Add the VMX file attached to RHBZ#1560917 as testcase esx-in-the-wild-8. https://bugzilla.redhat.com/show_bug.cgi?id=1560917Signed-off-by: NPino Toscano <ptoscano@redhat.com>
-
由 Pino Toscano 提交于
Dynamically grow the array of network interfaces for each interface read, instead of using a single array of size 4. This way, in the future it will be easier to not limit the number of network interfaces (which this patch still does not change). Signed-off-by: NPino Toscano <ptoscano@redhat.com>
-
由 Pino Toscano 提交于
When parsing filesystems, network interfaces, serial ports, and parallel ports, check earlier whether they are present/enabled, delaying the allocation of the objects. This is mostly a small optimization, with no behaviour change. Signed-off-by: NPino Toscano <ptoscano@redhat.com>
-
- 22 2月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
Ensure all enum cases are listed in switch statements. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-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>
-
- 03 11月, 2017 1 次提交
-
-
由 Andrea Bolognani 提交于
Right-aligning backslashes when defining macros or using complex commands in Makefiles looks cute, but as soon as any changes is required to the code you end up with either distractingly broken alignment or unnecessarily big diffs where most of the changes are just pushing all backslashes a few characters to one side. Generated using $ git grep -El '[[:blank:]][[:blank:]]\\$' | \ grep -E '*\.([chx]|am|mk)$$' | \ while read f; do \ sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \ done Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 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>
-
- 04 9月, 2017 1 次提交
-
-
由 Richard W.M. Jones 提交于
If you use the VDDK library to access virtual machines remotely, you really need to know the Managed Object Reference ("moref") of the VM. This must be passed each time you connect to the API. For example nbdkit's VDDK plugin requires a moref to be passed to mount up a VM's disk remotely: nbdkit vddk user=root password=+/tmp/rootpw \ server=esxi.example.com thumbprint=xx:xx:xx:... \ vm=moref=2 \ file="[datastore1] Fedora/Fedora.vmdk" Getting the moref is a huge pain. To get some idea of what it is, why it is needed, and how much trouble it is to get it, see: https://blogs.vmware.com/vsphere/2012/02/uniquely-identifying-virtual-machines-in-vsphere-and-vcloud-part-1-overview.html https://blogs.vmware.com/vsphere/2012/02/uniquely-identifying-virtual-machines-in-vsphere-and-vcloud-part-2-technical.html However the moref is available conveniently in the internals of the libvirt VMX driver. This patch exposes it as a custom XML element using the same "vmware:" namespace which was previously used for the datacenterpath (see libvirt commit 636a9905). It appears in the XML like this: <domain type='vmware' xmlns:vmware='http://libvirt.org/schemas/domain/vmware/1.0'> <name>Fedora</name> ... <vmware:datacenterpath>ha-datacenter</vmware:datacenterpath> <vmware:moref>2</vmware:moref> </domain> Note that the moref can appear as either a simple ID (for esx:// connections) or as a "vm-<ID>" (for vpx:// connections). It should be treated by users as an opaque string. Signed-off-by: NRichard W.M. Jones <rjones@redhat.com>
-
- 24 8月, 2017 1 次提交
-
-
由 Ján Tomko 提交于
When parsing the config, we look for the SCSI controllers one by one, remembering their models, then let virDomainDefAddImplicitDevices add them if any SCSI disk is using them. Since these controllers are not really implicit (they are present in the source config), add them explicitly. This patch maintains the behavior of not adding a controller if it was present in the config, but no disk was using it. This also resolves the memory leak of virVMXParseConfig overwriting the video device added by calling virDomainDefAddImplicitDevices before the parsing is finished. Reported-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 08 8月, 2017 1 次提交
-
-
由 Ján Tomko 提交于
Rewrite virConfReadMem to take a null-terminated string. All the callers were calling strlen on it anyway.
-
- 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>
-
- 22 10月, 2016 2 次提交
-
-
由 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>
-
由 John Ferlan 提交于
Rather than VIR_ALLOC of the virDomainChrDefPtr
-
- 26 9月, 2016 2 次提交
-
-
由 Michal Privoznik 提交于
Just like virDomainDefPostParseCallback has gained new parseOpaque argument, we need to follow the logic with virDomainDeviceDefPostParse. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Some callers might want to pass yet another pointer to opaque data to post parse callbacks. The driver generic one is not enough because two threads executing post parse callback might want to see different data (e.g. domain object pointer that domain def belongs to). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-