Commit Graph

3847 Commits

Author SHA1 Message Date
jiangcuo
5e2743a2ab
Merge branch 'proxmox:master' into pxvirt9-test 2025-08-13 17:17:42 +08:00
Fiona Ebner
554ff73298 ovmf: rename 'is_template' parameter to 'readonly' to match its effect
Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/all/20250813081121.8569-1-f.ebner@proxmox.com
2025-08-13 10:19:17 +02:00
Fiona Ebner
9b1460220c cfg2cmd: add reminder comments to remove template handling for -drive
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/all/20250812143900.138723-6-f.ebner@proxmox.com
2025-08-13 09:30:16 +02:00
Fiona Ebner
bc753d2bc7 code cleanup: drive: get rid of outdated drive_is_read_only() helper
The drive_is_read_only() helper only applies to '-drive', but not
'-blockdev' and is only used in a single place. Inline it to avoid
accidental usages popping up in the future.

This also gets rid of a hidden dependency from Drive to QemuConfig.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/all/20250812143900.138723-5-f.ebner@proxmox.com
2025-08-13 09:30:16 +02:00
Fiona Ebner
69afe422e5 fix #6675: template backup: fix regression with IDE/SATA and blockdev
With ide-hd, the inserted block node needs to be marked as writable
too, but -blockdev will complain if it's marked as writable but the
actual backing device is read-only (e.g. read-only base LV).

IDE/SATA do not support being configured as read-only, the most
similar is using ide-cd instead of ide-hd, with most of the code and
configuration shared in QEMU.

Since a template is never actually started, the front-end device is
never accessed. The backup only accesses the inserted block node, so
it does not matter for the backup if the type is 'ide-cd' instead.

The same issue did not manifest for '-drive', because the '-snapshot'
option is used for template backups. The '-snapshot' option does not
affect '-blockdev', from 'man kvm':

> snapshot is incompatible with -blockdev

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/all/20250812143900.138723-4-f.ebner@proxmox.com
2025-08-13 09:30:16 +02:00
Fiona Ebner
d45b08004a code cleanup: cfg2cmd: check if configuration is for template centrally
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/all/20250812143900.138723-3-f.ebner@proxmox.com
2025-08-13 09:30:16 +02:00
Fiona Ebner
58b9298799 ovmf: pass along whether the VM is a template
This is in preparation to remove the hidden dependency from the Drive
module to QemuConfig.

Note that the drive_is_read_only() can be replaced with $is_template
for OVMF, because the helper only behaves differently for IDE and
SATA, but not for EFI disks.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/all/20250812143900.138723-2-f.ebner@proxmox.com
2025-08-13 09:30:16 +02:00
Fiona Ebner
2f3c741bfd close #6378: expose guest-phys-bits CPU option
Quoting Fabian Grünbichler from the bug report:

> Intel ships some CPUs where the CPU address width and the IOMMU
> address width are different, which requires setting that option to
> properly support huge pages and/or VFIO:
>
> https://bugzilla.kernel.org/show_bug.cgi?id=220057
> https://lore.kernel.org/all/20250502224035.3183451-1-alex.williamson@redhat.com/t
> https://lore.kernel.org/qemu-devel/20250130134346.1754143-1-clg@redhat.com/

This likely also gives users a way forward with a regression reported
in the community forum:
https://forum.proxmox.com/threads/169586/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/all/20250812153144.154949-1-f.ebner@proxmox.com
2025-08-13 09:29:28 +02:00
Fiona Ebner
ad2610f218 make tidy
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2025-08-12 16:04:39 +02:00
Fabian Grünbichler
2746b963cf bump version to 9.0.17
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2025-08-12 15:14:04 +02:00
Fiona Ebner
e7cf7c0056 blockdev: delete/replace: re-use detach() helper
Re-using the detach() helper has the side effect of avoiding logging
errors to syslog for automatically removed child nodes. This should be
the case for all file nodes here. None are explicitly added via
blockdev-add and thus QEMU already auto-removes them.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/all/20250812115652.79330-4-f.ebner@proxmox.com
2025-08-12 14:49:43 +02:00
Fiona Ebner
d2f055b03a blockdev: attach/detach: silence errors for QMP commands for which failure may be expected
Without passing 'noerr' to mon_cmd(), errors are logged to the system
journal. In attach() and detach(), there are two mon_cmd() calls that
are expected to fail in some scenarios for which the errors should not
be logged.

