5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-02-12 21:57:58 +03:00

1238 Commits

Author SHA1 Message Date
Dietmar Maurer
5009a8c755 PVE/QemuMigrate.pm: fix syntax errors 2017-06-13 11:56:26 +02:00
Dietmar Maurer
8299257eaf get_replicatable_volumes: add unused volumes 2017-06-13 11:51:14 +02:00
Dietmar Maurer
f7e7767fed get_replicatable_volumes: skip volumes if we do not 'own' them
And add and additional check for vtype 'images'.
2017-06-13 11:26:47 +02:00
Dietmar Maurer
aee6abe5ba PVE/QemuMigrate.pm - use PVE::QemuServer::foreach_volid 2017-06-13 11:26:47 +02:00
Dietmar Maurer
39019f75c7 PVE::QemuServer::foreach_volid - record snapshot references
So that we can test if a volume is referenced in the main config, and/or
inside a snapshot config.
2017-06-13 09:02:06 +02:00
Dietmar Maurer
f949eb7760 get_replicatable_volumes: use PVE::QemuServer::foreach_volid 2017-06-13 09:02:06 +02:00
Dietmar Maurer
392f8b5dff PVE::QemuServer::foreach_volid - pass $attr hash to callback
That way we can pass more informations, i.e. the 'replicate' attribute.
2017-06-13 09:02:06 +02:00
Dietmar Maurer
a722d4ffe0 get_replicatable_volumes: skip volumes on shared storage 2017-06-13 09:02:06 +02:00
Dietmar Maurer
c78f43b921 get_replicatable_volumes: add $vmid parameter 2017-06-13 09:02:06 +02:00
Dietmar Maurer
7c876ec165 PVE/API2/Qemu.pm: cleanup - remove unused $upid parameter 2017-06-12 11:09:47 +02:00
Dietmar Maurer
f53c6ad8b9 PVE/API2/Qemu.pm: aquire guest_migration_lock inside worker 2017-06-12 11:05:46 +02:00
Wolfgang Link
c068c1c3a9 Add a migration lock to avoid a replication on rollback-time. 2017-06-12 10:58:49 +02:00
Dietmar Maurer
e5857ca8a7 PVE::QemuConfig - implement $cleanup flag for get_replicatable_volumes 2017-06-12 09:52:22 +02:00
Wolfgang Bumiller
5ee3847149 fix #1405: sort pci ids by functions
QemuServer::lspci() iterates over /sys/bus/pci/devices which
doesn't guarantee any order which means functions sometimes
ended up in the wrong order and it was never clear which
one would get the additional options such as x-vga passed
to them.
2017-06-09 12:34:18 +02:00
Wolfgang Bumiller
ba5acf88a1 migrate: migration_type setting moved to pve-guest-common 2017-06-09 12:28:28 +02:00
Fabian Grünbichler
21463b9a04 import disk: add \n to die 2017-06-01 11:40:06 +02:00
Fabian Grünbichler
0f0aa6b71e import disk: downgrade hotplug failure to warning 2017-06-01 11:15:14 +02:00
Emmanuel Kasper
8653feebe6 Add new qm command 'importdisk' to import external disk images
The VM must be already existing, and the syntax is

qm importdisk 421 minix204.img pve4tank

where 421 is an already existing VM
2017-06-01 11:05:35 +02:00
Emmanuel Kasper
b94e047acb Add ImportDisk module to import external disk images into a VM
Each disk passed as paramater is add as 'unused[n]' in the vm.conf
(the default) or ide[n]|scsi[n]|sata[n]
We rely on qemu-img(1) convert heuristics to detect the file type,
as this works in most case.
2017-06-01 11:05:35 +02:00
Emmanuel Kasper
44549149af Refactor the resolution of target disk format in own sub
This will allow use to reuse the code in ImportDisk.pm.
2017-06-01 11:05:35 +02:00
Wolfgang Bumiller
f1c2a53aee migration: implement insecure offline migration 2017-06-01 10:50:28 +02:00
Dominik Csapak
af6d2db4b3 check also pending changes when reverting/deleting
otherwise we are not able to revert/delete pending changes which
introduce a new config line

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-05-31 11:40:14 +02:00
Wolfgang Bumiller
fb8e95a218 fix burst length parameter names and pass them to qemu
bps_max_length & friends were wrongly named and were only
passed to qemu when hot-applying changes. They can only
be passed via the command line with their new names. For
consistency let's rename them all, that way they're all in
one place.

Fixes #1195 (for real this time).
2017-05-31 08:10:27 +02:00
Wolfgang Bumiller
911524414e fix #1229: more explicit spice port allocation
We cannot look for ports on "any" wildcard address while
letting qemu bind to "localhost", this may lead to a qemu
process occupying ::1 while the next search successfully
finds the same port available for IPv4's '*' address.

