5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-25 06:03:52 +03:00

67 Commits

Author SHA1 Message Date
Thomas Lamprecht
e8705fc59e vzdump archive_vma: move getting QMPClient nearer to using sites
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-19 18:48:41 +01:00
Thomas Lamprecht
d11e91d2de vzdump: indentation and code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-19 18:46:49 +01:00
Thomas Lamprecht
0b2f574b4c vzdump: factor out VM powerstate handling and qmp backup cancel
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-19 18:41:43 +01:00
Thomas Lamprecht
1ece829a39 vzdump: factor out QGA FS freeze/thaw
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-19 18:37:20 +01:00
Thomas Lamprecht
02da0c65bb vzdump: factor out fork_compressor_pipe
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-19 18:34:31 +01:00
Thomas Lamprecht
81dcd4799f vzdump: factor out _get_task_devlist
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-19 18:32:00 +01:00
Thomas Lamprecht
09eb196b9e vzdump: refactor and cleanup code in query_backup_status_loop
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-19 18:26:34 +01:00
Thomas Lamprecht
f301bc0d34 vzdump: use QemuConfig directly to set/unset locks
no need to fork/exec a process for that..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-19 15:58:43 +01:00
Thomas Lamprecht
cd544fb2b9 vzdump: code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-19 15:58:13 +01:00
Thomas Lamprecht
a113a58a64 vzdump prepare: refactor and code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-19 11:48:19 +01:00
Dietmar Maurer
f6168f1a6a archive_pbs: call backup_cancel only when job is really started 2020-03-11 11:47:24 +01:00
Dietmar Maurer
d2cc2cbe69 archive_vma: call backup_cancel only when job is really started 2020-03-11 11:47:24 +01:00
Dietmar Maurer
c5983223b0 add support for proxmox backup 2020-03-11 11:47:24 +01:00
Stefan Reiter
1249d579ea vzdump: exclude efidisks from backups of non-OVMF machines
Machines running with SeaBIOS don't have the efidisk attached, so QEMU
cannot back it up and fails with "unknown drive".

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-02-17 15:47:04 +01:00
Thomas Lamprecht
82b25dbc0c vzdump: log QGA FS freeze/thaw try in task log
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-27 20:20:30 +01:00
Stefan Reiter
3392d6cacf refactor: extract QEMU machine related helpers to package
...PVE::QemuServer::Machine.

qemu_machine_feature_enabled is exported since it has a *lot* of users
in PVE::QemuServer and a long enough name as it is.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-11-20 16:29:23 +01:00
Stefan Reiter
0a13e08ec2 refactor: create QemuServer::Monitor for high-level QMP access
QMP and monitor helpers are moved from QemuServer.pm.

By using only vm_running_locally instead of check_running, a cyclic
dependency to QemuConfig is avoided. This also means that the $nocheck
parameter serves no more purpose, and has thus been removed along with
vm_mon_cmd_nocheck.

Care has been taken to avoid errors resulting from this, and
occasionally a manual check for a VM's existance inserted on the
callsite.

Methods have been renamed to avoid redundant naming:
* vm_qmp_command -> qmp_cmd
* vm_mon_cmd -> mon_cmd
* vm_human_monitor_command -> hmp_cmd

mon_cmd is exported since it has many users. This patch also changes all
non-package users of vm_qmp_command to use the mon_cmd helper. Includes
mocking for tests.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-11-20 16:29:23 +01:00
Thomas Lamprecht
317c55c2d1 backup: is IOThread comaptible: only check running VMs
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-23 11:28:51 +02:00
Thomas Lamprecht
48343b3f1d add runs_at_least_qemu_version to check if we can backup IOThread disks
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-23 10:47:45 +02:00
Thomas Lamprecht
d610b14591 [no-change] sort and group module use
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-23 10:36:46 +02:00
Thomas Lamprecht
8266bc59db Revert "fix #1071: VMs with IOThread enabled disks can now be backed up"
This reverts commit 6b4b369fe35eb43ac08cf5609b488088c537926d.
2019-10-23 09:31:51 +02:00
Thomas Lamprecht
6b4b369fe3 fix #1071: VMs with IOThread enabled disks can now be backed up
Thanks to Dietmars patch[0] those VMs can now be backed up
successfully, so remove this aborting check.

[0]: https://git.proxmox.com/?p=pve-qemu.git;a=commit;h=69cb18950a705b54f438f4659b603b3f52901c2f

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-By: Dominik Csapak <d.csapak@proxmox.com>
2019-10-22 11:53:58 +02:00
Aaron Lauterer
a022e3fdab tree-wide trailing whitespace cleanup
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-09-25 16:55:53 +02:00
Thomas Lamprecht
96f00fd866 fix #503: print correct offline time for stop mode backups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-15 16:28:15 +02:00
Wolfgang Bumiller
f0f30448f9 fix #1779: vzdump: ensure guest-fsfreeze-thaw is called on error
as QMPClient's queue_execute can throw an error

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-05-23 11:18:28 +02:00
Dominik Csapak
a2fab11a46 fix #1570: fix template backup with pigz
when using pigz the resulting commandline would look like:

pigz -p 4>file

which resulted in pigz erroring out because it got no parameter for -p
(because the shell interpreted the 4>file as a file descriptor)

