IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
--reflink only works with raw images, since copying anything else
will hit the qemu-img code path in libvirt storage driver.
This can pop up more nowadays since UEFI support is using qcow2 as
well.
Let's only attempt --reflink for raw disk images. It's basically
an optimization anyways
https://bugzilla.redhat.com/show_bug.cgi?id=2256285
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Our logic here is poorly duplicating libvirt's postparse logic.
Notably it will try to add bus=ps2 on non-x86, and misses obscure
cases like parallels.
https://issues.redhat.com/browse/RHEL-66768
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>
E.g.
virt-install \
... \
--disk /tmp/disk0.qcow2,size=16,driver.type=qcow2,blockio.discard_granularity=4096
It results in the following domain xml:
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' discard='unmap'/>
<source file='/tmp/disk0.qcow2'/>
<target dev='vda' bus='virtio'/>
<blockio discard_granularity="4096"/>
</disk>
Signed-off-by: Lin Ma <lma@suse.de>
Currently `--panic default` for aarch64 doesn't even request
a `<panic/>` device due to quirky xmlbuilder behavior. Fix that,
but more generally just leave model empty and let libvirt fill it
in for us.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This is a special convenience option for filling in `type=hostdev`
config using the same format of lookup string that can be
passed to `--hostdev`
Fixes: https://github.com/virt-manager/virt-manager/issues/500
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This just covers the common PCI case with these new options
source.address.type=
source.address.domain=
source.address.bus=
source.address.slot=
source.address.function=
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This is essentially what it has always behaved as, but making it
explicit in the code will now trigger the extra warnings when
detect=on is also used.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Using `detect=on,name=OSNAME` is good for CI safety, incase
a new distro tree has a regression with detection, or if testing
against a new distro that osinfo-db doesn't know about.
But virt-install should still try to inform the user that detection
failed, and suggest filing a bug if the user expected it to work.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
The require= behavior should be AUTO for this case, but the
way we were previously initializing variables made this OFF.
I don't think this was intentional. We should have changed
this when we started defaulting to `detect=on`
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Trying to size the window based on VM desktop resolution does
not do the correct thing when host fractional scaling is enabled
and using spice.
The best we can do here is ask the viewer widget for its
preferred size
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This wires up the guest.convert_to_vnc function to command line,
and documents it.
There's one suboption `qemu-vdagent=on|off`, defaulting to `off`
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This is the beginnings of support for a `virt-xml --convert-to-vnc`
option. Take an existing VM, strip out most of the previous graphics
config, and add VNC graphics.
We try to convert over some of the shared graphic bits, like listen
and port settings, if they were previously specified.
If spice GL was enabled, we convert to egl-headless config
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Wire up guest.convert_to_q35 to the CLI. We add one suboptions,
`num_pcie_root_ports=X`, matching the pre-existing
`--controller num_pcie_root_ports=X` option
Nothing fancy here. See man page docs for details
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This function converts a PC/i400FX XML config to Q35. Mostly
this is deleting any plain PCI addresses and controllers, adding
pcie-root-ports, convert IDE -> SATA, and let libvirt fill in
the rest.
This the implementation piece. CLI additions come later
Signed-off-by: Cole Robinson <crobinso@redhat.com>
We can make `--xml` fit the common xml cli option paradigm, which
less us drop a whole bunch of special handling in virt-xml
Signed-off-by: Cole Robinson <crobinso@redhat.com>
If the VM has implicit TPM state, use the VIR_DOMAIN_UNDEFINE_KEEP_TPM
flag to preserve that state when renaming the VM (if libvirt is new
enough).
The state is stored based on VM UUID and nothing else, and the UUID
is preserved during rename, so we don't need to do any of the same
trickery that's required for nvram duplication.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
* add_q35_pcie_controllers already skips adding controllers if
any type=pci already exist, so delete the extra checking
* be more paranoid and only run the live edits when the machine
type actually changed from an expected config
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Inspired by the x86_64 counterpart.
We're using TCG in this case, so things like host-passthrough
are not available.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
The old capabilities are extremely outdated. The new ones were
captured on an IBM POWER8 machine running Fedora 40.
A few new features are advertised, and the details of the
machine are significantly different, but not much of this is
reflected in the output XML files.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
The old capabilities are extremely outdated. The new ones were
captured on an Ampere Mt. Jade machine running Fedora 40.
Notable differences that are reflected in the output XML files
include the availability of SPICE, as well as EFI firmware and
ACPI support being advertised.
The test script had to be updated too, since both virtiofs and
memfd are now available.
Closes: #714
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Libvirt enables blob resources for the virtio video device since 9.2.0.
It accelerates the display path due to less or no copying of pixel data.
E.g.
virt-install \
... \
--video model.type=virtio,blob=on
It results in the following domain xml:
<video>
<model type="virtio" blob="on"/>
</video>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Lin Ma <lma@suse.de>