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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
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>
Adjust cli.py `run_parser` and similar functions to take the
parservalue directly, rather than passing in the whole `options`
structure.
This makes it easier to reason about what the virt-xml action
functions are actually working with.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This adds an Action class which is a container for (most) of the
data we need to perform a virt-xml operation. Basically an instance
of the class represents a pairing like
--edit 1 --disk path=/foo or
--add-device --network wibble,model=virtio
etc
This is a functional no-op, but it moves the code closer to
an architecture that will allow us to perform multiple actions
with a single virt-xml command.
While doing this, we centralize most of the cli validation that is
scattered around, since it's now easier to do it in one place.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Move the validation functions out from amongst the functional XML
editing code, and into their own section. We will be adding more
code alongside in future patches.
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>
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>
Set kvm pv-ipi feature by --features argument.
E.g. virt-install --features kvm.pv-ipi.state=off
It results in the following domain xml:
<features>
<kvm>
<pv-ipi state='off'/>
</kvm>
</features>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Lin Ma <lma@suse.de>
We will not enable hyperv_reset feature as modern Hyper-V versions don't
export it.
We also don't enable hyperv_reenlightenment as it is mostly relevant
when migrating VMs that are running Hyper-V inside and requires other
bits to work correctly.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
We will no longer enable hyperv features based on libvirt and QEMU
versions.
Some tests don't use the kvm-x86_64-domcaps-latest so the code will now
not enable Hyper-V features. There are still other test cases that cover
Hyper-V features so instead of mangling with URI for these tests update
test data.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This reverts b34ae0d0c8 and
1fef5d8661.
Playing with this some more I found some deeper problems. For example
```console
[:~/src/virt-manager] (main) $ ./virt-xml test-for-virtxml --connect test://`pwd`/tests/data/testdriver/testsuite.xml --print-diff --edit 1 --video model=FOO --edit 2 --sound model=BAR
--- Original XML
+++ Altered XML
@@ -180,14 +180,14 @@
<graphics type="vnc" port="-1" autoport="yes">
<listen type="address"/>
</graphics>
- <sound model="sb16"/>
+ <sound model="BAR"/>
<sound model="es1370"/>
<sound model="ich6"/>
<video>
<model type="vmvga" vram="16384" heads="1" primary="yes"/>
</video>
<video>
- <model type="cirrus" vram="16384" heads="3"/>
+ <model type="FOO" vram="16384" heads="3"/>
</video>
<hostdev mode="subsystem" type="usb" managed="yes">
<source>
```
There's other weirdness too, though it's mostly strange plays on previous weird behavior
* `--edit --video model=vga --edit --sound model=ich9 --video model=qxl` works
* `--add-device --sound model=foo --video model=bar` was previously rejected but now works
* `--remove-device --video model=vmvga --sound model=sb16` was previously rejected by now works
Fixing all this is not trivial. So I think we need to revert and go back to the drawing board.
This makes it easier for users to change video model from QXL to
different model as QXL is special and uses other attributes that are not
supported by any other model. Without this code libvirt would report
error or user would have to request `clearxml`.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
When Spice graphics is used QEMU creates a Spice server and communicates
with Spice client using multiple channels. These channels are used by
the spice devices as well. Without the Spice graphics defined there is
no use for the other devices. In addition libvirt will report error for
such configuration.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Fix the cloud-init config file for --clouduser-ssh key.
Also change ssh_authorized_keys to `ssh_authorized_keys`, and make sure
default user is not deleted when setting ssh key for root.
Fixes commit 22478f307d (virt-install: Add --cloud-init clouduser-ssh-key=)
Resolves: https://github.com/virt-manager/virt-manager/issues/452
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
conn.fetch_all_vols() is slow, taking ~0.03s every time it's used. When
handling with a large number of paths, its performance is too bad and
could stuck UI for a very long time.
DeviceDisk.paths_in_use_by is added to help handle many paths with
only one call to conn.fetch_all_vols().
Add adaptations for loongarch with the following features:
Default video Support
UEFI prefer
Usb tablet and usb keyboard
rng and memballoon
sound device
Usb controller
Signed-off-by: Xianglai Li <lixianglai@loongson.cn>