Review of libvirt patches changes ssidSize to ssidsize but I missed
before merging the test case. Regenerate XML output to fix the expected
XML.
Reported-by: Cole Robinson <crobinso@redhat.com>
Fixes: b0024e3de4
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Separate acpi nodeset test out of many-devices test to avoid Libvirt
version mismatch. Gate acpi nodeset test behind Libvirt 11.8.0.
Fixes: 53df7b496b ("virtinst: add support for acpi-generic-initiator")
Signed-off-by: Nathan Chen <nathanc@nvidia.com>
Separate iommufd test out of many-devices test to avoid Libvirt
version mismatch. Gate iommufd test behind Libvirt 12.1.0.
Fixes: 9ab2918fac ("virtinst: add support for iommufd")
Signed-off-by: Nathan Chen <nathanc@nvidia.com>
A minimal config to specify multiple user-creatable SMMUv3 IOMMUs
with HW-accelerated SMMUv3 features specified would be
$ virt-install
...args...
--iommu model=smmuv3,driver.pciBus=0,driver.accel=on,driver.ats=on,driver.ril=on,driver.ssidsize=20,driver.oas=48
--iommu model=smmuv3,driver.pciBus=1,driver.accel=on,driver.ats=on,driver.ril=on,driver.ssidsize=20,driver.oas=48
Signed-off-by: Nathan Chen <nathanc@nvidia.com>
The new option can be used to enable/disable secure boot verification
of UEFI firmware.
If virt-xml is used to change secure-boot print warning that resetting
NVRAM is required to make the change effective.
Fixes: https://github.com/virt-manager/virt-manager/issues/495
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
A minimal config to enable iommufd would be
$ virt-install
...args...
--host-device 0x062a:0x0001,driver.iommufd=yes
Signed-off-by: Nathan Chen <nathanc@nvidia.com>
Until now installer always used legacy boot order when creating VM XML.
Device boot order is supported for long time so start using it if
possible instead of the legacy boot order.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
A minimal config to specify high MMIO region size would be
$ virt-install
...args...
--controller pci,index=0,model=pcie-root,pcihole64=4294967296,pcihole64.unit=KiB
Signed-off-by: Nathan Chen <nathanc@nvidia.com>
A minimal config to enable acpi-generic-initiator would be
$ virt-install
...args...
--hostdev net_00_1c_25_10_b1_e4,acpi.nodeset=0,2-4
Signed-off-by: Nathan Chen <nathanc@nvidia.com>
When the attribute startupPolicy set for a USB passed through devices
allows such device to be missing.
The attribute accepts the following values:
* mandatory: fail if missing for any reason (the default)
* requisite: fail if missing on boot up, drop if missing on
migrate/restore/revert
* optional: drop if missing at any start attempt
eg:
root@localhost:~ # virt-install \
...... \
--hostdev 0x0781:0x5567,source.startupPolicy=optional
It results in the following domain XML snippet:
<hostdev mode='subsystem' type='usb' managed='yes'>
<source startupPolicy='optional'>
<vendor id='0x0781'/>
<product id='0x5567'/>
<address bus='2' device='5'/>
</source>
<alias name='hostdev0'/>
<address type='usb' bus='0' port='1'/>
</hostdev>
Signed-off-by: Lin Ma <lma@suse.de>
Micorosft Windows 11 supports the Arm64 virt machine but does not
support virtio so choose something else if virtio is not supported by
the specified OS.
Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Please note that this is preliminary and some issues remain described
below:
The installation will not start because USB cdrom is not emulated as a
cdrom due to a bug in libvirt:
https://gitlab.com/libvirt/libvirt/-/issues/368
Pass bare QEMU command lines as a workaround.
Audio and TPM do not work because libosinfo cannot tell if an OS
supports devices on a particular architecture:
https://gitlab.com/libosinfo/libosinfo/-/issues/55
In reality, Windows on Arm64 lacks the ich9 driver and TPM fails,
spamming the Windows system logs. As a workaround, manually specify usb
for audio and drop the TPM.
Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
A minimal config to enable TDX, with support for attestation
would be
$ virt-install
...args...
--boot uefi \
--machine q35 \
--launchSecurity type=tdx,quoteGenerationService=on
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
virtio-mem block size must be equal to or greater than the transparent
huge page size; otherwise, libvirt raises an error and a test will
fail. For example, on Asahi Linux, the transparent huge page size is 32
MiB, which is greater than 2 MiB, the specified virtio-mem block size.
On Linux 6.13, the configuration with the maximum transparent huge page
size is Arm64 with 64 KiB, and it has 512 MiB transparent huge pages.
Increase the block size to 512 MiB so that the test passes on every
Linux configuration.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Since libvirt v9.4.0, It introduces 'poll' settings in domain XML to
override the hypervisor-default interval of polling for iothread.
Let's add it into virt-install.
Eg:
virt-install \
...... \
--iothreads iothreads=2,\
iothreadids.iothread0.id=1,\
iothreadids.iothread1.id=2,\
iothreadids.iothread1.poll.max=123,\
iothreadids.iothread1.poll.grow=456,\
iothreadids.iothread1.poll.shrink=789
It results in the following domain XML snippet:
<iothreads>2</iothreads>
<iothreadids>
<iothread id='1'/>
<iothread id='2'>
<poll max='123' grow='456' shrink='789'/>
</iothread>
</iothreadids>
Signed-off-by: Lin Ma <lma@suse.de>
Libvirt supports setting dynamicMemslots attribute for virtio-mem since
v10.1.0, Let's add it into virt-install. Eg:
virt-install \
......
--vcpu 2 \
--cpu cell0.cpus=0,cell0.memory=4194304,\
cell1.cpus=1,cell1.memory=4194304 \
--memory maxMemory=65536,maxMemory.slots=8 \
--memdev model=virtio-mem,\
target.node=0,\
target.block=2048,\
target.size=8192,\
target.dynamicMemslots=yes \
......
It results in the following domain XML snippet:
<memory model='virtio-mem'>
<target dynamicMemslots='yes'>
......
</memory>
Signed-off-by: Lin Ma <lma@suse.de>
The actual default CPU at the QEMU level is often a relatively
poor choice, which is stuck with just baseline functionality
and can sometimes not run modern guests at all.
Whenever possible, prefer maximum mode for a much nicer out of
the box experience.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This mode has been introduced in libvirt 7.1.0 (March 2021) and
can be already used today with
--cpu mode=maximum
This is however slightly inconvenient to type and is not
consistent with the special treatment that the other modes
(host-passthrough, host-model) get.
Introduce a proper special mode for it.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Tells virt-install to not use UEFI, if it would normally default
to it.
This likely isn't too useful in practice, since all occasions we
default to UEFI require it. But it future proofs opt out in case
we ever start defaulting to UEFI in cases where BIOS still works.
Resolves: https://github.com/virt-manager/virt-manager/issues/692
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Currently we will only apply the default `--cpu mode=host-passthrough`
config when _no_ `--cpu` config is passed. But this means if a user
configures ex. cpu `<topology>`, we don't set `host-passthrough` and
they get the libvirt/qemu default baseline CPU.
Instead, only skip the default config if the user manually
specified a `mode` or `model` value directly
https://issues.redhat.com/browse/RHEL-65371
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Input XML can have non-existent disk images as long as `--preserve`
is used, or those disks are skipped for any reason. We already
handle that correctly in some cases, but others we fail. This
covers another one.
Resolves: https://github.com/virt-manager/virt-manager/issues/563
Signed-off-by: Cole Robinson <crobinso@redhat.com>
The commit 6baa327d added active_pcr_banks support, but put it under the child
element <tpm>, which is wrong, It should be under sub child element <backend>.
Before:
--tpm model=tpm-tis,backend.type=emulator,backend.version=2.0,\
active_pcr_banks.sha1=on,\
active_pcr_banks.sha256=yes,\
active_pcr_banks.sha384=yes,\
active_pcr_banks.sha512=yes
It results in the following domain xml:
<tpm model='tpm-tis'>
<backend type='emulator' version='2.0'/>
<alias name='tpm0'/>
</tpm>
After:
--tpm model=tpm-tis,backend.type=emulator,backend.version=2.0,\
backend.active_pcr_banks.sha1=on,\
backend.active_pcr_banks.sha256=yes,\
backend.active_pcr_banks.sha384=yes,\
backend.active_pcr_banks.sha512=yes
It results in the following domain xml:
<tpm model='tpm-tis'>
<backend type='emulator' version='2.0'>
<active_pcr_banks>
<sha1/>
<sha256/>
<sha384/>
<sha512/>
</active_pcr_banks>
</backend>
<alias name='tpm0'/>
</tpm>
Signed-off-by: Lin Ma <lma@suse.de>
E.g.
virt-install \
... \
--tpm model=tpm-tis,backend.type=emulator,backend.version=2.0,\
backend.source.type=dir,backend.source.path=/some/dir
It results in the following domain xml:
<backend type="emulator" version="2.0">
<source type="dir" path="/some/dir"/>
</backend>
Signed-off-by: Lin Ma <lma@suse.de>
E.g.
virt-install \
... \
--tpm model=tpm-tis,backend.type=emulator,backend.version=2.0,backend.debug=3
It results in the following domain xml:
<tpm model="tpm-tis">
<backend type="emulator" version="2.0" debug="3"/>
</tpm>
Signed-off-by: Lin Ma <lma@suse.de>
E.g.
virt-install \
... \
--sound model=virtio,streams=4
It results in the following domain xml:
<sound model="virtio" streams="4"/>
Signed-off-by: Lin Ma <lma@suse.de>
E.g.
virt-install \
... \
--sound model=usb,multichannel=yes
It results in the following domain xml:
<sound model="usb" multichannel="yes"/>
Signed-off-by: Lin Ma <lma@suse.de>