summaryrefslogtreecommitdiff
path: root/virtinst/domain
Commit message (Collapse)AuthorAgeFilesLines
* cli: support --boot loader.stateless=Cole Robinson2022-10-171-0/+2
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cli: --cpu: Add maxphysaddr.{mode,bits} optionsLin Ma2022-08-201-1/+14
| | | | | | | | | | This commit added support for cpu physical address bits control, It's useful for VMs with huge amount of ram. E.g. --cpu Cascadelake-Server,maxphysaddr.mode=emulate,maxphysaddr.bits=46 Signed-off-by: Lin Ma <lma@suse.com>
* launch_security: Use SEV-ES policy=0x07 if host supports itCharles Arnold2022-08-031-5/+7
|
* domain: cpu: Clear 'migratable' when changing to custom cpuLin Ma2022-08-011-0/+1
| | | | | | | | Otherwise going host-passthrough -> custom can cause libvirt validation error due to libvirt fills the default value(migratable='on') for the host-passthrough in domain XML. Signed-off-by: Lin Ma <lma@suse.com>
* cli: Add --memorybacking allocation.threadsCole Robinson2022-06-201-0/+1
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* domain: launch_security: simplify defaults and validationCole Robinson2022-02-281-23/+1
| | | | | | | | | | | * libvirt fills in cbitpos and reducedPhysBits for us * libvirt errors if type is missing * libvirt errors if host/qemu doesn't support sev So drop it all. This simplifies testing because we don't need sev domcaps in place just to generate the XML Signed-off-by: Cole Robinson <crobinso@redhat.com>
* domain: cpu: Clear 'migratable' and 'check' when changing modeCole Robinson2022-02-201-0/+2
| | | | | | | | Otherwise going host-passthrough -> host-model -> host-passthrough can cause libvirt validation errors or leave unintended bits in the XML Signed-off-by: Cole Robinson <crobinso@redhat.com>
* tests: cli: A bunch of cleanupCole Robinson2022-02-191-5/+7
| | | | | | | | - Move most xml suboption testing to many-devices test - Clarify every specific bit we are testing in the singleton tests - Consolidate/drop/reduce a lot of tests Signed-off-by: Cole Robinson <crobinso@redhat.com>
* domain: cpu: Use host-passthrough by default on x86Cole Robinson2022-02-161-6/+18
| | | | | | | | When libvirt and qemu are new enough, use host-passthrough for the CPU default. Nowadays this is recommended over host-model for most end user usage where migration isn't a critical feature. Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virtinst: cpu: drop host-copy supportCole Robinson2022-02-161-34/+5
| | | | | | | | | | host-copy was the old default, but it's fundamentally flawed. Since we switched to host-model default a few years back, it's not advertised in the docs or selectable via virt-manager any more. Have it print a warning and invoke host-model-only Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cli: Add --launchSecurity kernelHashes=yes|noCole Robinson2022-01-261-0/+1
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* details: Strip back 'Enable shared memory' to only cover memfdCole Robinson2022-01-252-17/+0
| | | | | | | | | | | | | | | | | Strip back the logic to: * Only try to toggle source_type=memfd and access_mode=shared * Disable the field if guest has any <numa> config * Disable the field if domcaps does not report virtiofs and memfd This is the simplest future proof case, though it will exclude some legit guest configs and some libvirt+qemu back compat. My feeling is the <numa> stuff in particular is pretty advanced, so if users have it configured they can toggle shared memory via the XML without too much trouble. Signed-off-by: Cole Robinson <crobinso@redhat.com>
* domain: cpu: Add function all_shared_memAccess_cells()Lin Ma2022-01-251-0/+8
| | | | | | | It returns true in case all of numa nodes have the "shared" memAccess attribute defined explicitly. Signed-off-by: Lin Ma <lma@suse.com>
* domain: cpu: Add function has_private_memAccess_cells()Lin Ma2022-01-251-0/+6
| | | | | | | It returns true in case any of numa nodes has the "private" memAccess attribute. Signed-off-by: Lin Ma <lma@suse.com>
* domain: memorybacking: Add function is_shared_access()Lin Ma2022-01-251-0/+3
| | | | | | | It returns true in case the memoryBacking element contains the "shared" access mode. Signed-off-by: Lin Ma <lma@suse.com>
* virtinst: allow to force create topology from scratchDaniel P. Berrangé2022-01-201-4/+5
| | | | | | | | | When setting CPU defaults we want to force create the topology even if the user has not specified anything. In particular this allows for overriding the QEMU defaults, to expose vCPUs as cores instead of sockets which is a much saner default for Windows. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* virtinst: prefer cores when exposing topology to the guestDaniel P. Berrangé2022-01-201-3/+14
| | | | | | | | | | | | | | | | | | | | | In real world silicon though it is rare to have high socket/die counts, but common to have huge core counts. Some OS will even refuse to use sockets over a certain count. Thus we prefer to expose cores to the guest rather than sockets as the default for missing fields. This matches a recent change made in QEMU for new machine types commit 4a0af2930a4e4f64ce551152fdb4b9e7be106408 Author: Yanan Wang <wangyanan55@huawei.com> Date: Wed Sep 29 10:58:09 2021 +0800 machine: Prefer cores over sockets in smp parsing since 6.2 Closes: https://github.com/virt-manager/virt-manager/issues/155 Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* virtinst: validate that the CPU topology is saneDaniel P. Berrangé2022-01-201-0/+12
| | | | | | | | | | | The product of sockets * dies * cores * threads must be equal to the vCPU count. While libvirt and QEMU will report this error scenario, it makes sense to catch it in virt-install, so we can test our local logic for setting defaults for topology. This exposes some inconsistent configurations in the test suite. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* virtinst: make CPU topology defaulting take account of diesDaniel P. Berrangé2022-01-201-9/+3
| | | | | | | | | | | | Any missing values in the topology need to be calculated based on the other values which are set. We can take account of fact that 'total_vcpus' treats any unset values as being 1 to simplify the way we set topology defaults. This ensures that topology defaulting takes account of dies. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* virtinst: move method for calculating vCPU count from topologyDaniel P. Berrangé2022-01-201-4/+10
| | | | Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* virtinst: set dies in topology to 1Daniel P. Berrangé2022-01-201-0/+3
| | | | | | | | It is always permitted to set dies==1 regardless of architecture or machine type. The only constraint is around setting values > 1, for archs/machines that don't support the dies concept. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* virtinst: take account of 'dies' when calc vcpu count from topologyDaniel P. Berrangé2022-01-201-0/+1
| | | | Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* cli: add 'ioapic.driver' to --featuresJonathon Jongsma2022-01-111-0/+1
| | | | | | | | | | | | | | | | | | | | Add the ability to set the ioapic driver using the --features argument: $ virt-install --features ioapic.driver=qemu ... This results in the following xml: <features> ... <ioapic driver="qemu"/> </features> This is required in order to install a guest with >255 cpus. Such a configuration requires an iommu with extended interrupt mode enabled, which in turn requires IOMMU interrupt remapping to be enabled, which in turn requires a split I/O APIC. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
* virtinst: fix check for UEFI in SEV setupDaniel P. Berrangé2022-01-111-1/+1
| | | | | | | The code was only checking the manual approach to enabling UEFI, not the modern automatic approach. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* cli: --cpu: code cleanup & reorderingHugues Fafard2021-10-041-118/+161
| | | | | | | | Shuffling bits of code around, adding comments and grouping CLI options to make the code easier to read and understand at a glance. Brings the ordering of XML options in line with libvirt's own output as implemented in `src/conf/cpu_conf.c` and `src/conf/numa_conf.c`.
* cli: --cpu: add support for NUMA interconnectsHugues Fafard2021-10-041-0/+39
| | | | | | | | | | | | | | | | | | This includes support for the following options: * numa.interconnects.latency[0-9]*.initiator * numa.interconnects.latency[0-9]*.target * numa.interconnects.latency[0-9]*.cache * numa.interconnects.latency[0-9]*.type * numa.interconnects.latency[0-9]*.value * numa.interconnects.latency[0-9]*.unit * The same suboptions for `numa.interconnects.bandwith[0-9]*` Note that the cache= attribute is only explicitly defined for <latency> nodes in the documentation. However, since <latency> and <bandwidth> nodes are otherwise identical, the docs also don't explicitly forbid it for <bandwidth> nodes, and libvirt happily accepts XML that does specify it for for <bandwidth> nodes, this implements the cache= attribute for <bandwidth> elements as well.
* cli: --cpu: add support for NUMA cachesHugues Fafard2021-10-041-6/+29
| | | | | | | | | | | This includes support for the following options: * numa.cell[0-9]*.cache[0-9]*.level * numa.cell[0-9]*.cache[0-9]*.associativity * numa.cell[0-9]*.cache[0-9]*.policy * numa.cell[0-9]*.cache[0-9]*.size.value * numa.cell[0-9]*.cache[0-9]*.size.unit * numa.cell[0-9]*.cache[0-9]*.line.value * numa.cell[0-9]*.cache[0-9]*.line.unit
* cli: --cpu: make `numa.cell[0-9]*.discard` an on/off type optionHugues Fafard2021-10-041-1/+1
|
* cli: --cpu: add support for unit of NUMA memory sizeHugues Fafard2021-10-041-0/+1
| | | | This adds support for the `numa.cell[0-9]*.unit` option.
* cli: --cpu: add support for specifying dies in topologyHugues Fafard2021-10-041-1/+4
| | | | This adds support for the `topology.dies` option.
* cli: --cpu: add support for `check` & `migratable` optionsHugues Fafard2021-10-041-2/+4
| | | | | Note that the `migratable` option is only allowed by libvirt for `mode=passthrough` or `mode=maximum`.
* cli: --cputune: add support for cachetune montiorsHugues Fafard2021-10-041-11/+33
| | | | | | This adds support for the following options: * `cachetune[0-9]*.monitor[0-9]*.level` * `cachetune[0-9]*.monitor[0-9]*.vcpus`
* cli: --cputune: add scheduling optionsHugues Fafard2021-10-041-14/+37
| | | | | | | | | This includes support for the following options: * `emulatorsched.scheduler` * `emulatorsched.priority` * `iothreadsched.iothreads` * `iothreadsched.scheduler` * `iothreadsched.priority`
* cli: --cputune: cleanupHugues Fafard2021-10-041-12/+14
|
* cli: --cputune: add support for host cpu usage quotasHugues Fafard2021-10-041-1/+16
| | | | | | | | | | | | | This includes support for the following options: * `shares` * `period` * `quota` * `global_period` * `global_quota` * `emulator_period` * `emulator_quota` * `iothread_period` * `iothread_quota`
* cli: introduce --resource fibrechannel.appid optionPavel Hrdina2021-09-141-1/+2
| | | | Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
* Finish reordering stuff and cleaning upHugues Fafard2021-07-291-22/+31
| | | | | | Finishes shuffling bits of code around to make the options better grouped in the code so it's easier to read and understand what's what at a glance.
* cli: --boot: Completed options for container bootHugues Fafard2021-07-291-4/+12
| | | | Adds support for `initenv[0-9]*.name` and `initenv[0-9]*` suboptions.
* cli: --boot: Completed options for direct kernel bootHugues Fafard2021-07-291-5/+8
| | | | Adds support for `acpi.table` and `acpi.table.type` suboptions.
* cli: --boot: Completed options for host-based bootloaderHugues Fafard2021-07-291-0/+5
| | | | Adds support for `bootloader_args` suboption
* cli: --boot: Completed options for guest-based bootloaderHugues Fafard2021-07-291-6/+7
| | | | Adds support for `bootmenu.timeout` suboption.
* cli: --boot: add support of firmware featuresHugues Fafard2021-07-281-0/+9
| | | | | | | libvirt 7.2.0 introduced support for a list of firmware features that should or should not be present. Libvirt takes these into account when auto-selecting a firmware. Currently supported features are `enrolled-keys` and `secure-boot`.
* cli: --cputune: add iothreadpin[0-9]* configHugues Fafard2021-07-271-2/+14
| | | | | | | | This adds the following suboptions to configure the <domain><cputune><iothreadpin> list: * iothreadpin[0-9]*.iothread * iothreadpin[0-9]*.cpuset
* cli: --cputune: add emulatorpin.cpuset configHugues Fafard2021-07-261-1/+4
| | | | Reviewed-by: Cole Robinson <crobinso@redhat.com>
* cli: --feature: Support kvm.poll-control.stateHan Han2021-05-281-0/+1
| | | | | | | | Implement kvm.poll-control.state to `virt-install --feature`. It requires libvirt >= v6.10.0. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Han Han <hhan@redhat.com>
* cli: --cputune: add vcpusched[0-9]* configJonathan Schwender2021-02-161-1/+14
| | | | | | | | | | | This adds the following suboptions to configure <cputune>: - vcpusched.vcpus - vcpusched.scheduler - vcpusched.priority Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* cli: support --sysinfo type=fwcfg,entry...Cole Robinson2020-09-111-1/+9
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cli: Add --cpu numa.cell.memAccess and discardCole Robinson2020-08-311-1/+3
| | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1824373 Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virtinst: cpu: Move topology elements to their own classCole Robinson2020-08-271-24/+38
| | | | | | This is a no-op but will help with a future bug fix Signed-off-by: Cole Robinson <crobinso@redhat.com>
* xmlutil: Centralize all 'programming error' exceptionsCole Robinson2020-07-171-2/+1
| | | | | | | Raise them directly instead of adding the hard to read conditional into the function Signed-off-by: Cole Robinson <crobinso@redhat.com>