]> git.proxmox.com Git - pve-qemu.git/log
pve-qemu.git
2 years agod/rules: disable libssh by default
Thomas Lamprecht [Fri, 18 Feb 2022 13:21:32 +0000 (14:21 +0100)]
d/rules: disable libssh by default

was always disabled in our clean builds, this now also avoids
auto-enabling it on "dirty" build hosts

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoadd patch for loading a snapshot with qemu-img dd
Fabian Ebner [Fri, 11 Feb 2022 09:24:35 +0000 (10:24 +0100)]
add patch for loading a snapshot with qemu-img dd

Will be used when cloning from a qcow2 efidisk.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agofix getopt-string when introducing -n option for qemu-img dd
Fabian Ebner [Fri, 11 Feb 2022 09:24:34 +0000 (10:24 +0100)]
fix getopt-string when introducing -n option for qemu-img dd

The colon after U is wrong, because it doesn't take an argument.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoupdate submodule and patches to 6.2.0
Fabian Ebner [Fri, 11 Feb 2022 09:24:33 +0000 (10:24 +0100)]
update submodule and patches to 6.2.0

Notable changes:
* bdrv_co_p{discard,readv,writev,write_zeroes} function signatures
  changed, to using int64_t for offsets/bytes and some still had int
  rather than BrdvRequestFlags for the flags.
* job_cancel_sync now has a force parameter. Commit messages in
  73895f3838cd7fdaf185cf1dbc47be58844a966f
  4cfb3f05627ad82af473e7f7ae113c3884cd04e3
  sound like using force=true makes more sense.
* Added 3 patches coming in via qemu-stable tag, most important one is
  to work around a librbd issue.
* Added another 3 patches from qemu-devel to fix issue leading to
  crash when live migrating with iothread.
* cluster_size calculation helper changed (see patch pve/0026).
* QAPI's if conditionals now use 'CONFIG_FOO' rather than
  'defined(CONFIG_FOO)'

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agobump version to 6.1.1-2
Thomas Lamprecht [Mon, 14 Feb 2022 14:53:18 +0000 (15:53 +0100)]
bump version to 6.1.1-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agovma: create: register all streams before entering coroutines
Fabian Ebner [Mon, 14 Feb 2022 11:02:52 +0000 (12:02 +0100)]
vma: create: register all streams before entering coroutines

Otherwise, the header might already get written by a coroutine and
registering further streams will fail after that.

Also adds a missing g_list_free call for the other GList that's used.

Reported in the community forum:
https://forum.proxmox.com/threads/104744/