Instead, we now lookup the IP of the desired family for
'localhost'. Note that while we could simply be hardcoding
::1 or 127.0.0.1, with this code we are protocol agnostic.
2017-05-31 08:07:34 +02:00
Dietmar Maurer
95f42d61fa migrate: aquire guest_migration_lock during migration
To block replication jobs.
2017-05-31 07:57:03 +02:00
Dietmar Maurer
628bb7f231 do not allow destroy if there are replication jobs 2017-05-31 07:53:58 +02:00
Dietmar Maurer
3ab7663a91 remove 'replicate' configuration - we will store that in another file 2017-05-31 07:53:57 +02:00
Thomas Lamprecht
6318daca96 improve error on '{full, linked} clone not available' error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-05-24 11:29:26 +02:00
Fabian Grünbichler
df58868200 print_cpu_device: remove unused variable 2017-05-23 14:23:52 +02:00
Tobias Böhm
7032e08c85 Fix #1384: add missing decrement to calculation of socket-id
For calculation of "current_core" the input variable id is decremented.
For calculation of "current_socket" this decrement was missing resulting
in a wrong value when "cores" is set to 1.

Signed-off-by: Tobias Böhm <tb@robhost.de>
2017-05-23 14:21:55 +02:00
Wolfgang Bumiller
7126e1c9bb migrate: pass ssh_info to storage_migrate 2017-05-23 09:57:17 +02:00
Dominik Csapak
dd32a4664f use ReuseAddr for vncproxy
to avoid "Socket already in use" errors, when quickly opening/closing
console sessions on the webinterface

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-05-17 13:38:54 +02:00
Wolfgang Bumiller
175b51fdb5 Fix #1361: create disk: stricter parsing of storage:size
This fixes paths such as
/dev/disk/by-id/some-ID:0.5
being interpreted as a request to create a 0.5G-sized disk
in the storage named '/dev/disk/by-id/some-ID'.
2017-05-10 10:31:25 +02:00
Dietmar Maurer
3aa44d3b57 move get_replicatable_volumes from QemuServer.pm to QemuConfig.pm 2017-05-06 17:13:31 +02:00
Dietmar Maurer
64932aebff PVE::QemuServer::create_disks - run code inside eval
So that we can free allocated volumes ins something fails.

Thi bug was introduced with commit ae57f6b352242fed69da851f15f976095d290833
2017-05-06 17:00:20 +02:00
Dietmar Maurer
0342b45bee get_replicatable_volumes: replacemnet for PVE::ReplicationTools::get_syncable_guestdisks()
correctly scan for volumes inside snapshots.

This will also solve the cyclic package dependency propblem.
2017-05-06 15:11:46 +02:00
Dietmar Maurer
8557d01f75 rename drive 'replica' property to 'replicate' 2017-05-06 10:46:21 +02:00
Dietmar Maurer
46883f80f6 Revert "Integrate replica in the qemu migration."
This reverts commit 63d02c707429efcd509ddb14d3fd560cfcf4979e.

The commit changes the configuration before the VM is actually
migrated, so it is possible to have a wrong configuration when
migration fails for some reason. Also, I am quite unsure if
this automatic target change is really wanted. The patch also
contains wrong refereces to $self->{opts}->{node}.
2017-05-06 10:39:43 +02:00
Dietmar Maurer
b1c12185fb Revert "migrate: cleanup replica volume skip condition"
This reverts commit 6e8044dcea4187d076f637b9e5d3e153d080087f.
2017-05-06 10:38:06 +02:00
Dietmar Maurer
2286cb8c23 use a single replicate property (format pve-replicate) 2017-05-06 10:35:08 +02: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
Dominik Csapak
2c7fc94783 start vncproxy worker in the background
this allows it to use the vncproxy api call to use from pvesh,
because before we waited until the task finished to get the vncticket
which was too late

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-05-03 08:35:03 +02:00
Wolfgang Bumiller
6d449202ba api: replica: safer config update
Configuration updates should only happen if and after their
change has successfully taken effect.
2017-04-28 10:40:22 +02:00
Wolfgang Bumiller
6e8044dcea migrate: cleanup replica volume skip condition 2017-04-28 10:34:46 +02:00
Wolfgang Bumiller
1849c59288 whitespace fixup 2017-04-28 10:14:26 +02:00
Wolfgang Link
9b49ba658f Destroy all remote and local replication datasets when a VM will destroyed. 2017-04-28 10:11:33 +02:00
Wolfgang Link
63d02c7074 Integrate replica in the qemu migration.
Now it is possible to migrate a VM offline when replica is enabled.
It will reduce replication to an minimal amount.
2017-04-28 10:11:33 +02:00
Wolfgang Link
9edac22f5f Insert new properties in the Qemu config for the PVE Replica.
This patch will include all necessary properties for the replication.
Also will it enable and disable a replication job
when appointed flags are set or deleted.
2017-04-28 10:11:33 +02:00
Alexandre Derumier
6e9d255038 add rerror for all drives
it was missing for scsi, and it's supported for all kind of drive

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-04-28 10:02:38 +02:00
Alexandre Derumier
d80ad67f9d live storage migration : fix check of target storage availability
if we define a different target storeid for remote node,
and that storage is not available on source node

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-04-21 12:05:36 +02:00