this patch adds a space so that the resulting line is
pigz -p 4 > file

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-12-06 14:54:00 +01:00
Dominik Csapak
1a988fd2e8 check if ga runs before a fsfreeze-freeze/thaw
since the guest-fsfreeze-freeze command has a timeout of 1 hour,
we want to check if the guest-agent even runs before executing that,
or else we wait 1 hour and then continue

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-11-10 11:20:55 +01:00
Emmanuel Kasper
76312b862b add description of read/writes statistics in vzdump output
since this statistics are note really described, sometimes users
miss that their slow backups are caused by slow reads
2017-05-03 09:14:50 +02:00
Emmanuel Kasper
0db93c2d8a Display volume size in log when doing a volume backup
Output before this patch
INFO: include disk 'scsi0' 'file=pve4tank:vm-402-disk-1'

Output after this patch:
INFO: include disk 'scsi0' 'file=pve4tank:vm-402-disk-1' 64G

we're mainly intersted by the volume size here, it was requested in #351
2016-12-22 10:25:13 +01:00
Stefan Priebe
e281273810 VZDump/QemuServer: set bless clas correctly
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2016-11-17 09:02:47 +01:00
Emmanuel Kasper
b53b958b34 Close #351: add more info to backup log
Before patch:
INFO: exclude disk 'scsi1' (backup=no)
INFO: skip unused drive 'local:401/vm-401-disk-3.raw' (not included into backup)
INFO: skip unused drive 'local:401/vm-401-disk-1.raw' (not included into backup)

After patch applied:
INFO: include disk 'scsi0' local:401/vm-401-disk-4.qcow2
INFO: exclude disk 'scsi1' local:401/vm-401-disk-2.raw (backup=no)
INFO: include disk 'scsi2' pve4tank:vm-401-disk-1
INFO: skip unused drive 'local:401/vm-401-disk-3.raw' (not included into backup)
INFO: skip unused drive 'local:401/vm-401-disk-1.raw' (not included into backup)
2016-10-20 11:44:08 +02:00
Wolfgang Link
85b84b7b01 fix #146 add name to backup log. 2016-06-28 06:41:35 +02:00
Fabian Grünbichler
391c2230d4 fix #987: don't detect pending changes as snapshots
when copying the VM configuration in vzdump. instead detect
them as pending changes and warn about them separately.
2016-05-10 10:35:59 +02:00
Thomas Lamprecht
04096e7bdd fix call to lock_config and config_file
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-03-09 18:08:26 +01:00
Fabian Grünbichler
ffda963f46 Refactor basic config-related methods
Drop load_config, write_config, lock_config[_xx],
check_lock, check_protection, is_template and config_file
in favour of implementions in PVE::AbstractConfig.

Implement guest_type, __config_max_unused_disks,
config_file_lock and cfs_config_path from
PVE::AbstractConfig in PVE::QemuConfig.
2016-03-08 11:41:59 +01:00
Wolfgang Bumiller
bea021ac3c Fix #879: exclusion of disk for backup
With the change to a property string the backup and iothread
properties were changed from type string to type boolean and
need to be treated as such.
2016-01-29 10:03:54 +01:00
Wolfgang Link
c05f7f3f40 firewall config will now include in the backup and write to vma file. 2015-11-26 11:23:14 +01:00
Thomas Lamprecht
663d664130 Fixed wrong UUID in Qemu VZDump backup
As the format of the uuid which the qemu monitor returned changed,
it is here adapted to fix errors with not matching uuids.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2015-07-30 11:31:19 +02:00
Alexandre Derumier
7d930a0e7e vzdump : abord backup if disk have iothread enabled.
Currently backup don't work with iothread feature, and crash qemu

For now, abord the backup if one of the vm drives have iothread enabled until backup code is fixed.

Upstream qemu backup cde already support iothread.
http://git.qemu.org/?p=qemu.git;a=commit;h=761731b1805f6ef64eb615e5b82a0801db3cde78

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-07-22 12:28:52 +02:00
Dietmar Maurer
874a096e0e white space cleanups 2014-12-10 06:40:21 +01:00
Wolfgang Link
ab6a9a0cd4 Add qga freeze in vzdump in snapshot mode
it will freeze the filesystem to provide consistents.

Signed-off-by: Wolfgang Link <wolfgang@linksystems.org>
2014-12-10 06:35:18 +01:00
Dietmar Maurer
c82935e92e fix bug #502: allow creation of empty vma archives 2014-04-14 11:21:01 +02:00
Dietmar Maurer
405b913a01 add better checks to test if backup was successful 2013-03-15 06:32:14 +01:00
Dietmar Maurer
60635a5733 vzdump: improve error reporting
And use kill(9) instead of kill(-9), which simply hangs
2013-02-28 10:47:55 +01:00
Dietmar Maurer
23b4120bc8 add offline backup for templates 2013-02-22 09:46:59 +01:00
Dietmar Maurer
1575bfccc5 fix backup parameters for pve-qemu-kvm 1.4-4
bump version to 2.3-11

depend on pve-qemu-kvm 1.4-4
2013-02-20 10:48:52 +01:00
Alexandre Derumier
daca220d29 vzdump : check if volid exist with volume_size_info
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-18 06:49:07 +01:00
Dietmar Maurer
19599cd903 cancel backup before stopping the vm
bump version ro 2.3-6
2013-01-16 13:24:16 +01:00
Dietmar Maurer
91bd6c909b include new qemu backup feature
We can still restore old tar files. But new backups always use new vma
format.

Also moved rescan code from qm into PVE::Qemuserver

bump version to 2.3-1
2012-12-13 12:49:52 +01:00
Dietmar Maurer
075b417acd vzdump: store drive in correct order (sort) to avoid confusion 2012-11-05 06:26:25 +01:00