5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-07 17:17:57 +03:00
Commit Graph

2401 Commits

Author SHA1 Message Date
Thomas Lamprecht
5749c38350 vzdump: do not log per disk dirty bitmap state for templates
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-21 14:11:48 +02:00
Fabian Grünbichler
4ef13a7f9a fix #2862: properly backup (all) VM templates
until we maybe have a 'pbs-backup' that links Qemu and PBS like
'pbs-restore', we need to do a regular backup for the template case to
support all storage types and image formats.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-08-21 13:45:55 +02:00
Thomas Lamprecht
3eb2f3eb56 followup cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-21 10:44:00 +02:00
Thomas Lamprecht
1e27bda1aa tests: cfg2cmd: check also warnings
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-21 10:38:27 +02:00
Thomas Lamprecht
90d96715f8 tests: cfg2cmd: get testname earlier
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-21 10:38:08 +02:00
Stoiko Ivanov
b5d32c6be2 print_vga_device: check if bios is defined
Otherwise a warning is printed if the bios is not set in the config.

reported via community forum:
https://forum.proxmox.com/threads/warning-in-qemuserver.74683/

reproduced and tested that the patch fixes the issue.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2020-08-21 10:12:27 +02:00
Stefan Reiter
1ca43f1cde vzdump: show "reused" message even if nothing was transferred
This still works even if all drives were clean. It then shows the very
magical line:

  INFO: backup was done incrementally, reused 34.00 GiB (100%)

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-08-20 15:54:54 +02:00
Stefan Reiter
2790636afd vzdump: allow bandwidth limit for PBS backup too
QEMU handles it just as well as with VMA, so this was probably just
forgotten to implement for PBS.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-08-20 15:54:54 +02:00
Thomas Lamprecht
75f25f44bc bump version to 6.2-13
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-20 11:42:53 +02:00
Thomas Lamprecht
f856671495 vzdump: restore log behavior for VMs running with older QEMU
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-20 10:45:34 +02:00
Thomas Lamprecht
a40295b6aa vdzump: padd percentagde done counter, format duration for humans
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-20 10:25:08 +02:00
Thomas Lamprecht
d35412a32a vzdump: output sparseness again
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-20 10:25:08 +02:00
Thomas Lamprecht
bafae3ec84 vzdump: log reused information also if we run only <1s
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-20 10:24:38 +02:00
Thomas Lamprecht
13ddc7eb91 vzdump: followup: log total dirtiness again, minor output adaptions
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-20 10:24:38 +02:00
Thomas Lamprecht
db3272d084 bump version to 6.2-12
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-19 19:46:28 +02:00
Aaron Lauterer
789fe8e818 cfg2cmd: vga: fix #2749: disable edid for Win+BIOS+VGA machines
Edid support was added with Qemu 5. Windows guests seem to not be able
to get all possible resolutions if the default std VGA device is used as
GPU and the VM boots in BIOS mode. The result is that only one of the
following three resolutions can be configured:

800x600
1024x768
1920x1080

It is important to note that just booting a Windows VM with the edid=off
parameter will not make the large list of resolutions available. It
seems that Windows is caching the list of possible resolutions
somewhere [0].

Uninstalling the 'Microsoft Basic Display Adapter' in the device manager
and rebooting the VM is one way I found to force Windows to recreate the
list of possible resolutions.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>

[0] https://lists.nongnu.org/archive/html/qemu-devel/2020-07/msg07128.html
2020-08-19 18:22:43 +02:00
Stefan Reiter
78179bda0f vzdump: don't use dirty bitmap when VM was off
There can't be a dirty bitmap when the VM was off, and if it was off we
will also shut it down after the backup, so no point in creating one.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-08-19 18:20:34 +02:00
Stefan Reiter
0f6c69814b vzdump: log 100% percent in case $target is 0
When $target is 0, that means we don't have to upload any data, in which
case we're immediately done.

Otherwise incremental backups with no changes display a really weird
  status: 0% (0.0 B of 0.0 B), duration 0, read: 0 B/s, write: 0 B/s
when they're actually done already.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-08-19 18:20:34 +02:00
Stefan Reiter
8825248c43 vzdump: display actually uploaded chunks as 'write' speed
Previously 'read' and 'write' would always show the same value, which is
of little use. Change it so 'write' excludes reused bytes, thus
displaying the actual upload speed.

$last_reused needs to be initialized to contain reused data from 'clean'
dirty bitmaps to ensure the first output line is correct.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-08-19 18:20:34 +02:00
Stefan Reiter
3a44897f74 vzdump: improve logging output with dirty bitmaps
Uses the new 'query-pbs-bitmap-info' QMP call to retrieve additional
information about each drive's dirty bitmap. Returned info is also used
to calculate $target by simply adding all the dirty values (dirty is
equal to size in case the entire drive will be backed up).

"Backup is sparse" message is suppressed for PBS, since it makes little
sense (if zero chunks appear in the clean area of a bitmap, they won't
be counted, and a user is probably more interested in the 'reused' data
anyway).

Also removes the need for the hacky $first_round query-backup handling.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-08-19 18:20:34 +02:00
Fabian Ebner
b2e813a6d5 validate_cpu_conf: return config
as parse_property_string expects it to.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Reviewed-by: Stefan Reiter <s.reiter@proxmox.com>
2020-08-12 13:54:38 +02:00
Fabian Ebner
a1cbe55cc7 Add missing die statements
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-08-11 14:34:56 +02:00
Fabian Ebner
c15b597137 Add dot character to CPU commandline regular expression
to be able to parse CPU features like "+sse4.2" correctly.