Reported-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/all/20250812115652.79330-3-f.ebner@proxmox.com
2025-08-12 14:49:43 +02:00
Fiona Ebner
9e973210ea qmp client: add $noerr argument
Using the $noerr argument will allow callers to opt-in to handling
errors themselves.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/all/20250812115652.79330-2-f.ebner@proxmox.com
2025-08-12 14:49:43 +02:00
Fiona Ebner
1441c009bc print drive commandline: prohibit using snapshot-as-volume-chain qcow2 images
Require that snapshot-as-volume-chain qcow2 images are always used in
combination with '-blockdev', rather than '-drive'. With '-drive', the
'discard-no-unref' option is not set and the fragmentation can lead to
the same issue that for '-blockdev', was solved by commit a3a9a2ab
("fix #6543: use qcow2 'discard-no-unref' option when using
snapshot-as-volume-chain").

While it would be possible to set the flag for '-drive' too, the
snapshot-as-volume-chain feature already only works with machine type
>= 10.0, see commit 6b2b45fd ("snapshot create/delete: die early for
snapshot-as-volume-chain for pre-10.0 machine version") and it's only
tested for those. Avoid accidents and other unknown issues by being
strict and prohibiting usage without '-blockdev'.

Reported-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/all/20250811135154.253817-1-f.ebner@proxmox.com
2025-08-12 11:17:37 +02:00
Fiona Ebner
240f44a369 fix #6648: api: machine versions: fix ordering
It's necessary to numerically compare versions in machine types, so
introduce a new helper which does that.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/all/20250811104812.189393-3-f.ebner@proxmox.com
2025-08-11 14:59:10 +02:00
Fiona Ebner
9e4210a025 machine: add extract_version_parts helper
Note that the regex is changed to not include the '+pve' part. No
functional change intended.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/all/20250811104812.189393-2-f.ebner@proxmox.com
2025-08-11 14:59:10 +02:00
Fiona Ebner
6b2b45fd0d snapshot create/delete: die early for snapshot-as-volume-chain for pre-10.0 machine version
As reported in the community forum [0], a running VM with pre-10.0
machine version using a storage with snapshot-as-volume-chain will run
into issues when creating a snapshot. Similarly deleting the snapshot
of such a VM would fail. Having '-blockdev' is a hard requirement for
the implementation of the snapshot-as-volume-chain feature for running
VMs, so die and suggest upgrading the machine version.

[0]: https://forum.proxmox.com/threads/lvm-thick-with-iscsi-pve-9-0-3.169319/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Hannes Laimer <h.laimer@proxmox.com>
Link: https://lore.proxmox.com/20250807104832.51784-1-f.ebner@proxmox.com
2025-08-07 14:31:55 +02:00
Thomas Lamprecht
9c094a357b bump version to 9.0.16
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-08-05 12:21:06 +02:00
Christoph Heiss
6df5858a1c vmstate: always quiesce warnings on vm stop cleanup
At this point, the dbus-vmstate helper is not expected to be running
anymore.

Using $noerr here didn't really make sense - as it never should be
running anymore at this point, plus the VM should also be stopped - thus
the "happy" path here is to fail removing the dbus-vmstate helper.
It resulted in another spurious warning _after_ a migration on the
source node.

Fixes: 067a0f55 ("vmstate: improve cleaning up dbus-vmstate and avoid spurious warning")
Reported-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Link: https://lore.proxmox.com/20250805095828.301188-1-c.heiss@proxmox.com
2025-08-05 12:13:45 +02:00
Thomas Lamprecht
e4bf96735f bump version to 9.0.15
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-08-04 16:03:23 +02:00
Christoph Heiss
067a0f55bb vmstate: improve cleaning up dbus-vmstate and avoid spurious warning
First, moving to vm_stop_cleanup(), which is a better fit for this.
It gets called by the cleanup API method in case of unclean shutdown or
from inside the guest.

In every case, the dbus-vmstate daemon should _never_ be running at this
point, as it is started only before migration and stopped directly after
migration, before vm_stop_cleanup() is even called. So it should only be
left running in case of a crash during migration.

Calling it anyway here ensures that the daemon is always (cleanly) shut
down. As the dbus-vmstate is part of the VM scope unit, that would it
tear it down too as a last resort.

Fixes the following spurious warning when a VM was shutdown from inside
the guest:

  `failed to retrieve org.qemu.VMState1 owners: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owners of name 'org.qemu.VMState1': no such name`

Reported-by: Hannes Duerr <h.duerr@proxmox.com>
Reported-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Link: https://lore.proxmox.com/20250804133002.1625925-1-c.heiss@proxmox.com
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-08-04 16:02:45 +02:00
Lierfang Support Team
c9c1ab6580 bump version to 8.3.12-4 2025-08-02 01:03:33 +08:00
Lierfang Support Team
fd9dcbc2d6 Fix virtio-gpu issue on x86_64 https://github.com/jiangcuo/pxvirt/issues/186 2025-08-02 01:03:28 +08:00
Lierfang Support Team
7620820f34 bump version to 8.3.12-3 2025-08-02 01:03:28 +08:00
Lierfang Support Team
0c2f59c24e add pxvirt-spdk to Recommends 2025-08-02 01:03:21 +08:00
Lierfang Support Team
4ce18b69e6 add uring_bdev 2025-08-02 01:03:07 +08:00
Lierfang Support Team
c4ffd24458 Add rbd backend 2025-08-02 01:03:07 +08:00
Lierfang Support Team
916c8bbc7d Add spdk support 2025-08-02 01:03:07 +08:00
Lierfang Support Team
1c20ef6e08 bump version to 8.3.12-2 2025-08-02 01:02:29 +08:00
Lierfang Support Team
2461d0d08b add uuid into 2025-08-02 01:02:22 +08:00
Lierfang Support Team
307ef308b5 improve vga device map 2025-08-02 01:02:22 +08:00
Lierfang Support Team
0866835c9a improve spice encoder check 2025-08-02 01:02:22 +08:00
f7b7930630 Add spice preferredcodec option 2025-08-02 01:02:22 +08:00
0c83f24786 Add Dharma and YongFeng for Hygon and Zhaoxin 2025-08-02 01:02:22 +08:00
68d66959ef Add ZhaoXin cpu model support 2025-08-02 01:02:22 +08:00
e1ac752635 add Hygon cpu support 2025-08-02 01:02:22 +08:00
82b19c7a7a nvme disk can't live migrate 2025-08-02 01:02:11 +08:00
496fe9913a Fix smbios type 2 register on guestos 2025-08-02 01:02:00 +08:00
e71e75f146 Fixed syntax issues with egl lib detection 2025-08-02 01:02:00 +08:00
8e1c84b4f8 power_state_flags only on amd64 2025-08-02 01:02:00 +08:00
jiangcuo
d4289e31ec bump version to 8.3.12-1 2025-08-02 01:01:48 +08:00
jiangcuo
ba070f8453 Fix get_ovmf_files() error and check_bridge_access user error 2025-08-02 01:01:41 +08:00
35b6183939 add api permission for check_mapping_access check_bridge_access 2025-08-02 01:01:28 +08:00
d4a510c457 Add smbios type2,serial to vm for vdi solution 2025-08-02 01:01:06 +08:00
bb9997f869 Use of uninitialized value 2025-08-02 01:00:47 +08:00
e7c7592cfb add snapshot flag in vmstatus 2025-08-02 01:00:47 +08:00
706ae8955b move qemu cpu type to last line 2025-08-02 01:00:47 +08:00
ff393822a1 Add sriov device mac support 2025-08-02 01:00:47 +08:00
659923a0b8 user pxvirt bootsplash 2025-08-02 01:00:30 +08:00
jiangcuo
eddf590d1c fix loadpram error when cloudinit is configured on s390x 2025-08-02 01:00:30 +08:00