summaryrefslogtreecommitdiff
path: root/virtinst
Commit message (Collapse)AuthorAgeFilesLines
* cloner: clone serial filesOleg Vasilev2023-03-221-6/+24
| | | | | | | | | | Before this, on clone the serial file would remain the same for the cloned domain. This doesn't make much sense as the output would be an intermix of two unrelated output sequences. Here we apply the the same filename changing algorithm, as with disk files. Signed-off-by: Oleg Vasilev <oleg.vasilev@virtuozzo.com>
* tests: test win11 XML generationCole Robinson2023-01-191-7/+0
| | | | | | | And drop the futureproofing workaround now that it's no longer required Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virtinstall: Hide total_size in the progress bar if it doesn't needToshiki Sonoda2022-12-141-2/+6
| | | | | | | | | | | | virt-install prints the total_size value to the progress bar even if it is meaningless. This value can be confusing to user, so for execute prosess that doesn't copy files (total_size = 0B), we hide the total_size value. For example, 'Creating domain...' doesn't need to print the total_size value. Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com> Signed-off-by: Haruka Ohata <ohata.haruka@fujitsu.com>
* virtinstall: Fix the allocating disk size printed by the progress barToshiki Sonoda2022-12-141-0/+1
| | | | | | | | | | | | When a sparse file is created during a disk allocation, virt-install prints not the created disk size but a sparse file size. Therefore, we fix to print the created disk size during disk allocation instead of the size of the sparse file by updating the meter with the self.capacity. Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com> Signed-off-by: Haruka Ohata <ohata.haruka@fujitsu.com>
* progress: Fix showing correct final totalCole Robinson2022-12-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Reproducer: Reproducer: ./virt-install --connect test:///default \ --location tests/data/fakemedia/fake-f26-netinst.iso Before: Starting install... Retrieving 'vmlinuz' | 0 B 00:00:00 ... Retrieving 'initrd.img' | 0 B 00:00:00 ... After: Starting install... Retrieving 'vmlinuz' | 9 B 00:00:00 ... Retrieving 'initrd.img' | 9 B 00:00:00 ... progress.end() currently only reports the total amount of bytes that were last written to the UI. It should report the total amount that's been passed to update(). Reported-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>
* tests: Update to latest kvm domcapsCole Robinson2022-12-141-2/+2
| | | | | | And add some test coverage exclusions, needed for previous patches Signed-off-by: Cole Robinson <crobinso@redhat.com>
* guest: Query availability of spicevmc channels in domcapsLin Ma2022-12-142-0/+15
| | | | Signed-off-by: Lin Ma <lma@suse.com>
* guest: Query availability of usb redirdevs in domcapsLin Ma2022-12-142-0/+15
| | | | Signed-off-by: Lin Ma <lma@suse.com>
* tests: cpio: set owner to 0:0Weijia Wang2022-12-131-1/+1
|
* Fix pylint/pycodestyle warnings with latest versionsCole Robinson2022-12-135-19/+19
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* diskbackend: Drop support for sheepdogLin Ma2022-11-071-5/+3
| | | | | | | The sheepdog project is no longer actively developed, Libvirt removed the support for sheepdog storage backend since v8.8.0, Let's drop it. Signed-off-by: Lin Ma <lma@suse.com>
* cli: support --boot loader.stateless=Cole Robinson2022-10-172-0/+3
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virt-install: Reuse cli.fail_conflictingCole Robinson2022-08-221-1/+1
| | | | | | For the --unattended + --cloud-init conflict Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virt-install: --unattended and --cloud-init conflictCole Robinson2022-08-211-0/+3
| | | | | | | | | Make it an explicit error, otherwise unattended is preferred and cloud-init is ignored https://bugzilla.redhat.com/show_bug.cgi?id=2117157 Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cloner: Sync <uuid> and <sysinfo> system uuidCole Robinson2022-08-211-2/+4
| | | | | | | | | | Otherwise libvirt errors like: ERROR UUID mismatch between <uuid> and <sysinfo> https://bugzilla.redhat.com/show_bug.cgi?id=2038040 Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virt-install: --help required options are wrongCole Robinson2022-08-211-1/+1
| | | | | | | | | | Nowadays it could be as simple as `virt-install --install fedora36`. Trying to represent the interdepencies here is not worth it, but let's keep a simple string around to avoid the default parser usage string, which is huge Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cli: --cpu: Add maxphysaddr.{mode,bits} optionsLin Ma2022-08-202-1/+17
| | | | | | | | | | 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>
* virtinstall: fix regression with --boot and no install methodCole Robinson2022-08-201-1/+2
| | | | | | | | | | Anything passed to --boot should imply --install no_install=yes in the absence of other --install options. This is historically what we've done but we regressed in 4.1.0 Resolves: https://github.com/virt-manager/virt-manager/issues/426 Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virtinstall: split no_install conditional apart to track code coverageCole Robinson2022-08-201-5/+9
| | | | | | | Each bit here is part of the CLI API, we need to be sure we are covering each one. Extend the test suite to hit one case we are missing Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cli: Drop unnecessary --disk prop aliasesCole Robinson2022-08-171-2/+0
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cli: --disk: Add driver.metadata_cache optionsLin Ma2022-08-172-0/+12
| | | | | | | | | | | | | | | | | | | Properly setting the metadata cache size can provide better performance in case of using big qcow2 images. This patch introduces two driver options: * driver.metadata_cache.max_size * driver.metadata_cache.max_size.unit E.g. --disk ...,driver.type=qcow2,\ driver.metadata_cache.max_size=2,\ driver.metadata_cache.max_size.unit=MiB BTW, Metadata cache size control is currently supported only for qcow2. Regarding how to properly caluclate the cache size of qcow2, Please refer to qemu's documentation. Signed-off-by: Lin Ma <lma@suse.com>
* Prep for release 4.1.0v4.1.0Cole Robinson2022-08-041-1/+1
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virtinstall: Set VM name earlier so disks are named correctlyCole Robinson2022-08-031-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | We need to change the flow from * parse all the strings * set capabilities defaults * build installer * fill in all guest defaults To * parse boot and metadata strings * set capabilities defaults * build installer * set --name default * parse all the remaining strings * fill in all guest defaults Because --disk parsing depends on --name for some path generation. So this fixes --disk names when --name is implicitly specified by --install or --osinfo Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cli: Break up parse_option_stringsCole Robinson2022-08-033-28/+23
| | | | | | | Into run_parser and run_all_parsers. Opencode some of the special case handling in virtxml Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virt-xml: Simplify --build-xml parse_option_strings usageCole Robinson2022-08-031-10/+4
| | | | | | parse_option_strings will do the right thing for us already Signed-off-by: Cole Robinson <crobinso@redhat.com>
* xmlutil: Take unindent_device_xml from details.pyCole Robinson2022-08-031-0/+20
| | | | | | We will use this in virt-xml soon Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virtxml: Remove redundant listify callsCole Robinson2022-08-031-2/+0
| | | | | | parse_option_strings always returns a list Signed-off-by: Cole Robinson <crobinso@redhat.com>
* launch_security: Use SEV-ES policy=0x07 if host supports itCharles Arnold2022-08-032-6/+12
|
* cli: Add --iothreads defaultiothread.thread_pool_{min,max}Lin Ma2022-08-022-1/+20
| | | | | | | | | | It allows to set the thread pool size to optimize spawning worker threads for the default event loop in real time environment. For example: --iothreads defaultiothread.thread_pool_min=8,\ defaultiothread.thread_pool_max=16 Signed-off-by: Lin Ma <lma@suse.com>
* cli: Add iothreadids attributes thread_pool_min and thread_pool_maxLin Ma2022-08-012-2/+8
| | | | | | | | | | | | | These two optional attributes allow setting lower and upper boundary for number of worker threads for given IOThread. For example: --iothreads iothreads=2,\ iothreadids.iothread0.id=1,\ iothreadids.iothread1.id=2,\ iothreadids.iothread1.thread_pool_min=8,\ iothreadids.iothread1.thread_pool_max=16 Signed-off-by: Lin Ma <lma@suse.com>
* 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>
* capabilities: Remove noisy alias debuggingCole Robinson2022-08-011-3/+0
| | | | | | | our debugging output is not this fine grained, so this crowds out more interesting messages Signed-off-by: Cole Robinson <crobinso@redhat.com>
* connection: De-duplicate ui and cli version loggingCole Robinson2022-08-012-12/+21
| | | | | | | Remove the open coded version logging in cli.py and virt-manager connection.py, and move it into virtinst connection open Signed-off-by: Cole Robinson <crobinso@redhat.com>
* guest: Check coverage for more of domcaps cachingCole Robinson2022-07-271-2/+2
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virtinst: log libvirt version numbers after connectingDaniel P. Berrangé2022-07-271-1/+12
| | | | | | | The various version numbers reported by libvirt are all relevant pieces of information when debugging problem reports. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* virtinst: include the version number in first log messageDaniel P. Berrangé2022-07-271-1/+2
| | | | | | | | Knowledge of the version number is not always available from the user bug report. They may merely have a log file from an automated system. Including the version number in the log message is key information. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* virtinst: include host capbilities in debug logDaniel P. Berrangé2022-07-271-2/+3
| | | | | | This is critical information when debugging many user problems. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* virtinst: include domain capbilities in debug logDaniel P. Berrangé2022-07-271-0/+2
| | | | | | This is critical information when debugging many user problems. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* virtinst: fix caching of domain capabilitiesDaniel P. Berrangé2022-07-272-1/+25
| | | | | | | | | The domain capabilities XML always contains the canonical machine name. When the selected machine type for a guest is an alias, the check comparing it to the domain capabilities machine will always fail. This prevents the domain capabilities result from being cached. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* cli: Add --serial source.tls=on|offCole Robinson2022-06-202-0/+2
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cli: Add --serial source.channelCole Robinson2022-06-201-0/+1
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cli: Add --memorybacking allocation.threadsCole Robinson2022-06-202-0/+2
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* connection: Add get_libvirt_data_root_dir()Cole Robinson2022-06-202-4/+8
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* domcaps: armv7l doesn't support tpm-tisCole Robinson2022-06-171-0/+8
| | | | | | | | | | | | | | Libvirt domcaps can advertise armv7l support for tpm-tis, even though it will explicitly reject that config: https://gitlab.com/libvirt/libvirt/-/issues/329 Work around that in domcaps. Without this, UEFI arm32 VMs generate default configs that libvirt will reject https://bugzilla.redhat.com/show_bug.cgi?id=2078995 Signed-off-by: Cole Robinson <crobinso@redhat.com>
* osdict: Fix test coverage with latest libosinfoCole Robinson2022-06-131-1/+1
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virt-install: add support for qemu-vdagent channelJonathon Jongsma2022-06-132-1/+9
| | | | | | | | | | | | | | This allows support for host/guest clipboard sharing when using vnc guests (and possibly other graphics types in the future). This channel is similar to the spicevmc channel, but it contains a couple additional options to enable/disable clipboard sharing and specify the mouse mode. In the case of spice, these settings are specified on the 'graphics' element, but for qemu-vdagent, they are specified on the channel. For example: --channel=qemu-vdagent,source.clipboard.copypaste=on,source.mouse.mode=client Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
* tests: Fix with latest argcompleteCole Robinson2022-06-131-2/+10
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Add support for URL query with disksMartin Kletzander2022-04-131-0/+3
| | | | Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
* Prep for release 4.0.0v4.0.0Cole Robinson2022-03-021-1/+1
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* osdict: Hardcode win11 requires UEFICole Robinson2022-03-021-0/+7
| | | | | | | | Since there's a release pending, this is a bit of future proofing if win11 pops up in a future osinfo-db without accompanying libosinfo firmware APIs landing Signed-off-by: Cole Robinson <crobinso@redhat.com>