Reported here: https://forum.proxmox.com/threads/zsf-snapshot-unable-to-parse-value-of-runningcpu-got-undefined-value.74094/

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-08-11 12:58:43 +02:00
Fabian Grünbichler
2673ee0b16 d/control: bump versioned dep on pve-storage
needed for PBS plugin methods that are called in backup/restore.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-08-06 09:49:20 +02:00
Fabian Ebner
1264d6c511 Use correct option for storage_migrate
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-08-04 13:57:09 +02:00
Fabian Grünbichler
bd9ab3664d bump version to 6.2-11
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-07-24 08:17:03 +02:00
Fabian Ebner
aa491a6ecd Fix #2728: die/warn if target is not a replication target when live-migrating
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Tested-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-07-24 07:18:08 +02:00
Fabian Grünbichler
503e96f8de fix #2857: restore: pass keyfile to pbs-restore
if configured. otherwise restoring encrypted backups will be quite
hard..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-07-20 11:08:26 +02:00
Thomas Lamprecht
6b84c2d66a bump version to 6.2-10
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-13 13:38:42 +02:00
Fabian Ebner
d544e0e0cb set resume parameter for vm_start_nolock if there is a vmstate
In config_to_command, '-loadstate' will be added whenever there is a
vmstate in the config. But in vm_start_nolock, the resume parameter
is used to calculate the appropriate timeout and to remove the vmstate
after the start. The resume parameter was only set if there is a
'suspended' lock, but apparently [0] we cannot rely on the lock to be
set if and only if there is a vmstate.

[0]: https://forum.proxmox.com/threads/task-error-start-failed.72450

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-07-13 12:29:59 +02:00
Thomas Lamprecht
871deaa557 d/control: update build-dependency of pve-doc-generator
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-13 12:25:33 +02:00
Stefan Reiter
5c3b12c7af Add man page cpu-models.conf(5)
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-07-13 12:24:39 +02:00
Dominik Csapak
7de7f675c2 fix mdev cmdline generation
during refactoring, the vmid got lost, but is necessary to get
the correct mdev id

Fixes commit 74c17b7a23
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[ reference fixed commit ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-13 10:29:25 +02:00
Wolfgang Bumiller
d85703a49b pass -X to ssh on upload
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-10 14:24:36 +02:00
Wolfgang Bumiller
70d3ff79a8 bump version to 6.2-9
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-10 14:24:03 +02:00
Wolfgang Bumiller
ece740308f support for encrypted pbs backups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-10 14:23:17 +02:00
Wolfgang Bumiller
dea4b04c1c Add comment about pbs env vars
pbs-restore might not stay there like that forever and if
this code path changes we should remember to also remove the
environment variables

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-10 11:44:54 +02:00
Thomas Lamprecht
1e75990c43 bump version to 6.2-8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-09 15:14:41 +02:00
Stefan Reiter
b53ba8d0f1 fixup: use parse_property_string instead of parse_cpu_conf_basic
The latter was removed and replaced with a validator.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-07-09 14:45:21 +02:00
Thomas Lamprecht
b54ba7a170 bump version to 6.2-7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-09 13:51:25 +02:00
Stefan Reiter
fb9f512c19 backup: detect PBS features and use only supported
If 'query-proxmox-support' is not known to QEMU, assume that no other
features are supported either.

If 'pbs' is not supported at all, error out with a nice message.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-09 13:44:22 +02:00
Fabian Grünbichler
b6f8076eb6 d/control: bump versioned dependency on pve-common
for PVE::JSONSchema with additional validator support

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-07-08 10:28:20 +02:00
Stefan Reiter
7b8c4de3b8 fix #2671: include CPU format in man page again
Use the new register_format(3) call to use a validator (instead of a
parser) for 'pve-(vm-)?cpu-conf'. This way the $cpu_fmt hash can be used for
generating the documentation, while still applying the same verification
rules as before.

Since the function no longer parses but only verifies, the parsing in
print_cpu_device/get_cpu_options has to go via JSONSchema directly.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-07-08 10:28:20 +02:00
Thomas Lamprecht
fd98147d6b bump version to 6.2-6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-07 19:00:20 +02:00
Thomas Lamprecht
91c9f3b062 vzdump: log: small fixups
reuse can also come from the current backup - so drop the "from last
backup" as this can be very confusing if one reads it after making
the first backup ever, with no last backup existing.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-07 17:32:27 +02:00
Thomas Lamprecht
2098f2ff87 vzdump: fix variable redeclaration warning
happened due to moving the code from another scope which had no $res,
and not noticing as it was still working after all.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-07 08:41:30 +02:00
Thomas Lamprecht
277cdcb072 bump version to 6.2-5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-06 21:59:50 +02:00
Thomas Lamprecht
b4be9c0207 backup: PBS: save backup task size
normally this is done centrally in the managers code, but we do not
have the info for PBS there.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-06 21:59:50 +02:00
Thomas Lamprecht
6cdb568c33 backup: query status: use latest up-to-date info when finished
we used the info from the previous loop for some summary logs, fix
that.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-06 21:59:50 +02:00
Thomas Lamprecht
4d159c24d9 backup: restructure log: use human-readable sizes and include PBS info
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-06 21:59:50 +02:00