Reproducer script (increase beyond 30 if the issue isn't triggered yet):
> #!/usr/bin/perl
>
> my $dir = "./vma-create-bug";
> mkdir $dir;
>
> my $archive_path = "$dir/vzdump-qemu-104-2202_02_02-00_00_00.vma";
> unlink $archive_path;
>
> my $cmd = "vma create $archive_path -v";
> for (my $i = 0; $i < 30; $i++) {
>   system("truncate -s 1M $dir/drive-virtio$i.img");
>   $cmd .= " drive-virtio$i=$dir/drive-virtio$i.img";
> }
> system($cmd);

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agobump version to 6.1.1-1
Thomas Lamprecht [Thu, 13 Jan 2022 09:57:48 +0000 (10:57 +0100)]
bump version to 6.1.1-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoupdate submodule and patches to 6.1.1
Thomas Lamprecht [Thu, 13 Jan 2022 09:34:33 +0000 (10:34 +0100)]
update submodule and patches to 6.1.1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 6.1.0-3
Thomas Lamprecht [Wed, 1 Dec 2021 14:35:49 +0000 (15:35 +0100)]
bump version to 6.1.0-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3738: cherry-pick "block: introduce max_hw_iov for use in scsi-generic"
Fabian Ebner [Wed, 1 Dec 2021 13:10:27 +0000 (14:10 +0100)]
fix #3738: cherry-pick "block: introduce max_hw_iov for use in scsi-generic"

which fixes the bad commit 18473467d55a20d643b6c9b3a52de42f705b4d35
that was tracked down via bisecting, and has a Cc for qemu-stable as
well.

Issue was easy enough to reproduce with a single virtio-block disk
using a few runs of dd if=/dev/urandom of=file bs=1M count=1000

Commit cc071629539dc1f303175a7e2d4ab854c0a8b20f upstream.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agobuildsys: fix build-dependencies on headers for 'vma' and 'pbs_restore'
Dominik Csapak [Thu, 18 Nov 2021 07:05:38 +0000 (08:05 +0100)]
buildsys: fix build-dependencies on headers for 'vma' and 'pbs_restore'

both of them depend on generated header files, so we have to specify
them as sources. Otherwise, it happens (at least on some machines)
that they will be compiled before the headers are generated, aborting
the build.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agofix #3728: handle machine without type
Fabian Grünbichler [Wed, 17 Nov 2021 09:41:17 +0000 (10:41 +0100)]
fix #3728: handle machine without type

libguestfs starts their helper VMs with `-machine accel=..` without a
machine type, and our pve version suffix handling would segfault in that
case. there might be other scripted use cases that are affected as well.

this regression was introduced with the rebase of our patch set on top
of 6.1.0

Fixes: f376b2b9e2fc1f0c8f9c6275e96ede5f423c4126
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agobump version to 6.1.0-2
Thomas Lamprecht [Tue, 16 Nov 2021 08:38:18 +0000 (09:38 +0100)]
bump version to 6.1.0-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocherry-pick segfault fix
Fabian Grünbichler [Tue, 16 Nov 2021 08:22:02 +0000 (09:22 +0100)]
cherry-pick segfault fix

this was reported multiple times in our forums[1 with backtraces, 2 & 3
with same log messages], fix is taken from upstream master.

1: https://forum.proxmox.com/threads/pve-7-0-14-1-vm-not-running-live-migration-kills-vm-post-ssd-move-pre-ram-move.99704/
2: https://forum.proxmox.com/threads/proxmox-7-0-14-1-crashes-vm-during-migrate-to-other-host.99678
3: https://forum.proxmox.com/threads/cannot-migrate-between-zfs-and-ceph.99685/#post-430152

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agobump version to 6.1.0-1
Thomas Lamprecht [Mon, 11 Oct 2021 13:15:26 +0000 (15:15 +0200)]
bump version to 6.1.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoadd fixup patch for qxl migration logic
Stefan Reiter [Wed, 13 Oct 2021 15:48:38 +0000 (17:48 +0200)]
add fixup patch for qxl migration logic

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agoupdate and rebase to QEMU v6.1.0
Stefan Reiter [Mon, 11 Oct 2021 11:55:34 +0000 (13:55 +0200)]
update and rebase to QEMU v6.1.0

Very clean rebase, only the +pve version handling needed manual fixing.
Drops two applied patches from extra/ and adds one new from upstream
(extra/0001*, fixes VNC over unix sockets) as well as 3 of my own for
allowing password changes on custom VNC displays again (as seen and
reviewed upstream, but not yet applied).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agobump version to 6.0.0-4
Thomas Lamprecht [Mon, 6 Sep 2021 05:30:05 +0000 (07:30 +0200)]
bump version to 6.0.0-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoadd temporary QMP race fix
Stefan Reiter [Wed, 1 Sep 2021 16:10:12 +0000 (18:10 +0200)]
add temporary QMP race fix

same as the initial version sent to qemu-devel, it won't be the final
fix we plan to upstream but it should be enough band-aid to
workaround how PVE uses the QMP.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
 [ Thomas: add a bit reasoning to commit message body ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodrop patch force-disabling smm
Wolfgang Bumiller [Tue, 10 Aug 2021 07:55:11 +0000 (09:55 +0200)]
drop patch force-disabling smm

This drops debian/patches/pve/0005-PVE-Config-smm_available-false.patch
(and renumbers the remaining patches)

From what I could gather, this patch was originally added
due to issues with old kernels. Now we have users which
seem to run into issues *with* the patch.

All this does is toggle an option, and it's available via a
qemu CLI option anyway, so if dropping this patch causes
issues for some people we can just add an option to
qemu-server & UI control smm explicitly.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Cc: Alexandre Derumier <aderumier@odiso.com>
Tested-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agobump version to 6.0.0-3
Fabian Grünbichler [Tue, 3 Aug 2021 13:02:40 +0000 (15:02 +0200)]
bump version to 6.0.0-3

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoio_uring: resubmit when result is -EAGAIN
Fabian Ebner [Thu, 29 Jul 2021 09:50:31 +0000 (11:50 +0200)]
io_uring: resubmit when result is -EAGAIN

Linux SCSI can throw spurious -EAGAIN in some corner cases in its
completion path, which will end up being the result in the completed
io_uring request.

Resubmitting such requests should allow block jobs to complete, even
if such spurious errors are encountered.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agobump version to 6.0.0-2
Thomas Lamprecht [Wed, 23 Jun 2021 09:04:47 +0000 (11:04 +0200)]
bump version to 6.0.0-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoenable io-uring support in QEMU builds
Stefan Reiter [Mon, 7 Jun 2021 11:48:49 +0000 (13:48 +0200)]
enable io-uring support in QEMU builds

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agobuildsys: change upload dist to bullseye
Thomas Lamprecht [Tue, 8 Jun 2021 09:18:10 +0000 (11:18 +0200)]
buildsys: change upload dist to bullseye

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 6.0.0-1
Thomas Lamprecht [Fri, 28 May 2021 09:30:55 +0000 (11:30 +0200)]
bump version to 6.0.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoupdate keycodemapdb for 6.0
Stefan Reiter [Thu, 27 May 2021 10:43:34 +0000 (12:43 +0200)]
update keycodemapdb for 6.0

QEMU 6.0 requires the updated version to build correctly, as the
keymap-gen tool gained some new parameters.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agodebian: ignore submodule checks in QEMU build
Stefan Reiter [Thu, 27 May 2021 10:43:33 +0000 (12:43 +0200)]
debian: ignore submodule checks in QEMU build

...we do those manually, and the build dir is not a git repo.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agoudpate and rebase to QEMU v6.0.0
Stefan Reiter [Thu, 27 May 2021 10:43:32 +0000 (12:43 +0200)]
udpate and rebase to QEMU v6.0.0

Mostly minor changes, bigger ones summarized:
* QEMU's internal backup code now uses a new async system, which allows
  parallel requests - the default max_workers settings is 64, I chose
  less, since 64 put enough stress on QEMU that the guest became
  practically unusable during the backup, and 16 still shows quite a
  nice measureable performance improvement. Little code changes for us
  though.
* 'malformed' QAPI parameters/functions are now a build error (i.e.
  using '_' vs '-'), I chose to just whitelist our calls in the name of
  backwards compatibility.
* monitor OOB race fix now uses the upstream variant, cherry-picked from
  origin/master since it's not in 6.0 by default
* last patch fixes a bug with snapshot rollback related to the new yank
  system

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agobump version to 5.2.0-11
Thomas Lamprecht [Thu, 13 May 2021 17:30:59 +0000 (19:30 +0200)]
bump version to 5.2.0-11

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/control: add libjson-perl to build dependencies
Thomas Lamprecht [Thu, 13 May 2021 17:29:19 +0000 (19:29 +0200)]
d/control: add libjson-perl to build dependencies

we use that to build the available machine/flags list

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 5.2.0-6
Thomas Lamprecht [Thu, 15 Apr 2021 14:29:52 +0000 (16:29 +0200)]
bump version to 5.2.0-6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoalloc track: use coroutine version of bdrv_pwrite_zeroes
Thomas Lamprecht [Tue, 6 Apr 2021 14:26:25 +0000 (16:26 +0200)]
alloc track: use coroutine version of bdrv_pwrite_zeroes

as we're in a coroutine here too

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agopbs block driver: run read in the AIO context of the bs
Thomas Lamprecht [Tue, 6 Apr 2021 14:25:42 +0000 (16:25 +0200)]
pbs block driver: run read in the AIO context of the bs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoalloc track: acquire BS AIO context during dropping
Thomas Lamprecht [Tue, 6 Apr 2021 14:02:56 +0000 (16:02 +0200)]
alloc track: acquire BS AIO context during dropping

ran into this when live-restoring a backup configured for IO-threads,
got the good ol':
> qemu: qemu_mutex_unlock_impl: Operation not permitted
error.

Checking out the history of the related bdrv_backup_top_drop(*bs)
method, we can see that it used to do the AIO context acquiring too,
but in the backup path this was problematic and was changed to be
higher up in the call path in a upstream series from Stefan[0].

That said, this is a completely different code path and it is safe to
do so here. We always run from the main threads's AIO context here
and we call it only indirectly once, guarded by checking for
`s->drop_state == DropNone` and set `s->drop_state = DropRequested`
shortly before we schedule the track_drop() in a bh.

[0]: https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg09139.html

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoalloc track: keep track_drop() closer to similar block drivers
Thomas Lamprecht [Tue, 6 Apr 2021 14:00:26 +0000 (16:00 +0200)]
alloc track: keep track_drop() closer to similar block drivers

Reads just nicer with a drain begin *and* end call. Also clearing the
backing link of the alloc track BDS makes it closer to
bdrv_backup_top_drop() with which this driver has a bit in common.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 5.2.0-5
Thomas Lamprecht [Tue, 30 Mar 2021 16:19:47 +0000 (18:19 +0200)]
bump version to 5.2.0-5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoadd upstream fixes for qmp_block_resize
Stefan Reiter [Tue, 30 Mar 2021 15:59:51 +0000 (17:59 +0200)]
add upstream fixes for qmp_block_resize

cherry-picked cleanly from 6.0 development tree, fixes an issue with
resizing RBD drives (and reportedly also on krbd or potentially other
storage backends) with iothreads.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobump version to 5.2.0-4
Thomas Lamprecht [Tue, 23 Mar 2021 14:41:33 +0000 (15:41 +0100)]
bump version to 5.2.0-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoAdd tentative fix for QMP hang
Stefan Reiter [Mon, 22 Mar 2021 15:48:25 +0000 (16:48 +0100)]
Add tentative fix for QMP hang

Not exactly as sent upstream[0] since we're missing a change in our
v5.2.0 branch (irrelevant for us), but functionally works the same.

[0] https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg07590.html

3 years agod/control: drop unused python from dependencies
Thomas Lamprecht [Thu, 18 Mar 2021 13:15:31 +0000 (14:15 +0100)]
d/control: drop unused python from dependencies

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoadd alloc-track block driver patch
Stefan Reiter [Mon, 15 Mar 2021 15:41:24 +0000 (16:41 +0100)]
add alloc-track block driver patch

See added patches for more info, overview:
0044: slightly increase PBS performance by reducing allocations
0045: slightly increase block-stream performance for Ceph
0046: don't crash with block-stream on RBD
0047: add alloc-track driver for live restore

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agofix saving and loading dirty bitmaps in snapshots
Stefan Reiter [Tue, 16 Mar 2021 16:30:22 +0000 (17:30 +0100)]
fix saving and loading dirty bitmaps in snapshots

Saving dirty bitmaps from our savevm-async code didn't work, since we
use a coroutine which holds the iothread mutex already (upstream savevm
is sync, migration uses a thread). Release the mutex before calling the
one function that (according to it's documentation) requires the lock to
*not* be held: qemu_savevm_state_pending.

Additionally, loading dirty bitmaps requires a call to
dirty_bitmap_mig_before_vm_start after "loadvm", which the upstream
savevm does explicitly afterwards - do that too.

This is exposed via the query-proxmox-support property
"pbs-dirty-bitmap-savevm".

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobump version to 5.2.0-3
Thomas Lamprecht [Fri, 5 Mar 2021 15:23:16 +0000 (16:23 +0100)]
bump version to 5.2.0-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agomachine list: save as JSON
Thomas Lamprecht [Fri, 5 Mar 2021 15:21:30 +0000 (16:21 +0100)]
machine list: save as JSON

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoadd ACPI compat patch for 5.1 and older machine types
Stefan Reiter [Thu, 4 Mar 2021 12:52:04 +0000 (13:52 +0100)]
add ACPI compat patch for 5.1 and older machine types

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoadd static supported machines file
Stefan Reiter [Thu, 4 Mar 2021 12:52:03 +0000 (13:52 +0100)]
add static supported machines file

Same rationale as the CPU flags file, avoids calling QEMU binary just to
query machine types.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agomove bitmap-mirror patches to seperate folder
Stefan Reiter [Wed, 3 Mar 2021 09:56:03 +0000 (10:56 +0100)]
move bitmap-mirror patches to seperate folder

...instead of having them in the middle of the backup related patches.
These might (hopefully) become upstream at some point as well.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoclean up pve/ patches by squashing patches of patches
Stefan Reiter [Wed, 3 Mar 2021 09:56:02 +0000 (10:56 +0100)]
clean up pve/ patches by squashing patches of patches

No functional change intended.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 5.2.0-2
Thomas Lamprecht [Wed, 24 Feb 2021 17:25:18 +0000 (18:25 +0100)]
bump version to 5.2.0-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agopbs-restore: unref/close target block backend
Stefan Reiter [Wed, 24 Feb 2021 13:34:47 +0000 (14:34 +0100)]
pbs-restore: unref/close target block backend

Use blk_unref to drop the last reference, which will close the block
backend and flush all caches and outstanding writes.

This is especially important for restoring to Ceph, as the userspace
librbd caches will not be flushed if the application exits immediately,
leading to potentially incomplete restores.

Reported-by: Eneko Lacunza <elacunza@binovo.es>
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agod/patches: backport virtiofsd security fix
Thomas Lamprecht [Wed, 24 Feb 2021 17:40:28 +0000 (18:40 +0100)]
d/patches: backport virtiofsd security fix

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/rules: build virtiofsd
Thomas Lamprecht [Wed, 24 Feb 2021 15:25:23 +0000 (16:25 +0100)]
d/rules: build virtiofsd

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 5.2.0-1
Thomas Lamprecht [Fri, 12 Feb 2021 11:10:04 +0000 (12:10 +0100)]
bump version to 5.2.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobuild: drop explicit libproxmox-backup-qemu0 dep
Fabian Grünbichler [Tue, 9 Feb 2021 11:29:32 +0000 (12:29 +0100)]
build: drop explicit libproxmox-backup-qemu0 dep

it ships a symbol file now, so it can be auto-generated based on the
build-dep and usage.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoadd PBS master key support
Stefan Reiter [Thu, 11 Feb 2021 16:11:12 +0000 (17:11 +0100)]
add PBS master key support

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoUpdate to QEMU 5.2
Stefan Reiter [Thu, 11 Feb 2021 16:11:11 +0000 (17:11 +0100)]
Update to QEMU 5.2

Lots of patches touched and some slight changes to the build process
since QEMU switched to meson as their build system. Functionality-wise
very little rebasing required.

New patches introduced:
* pve/0058: to fix VMA backups and clean up some code in general with
  new 5.2 features now available to us (namely coroutine-enabled QMP).
* extra/0002: don't build man pages for guest agent when disabled
* extra/0003: fix live-migration with hugepages
* 0017 and 0018 are adjusted to fix snapshot abort and improve
  snap performance a bit

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agofix #3084: fall back to open-iscsi initiatorname
Fabian Ebner [Tue, 17 Nov 2020 11:38:36 +0000 (12:38 +0100)]
fix #3084: fall back to open-iscsi initiatorname

Fixes vma restore when the target is an iSCSI storage which expects that
initiatorname. Also avoids the need to always explicitly set the initiatorname
in PVE code, thus fixing moving efidisks from and to such iSCSI storages.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agobump version to 5.1.0-8
Wolfgang Bumiller [Thu, 7 Jan 2021 09:28:46 +0000 (10:28 +0100)]
bump version to 5.1.0-8

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agofix #3225: properly cancel jobs in 'created' state
Wolfgang Bumiller [Thu, 7 Jan 2021 09:26:37 +0000 (10:26 +0100)]
fix #3225: properly cancel jobs in 'created' state

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agodisable jemalloc
Stefan Reiter [Thu, 10 Dec 2020 15:23:38 +0000 (16:23 +0100)]
disable jemalloc

jemalloc does not play nice with our Rust library (proxmox-backup-qemu),
specifically it never releases memory allocated from Rust to the OS.
This leads to a problem with larger caches (e.g. for the PBS block driver).

It appears to be related to this GitHub issue:
https://github.com/jemalloc/jemalloc/issues/1398

The background_thread solution seems weirdly hacky, so let's disable
jemalloc entirely for now.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobump version to 5.1.0-7
Thomas Lamprecht [Wed, 25 Nov 2020 13:09:24 +0000 (14:09 +0100)]
bump version to 5.1.0-7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoupdate patches with some pbs-state migration cleanups
Stefan Reiter [Tue, 10 Nov 2020 16:16:15 +0000 (17:16 +0100)]
update patches with some pbs-state migration cleanups

...and literal cleanup, as in, call save_cleanup after success or error.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoupdate patches with squashed in 'include library version'
Stefan Reiter [Tue, 24 Nov 2020 15:41:20 +0000 (16:41 +0100)]
update patches with squashed in 'include library version'

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
bump build-dependency on libproxmox-backup-qemu0-dev with version query
support

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agobump version to 5.1.0-6
Thomas Lamprecht [Thu, 5 Nov 2020 17:59:44 +0000 (18:59 +0100)]
bump version to 5.1.0-6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agofix dirty-bitmap state migration freeze
Thomas Lamprecht [Thu, 5 Nov 2020 17:43:01 +0000 (18:43 +0100)]
fix dirty-bitmap state migration freeze

The idea in general is to migrate all the state, which is small for
us, in a single step once. But, QEMU only calls save state if we
return active true.

Hardcoding is-active to return true, like done initially, makes the
migration freeze, as QEMU thinks this is never done, and only stops
calling us and finishes after a few seconds.

So, add a state with an "active" boolean, set to true when
initializing a migration, and set it to false when the state was
saved.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 5.1.0-5
Thomas Lamprecht [Wed, 4 Nov 2020 17:36:42 +0000 (18:36 +0100)]
bump version to 5.1.0-5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agomigration/block-dirty-bitmap: migrate other bitmaps even if one fails
Thomas Lamprecht [Wed, 4 Nov 2020 17:35:50 +0000 (18:35 +0100)]
migration/block-dirty-bitmap: migrate other bitmaps even if one fails

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 5.1.0-4
Thomas Lamprecht [Thu, 29 Oct 2020 17:09:22 +0000 (18:09 +0100)]
bump version to 5.1.0-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/control: update versioned dependency for proxmox backup qemu library
Thomas Lamprecht [Thu, 29 Oct 2020 17:07:10 +0000 (18:07 +0100)]
d/control: update versioned dependency for proxmox backup qemu library

to have the proxmox_export_state et al. available

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapply dirty-bitmap state migration + fix
Thomas Lamprecht [Thu, 29 Oct 2020 17:05:43 +0000 (18:05 +0100)]
apply dirty-bitmap state migration + fix

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoSeveral fixes for backup abort and error reporting
Stefan Reiter [Thu, 29 Oct 2020 13:10:36 +0000 (14:10 +0100)]
Several fixes for backup abort and error reporting

Also add my Signed-off-by to some patches where it was missing.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobump version to 5.1.0-3
Thomas Lamprecht [Tue, 29 Sep 2020 07:23:06 +0000 (09:23 +0200)]
bump version to 5.1.0-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoAdd transaction patches and fix for blocking finish
Stefan Reiter [Mon, 28 Sep 2020 15:48:32 +0000 (17:48 +0200)]
Add transaction patches and fix for blocking finish

With the transaction patches, patch 0026-PVE-Backup-modify-job-api.patch
is no longer necessary, so drop it and rebase all following patches on
top.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobump version to 5.1.0-2
Thomas Lamprecht [Mon, 14 Sep 2020 18:01:32 +0000 (20:01 +0200)]
bump version to 5.1.0-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agocherry-pick: "usb: fix setup_len init (CVE-2020-14364)"
Thomas Lamprecht [Mon, 14 Sep 2020 17:38:34 +0000 (19:38 +0200)]
cherry-pick: "usb: fix setup_len init (CVE-2020-14364)"

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agowork around #3002: revert "qemu-img convert: Don't pre-zero images"
Thomas Lamprecht [Mon, 14 Sep 2020 17:37:45 +0000 (19:37 +0200)]
work around #3002: revert "qemu-img convert: Don't pre-zero images"

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoAdd systemd journal logging patch
Stefan Reiter [Tue, 30 Jun 2020 12:06:20 +0000 (14:06 +0200)]
Add systemd journal logging patch

Prints QEMU errors that occur *after* the "-daemonize" fork to the
systemd journal, instead of pushing them into /dev/null like before.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobump version to 5.1.0-1
Thomas Lamprecht [Thu, 20 Aug 2020 12:48:58 +0000 (14:48 +0200)]
bump version to 5.1.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoallow backup of read-only block drives
Fabian Grünbichler [Thu, 6 Aug 2020 11:13:49 +0000 (13:13 +0200)]
allow backup of read-only block drives

this is needed for template backups with PBS until we have the backup
equivalent of 'pbs-restore'.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoupdate to QEMU 5.1
Stefan Reiter [Thu, 20 Aug 2020 08:42:45 +0000 (10:42 +0200)]
update to QEMU 5.1

No major semantic changes, mostly just deprecations and changed function
signatures. Drop the extra/ patches, as they have been applied upstream.

The added extra/ patch was accepted upstream[0] but has not been picked
up for 5.1. It is required for non-4M aligned backups to work with PBS.

[0] https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg01671.html

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobump version to 5.0.0-13
Thomas Lamprecht [Wed, 19 Aug 2020 16:18:00 +0000 (18:18 +0200)]
bump version to 5.0.0-13

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoPVE: add query-pbs-bitmap-info QMP call
Thomas Lamprecht [Wed, 19 Aug 2020 16:11:23 +0000 (18:11 +0200)]
PVE: add query-pbs-bitmap-info QMP call

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoPVE: add zero block handling to PBS dump callback
Thomas Lamprecht [Wed, 19 Aug 2020 11:56:03 +0000 (13:56 +0200)]
PVE: add zero block handling to PBS dump callback

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 5.0.0-12
Fabian Grünbichler [Tue, 11 Aug 2020 09:29:21 +0000 (11:29 +0200)]
bump version to 5.0.0-12

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agofix PBS write callback with big blocks
Fabian Grünbichler [Tue, 11 Aug 2020 09:14:36 +0000 (11:14 +0200)]
fix PBS write callback with big blocks

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agopatch for possible DOS in qemu network packet processing
Oguz Bektas [Mon, 10 Aug 2020 12:32:22 +0000 (14:32 +0200)]
patch for possible DOS in qemu network packet processing

fixes an assertion failure in qemu network packet processing, which can
lead to DOS'ing the qemu process on the host. this affects 'e1000e' and
'vmxnet3' network devices.

patch is cherry-picked from the commit mentioned in the oss-security email.

more info on oss-security [0]

[0]: https://www.openwall.com/lists/oss-security/2020/08/10/1

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
3 years agobump version to 5.0.0-11
Thomas Lamprecht [Tue, 14 Jul 2020 10:45:24 +0000 (12:45 +0200)]
bump version to 5.0.0-11

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoFix dirty-bitmap PBS backup with multiple drives
Stefan Reiter [Tue, 14 Jul 2020 08:45:16 +0000 (10:45 +0200)]
Fix dirty-bitmap PBS backup with multiple drives

"PVE backup: rename incremental to use-dirty-bitmap" merged two
variables (use_dirty_bitmap and incremental) into one, but they served
two different purposes. Rename the original use_dirty_bitmap to
"expect_only_dirty" so the new one doesn't conflict, and rework "PVE:
use proxmox_backup_check_incremental" around that semantic.

In practice, this had the effect that only one disk at a time would
have a bitmap added, as after the first "use_dirty_bitmap" would be set
to one and the rest would behave as if the QMP parameter of the same
name was unset.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobump version to 5.0.0-10
Wolfgang Bumiller [Fri, 10 Jul 2020 11:33:44 +0000 (13:33 +0200)]
bump version to 5.0.0-10

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agofix backup qmp parameters to pass along encryption info
Wolfgang Bumiller [Fri, 10 Jul 2020 11:31:50 +0000 (13:31 +0200)]
fix backup qmp parameters to pass along encryption info

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump version to 5.0.0-9
Thomas Lamprecht [Thu, 9 Jul 2020 11:18:48 +0000 (13:18 +0200)]
bump version to 5.0.0-9

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/control: update build-dependency of libproxmox-backup-qemu0-dev
Thomas Lamprecht [Thu, 9 Jul 2020 11:17:29 +0000 (13:17 +0200)]
d/control: update build-dependency of libproxmox-backup-qemu0-dev

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoPBS patches: block driver, adapat encrypt/compress param, add query-proxmox-support...
Thomas Lamprecht [Thu, 9 Jul 2020 11:15:49 +0000 (13:15 +0200)]
PBS patches: block driver, adapat encrypt/compress param, add query-proxmox-support QMP cmd

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 5.0.0-8
Thomas Lamprecht [Mon, 6 Jul 2020 20:58:53 +0000 (22:58 +0200)]
bump version to 5.0.0-8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agofixup: proxmox_backup_check_incremental is negated
Thomas Lamprecht [Mon, 6 Jul 2020 20:58:30 +0000 (22:58 +0200)]
fixup: proxmox_backup_check_incremental is negated

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 5.0.0-7
Thomas Lamprecht [Mon, 6 Jul 2020 20:19:12 +0000 (22:19 +0200)]
bump version to 5.0.0-7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoupdate/add PBS integration patches
Thomas Lamprecht [Mon, 6 Jul 2020 20:13:10 +0000 (22:13 +0200)]
update/add PBS integration patches

* rename "incremental" param to "use-dirty-bitmap", avoids confusion
  as the backup can be incrementally also with that param set to
  false.
* use new proxmox_backup_check_incremental
* fix setting dirty counter and adapt to new connect API semantic

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 5.0.0-6
Thomas Lamprecht [Fri, 3 Jul 2020 15:00:59 +0000 (17:00 +0200)]
bump version to 5.0.0-6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agopbs: query-backup: set reused field also for dirty-bitmap
Thomas Lamprecht [Fri, 3 Jul 2020 17:25:31 +0000 (19:25 +0200)]
pbs: query-backup: set reused field also for dirty-bitmap

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>