]> git.proxmox.com Git - qemu-server.git/log
qemu-server.git
6 years agoAdd new qm command 'importovf', to create VMs from an OVF manifest
Emmanuel Kasper [Wed, 13 Sep 2017 14:10:26 +0000 (16:10 +0200)]
Add new qm command 'importovf', to create VMs from an OVF manifest

Currently the following extracted parameters are used to create a VM:
* VM name
* Memory
* Number of cores
* Disks

6 years agoRefactor defaut bootdisk and smbios1 uuid generation in own subs
Emmanuel Kasper [Wed, 13 Sep 2017 14:10:25 +0000 (16:10 +0200)]
Refactor defaut bootdisk and smbios1 uuid generation in own subs

This will allow code reuse for qm importovf

6 years agoAdd tests for parse_ovf function
Emmanuel Kasper [Wed, 13 Sep 2017 14:10:24 +0000 (16:10 +0200)]
Add tests for parse_ovf function

This includes:
 * a test script
 * the manifests generated by exports from a VmWare Workstation
 *  disk images are generated from qemu-img, with a 2KB size
(it is possible to inspect the disk images with od -bc
they contain a VMDK header and the rest are null characters)

6 years agoInitial support for importing OVF virtual machines
Emmanuel Kasper [Wed, 13 Sep 2017 14:10:23 +0000 (16:10 +0200)]
Initial support for importing OVF virtual machines

Following OVF parameters will be extracted:
 * VM name
 * Memory
 * Number of cores
 * disks and their associated controllers

6 years agoAdd a build dependency to libxml-libxml-perl, needed for OVF parsing
Emmanuel Kasper [Wed, 13 Sep 2017 14:10:22 +0000 (16:10 +0200)]
Add a build dependency to libxml-libxml-perl, needed for OVF parsing

XML::LibXML is being actively developed, and has 91 reverse
depencies in Debian Stretch, so it should not go away.

6 years agoForce overwriting existing compressed man pages and symbolic links
Emmanuel Kasper [Wed, 13 Sep 2017 14:10:21 +0000 (16:10 +0200)]
Force overwriting existing compressed man pages and symbolic links

This allows calling the 'make install' target twice in a row.

6 years agouse foreach_drive in foreach_storage_used_by_vm
Fabian Grünbichler [Mon, 15 May 2017 12:12:00 +0000 (14:12 +0200)]
use foreach_drive in foreach_storage_used_by_vm

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agoconfig: make vmstatestorage hotpluggable
Fabian Grünbichler [Mon, 15 May 2017 12:11:59 +0000 (14:11 +0200)]
config: make vmstatestorage hotpluggable

since this is just an option for PVE, and does not concern the VM at all.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agorename foreach_writable_storage to foreach_storage_used_by_vm
Fabian Grünbichler [Mon, 15 May 2017 12:11:58 +0000 (14:11 +0200)]
rename foreach_writable_storage to foreach_storage_used_by_vm

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agosnapshot: use explicitly configured vmstate storage
Fabian Grünbichler [Mon, 15 May 2017 12:11:57 +0000 (14:11 +0200)]
snapshot: use explicitly configured vmstate storage

and simplify storage loop

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agoconfig: add vmstatestorage option
Fabian Grünbichler [Mon, 15 May 2017 12:11:56 +0000 (14:11 +0200)]
config: add vmstatestorage option

and permission checks

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agoVM.Snapshot.Rollback privilege added
Matthias Urban [Wed, 13 Sep 2017 10:30:37 +0000 (12:30 +0200)]
VM.Snapshot.Rollback privilege added

VM.Snapshot.Rollback privilege added

Signed-off-by: Matthias Urban <matthias.urban@pure-systems.com>
6 years agodo not overwrite global signal handlers
Emmanuel Kasper [Thu, 14 Sep 2017 13:19:39 +0000 (15:19 +0200)]
do not overwrite global signal handlers

perls 'local' must be either used in front of each $SIG{...}
assignments or they must be put in a list, else it affects only the
first variable and the rest are *not* in local context.

In all cases the global signal handlers we overwrote were in cli programs or
forked workers, not in daemons.

6 years agomigration : enable mtunnel for insecure migration V2
Alexandre Derumier [Tue, 5 Sep 2017 09:46:17 +0000 (11:46 +0200)]
migration : enable mtunnel for insecure migration V2

We only use it to send commands faster like resume

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
6 years agoovmf: deprecate old legay ovmf image and refactor
Thomas Lamprecht [Mon, 11 Sep 2017 06:40:29 +0000 (08:40 +0200)]
ovmf: deprecate old legay ovmf image and refactor

this was only kept for PVE 4.X where the switch to the newer OVMF
image with actual working persisten EFIVARS was made.

We do not ship this old image in PVE 5.0 anymore so remove this
legacy code as it can never trigger anyhow.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agocreate_disks: refactor out and improve efidisk creation
Thomas Lamprecht [Mon, 11 Sep 2017 06:40:28 +0000 (08:40 +0200)]
create_disks: refactor out and improve efidisk creation

factor out code in a new create_efidisk submethod, as else this code
is hardly readable as the efidisk0 case is a special case. Refer from
putting all this specialised handling directly to the much shorter
code for all other cases.

Also the disk was created with a specific format and then a format
detection on the newly created disk was done, which is pretty
useless, clear that up.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agoefidisk: do not hard code efivar base image size
Thomas Lamprecht [Mon, 11 Sep 2017 06:40:27 +0000 (08:40 +0200)]
efidisk: do not hard code efivar base image size

The size of this image is not fixed, it increased to 528k in more
recent build of OVMF and could increase further (not likely, but
possible).

Instead of changing the hardcoded value move to a more generic
approach and read the size from the base image at creation time.

Use the new convert_size method and generalise the assignment of
size and volid between the efidisk and the normal case, as a part of
this change.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agoRemove unused variable declaration
Emmanuel Kasper [Thu, 27 Jul 2017 12:32:27 +0000 (14:32 +0200)]
Remove unused variable declaration

6 years agoFix #1441: Do not unplug controllers when the mirroring is finished
Emmanuel Kasper [Thu, 27 Jul 2017 12:32:26 +0000 (14:32 +0200)]
Fix #1441: Do not unplug controllers when the mirroring is finished

This should not be needed since we call 'block-job-complete' before
in qemu_drive_mirror_monitor(), and after benchmarking it does not
appear to be needed nor provide a measurable improvement when shutting
down the source.

6 years agorestore_vma_archive: do not overwrite global signal handlers
Thomas Lamprecht [Wed, 6 Sep 2017 11:29:07 +0000 (13:29 +0200)]
restore_vma_archive: do not overwrite global signal handlers

perls 'local' must be either used in front of each $SIG{...}
assignments or they must be put in a list, else it affects only the
first variable and the rest are *not* in local context.

This may cause weird behaviour where daemons seemingly do not get
terminating signals delivered correctly and thus may not shutdown
gracefully anymore.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agoAPI/clone: do not overwrite global signal handlers
Thomas Lamprecht [Wed, 6 Sep 2017 11:29:06 +0000 (13:29 +0200)]
API/clone: do not overwrite global signal handlers

perls 'local' must be either used in front of each $SIG{...}
assignments or they must be put in a list, else it affects only the
first variable and the rest are *not* in local context.

This may cause weird behaviour where daemons seemingly do not get
terminating signals delivered correctly and thus may not shutdown
gracefully anymore.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agoupdate_vm: sort logged parameters
Fabian Grünbichler [Wed, 6 Sep 2017 09:32:13 +0000 (11:32 +0200)]
update_vm: sort logged parameters

otherwise the (log) output looks really strange when mass-updating VMs, e.g.:
update VM 400001: -scsi1 somestore:64 -scsi0 somestore:64 -ide2 isostore:iso/somefile.iso,media=cdrom
update VM 400002: -ide2 isostore:iso/somefile.iso,media=cdrom -scsi1 somestore:64 -scsi0 somestore:64
update VM 400003: -scsi0 somestore:64 -ide2 isostore:iso/somefile.iso,media=cdrom -scsi1 somestore:64

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agoremove legacy sparsecp
Thomas Lamprecht [Wed, 14 Jun 2017 13:52:19 +0000 (15:52 +0200)]
remove legacy sparsecp

sparsecp gets only used in qmextract, which is part of the old backup
method (pre PVE 2.3).
Do not remove qmextract for now people could still have backups from
< PVE 2.3 around.
They could be restored manually, but we shouldn't make restoring
complicated. Thus replace sparsecp with `cp sparse=always`.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agoremove unused obsolete vmtar
Thomas Lamprecht [Wed, 14 Jun 2017 13:52:18 +0000 (15:52 +0200)]
remove unused obsolete vmtar

This was used by the pre-VMA backup methods, as the new backup
process was introduced in PVE 2.3 (04.03.2013) and this would be only
used for creating new backups it can be removed safely.

Fixes Debian stretch build on the ARM64 architecture.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agoFix #1125. Check for KVM support before starting VM
Philip Abernethy [Mon, 21 Aug 2017 09:47:18 +0000 (11:47 +0200)]
Fix #1125. Check for KVM support before starting VM

Moved the check to the beginning of the function.
VMs configured to use KVM won't start if KVM is not available.
VMs not configured to use KVM will start regardless.

6 years agoRefactors $nokvm to $kvm
Philip Abernethy [Mon, 21 Aug 2017 09:47:17 +0000 (11:47 +0200)]
Refactors $nokvm to $kvm

for improved readability and consistency with the option name.

6 years agoRefactor HyperV enlightenments
Philip Abernethy [Mon, 21 Aug 2017 09:47:16 +0000 (11:47 +0200)]
Refactor HyperV enlightenments

Fixes a typo in the function name and removes the $nokvm parameter, as it's only
used to immideately exit the function. Instead calling the function
conditionally.

6 years agobump version to 5.0-15
Wolfgang Bumiller [Mon, 7 Aug 2017 08:46:45 +0000 (10:46 +0200)]
bump version to 5.0-15

6 years agomigrate: reduce polling intervals
Fabian Grünbichler [Fri, 4 Aug 2017 12:54:07 +0000 (14:54 +0200)]
migrate: reduce polling intervals

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agomigrate: keep track of replication
Fabian Grünbichler [Fri, 4 Aug 2017 12:54:06 +0000 (14:54 +0200)]
migrate: keep track of replication

and only transfer state and switch direction if there
actually are any replicated volumes.

once we add support for live-migration with replicated
volumes, adding a set-replication-state command to the
tunnel and using that probably makes sense.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agomigrate: finish tunnel in phase 3
Fabian Grünbichler [Fri, 4 Aug 2017 12:54:05 +0000 (14:54 +0200)]
migrate: finish tunnel in phase 3

after resuming the VM over the tunnel.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agoqm mtunnel/migrate: add resume VMID command
Fabian Grünbichler [Fri, 4 Aug 2017 12:54:04 +0000 (14:54 +0200)]
qm mtunnel/migrate: add resume VMID command

and reformat the legacy SSH variant for readability.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agomtunnel: add and handle OK/ERR replies
Fabian Grünbichler [Fri, 4 Aug 2017 12:54:03 +0000 (14:54 +0200)]
mtunnel: add and handle OK/ERR replies

because we want commands to return meaningful errors, and
print them on the client/source side.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agoqm mtunnel: add write helper
Fabian Grünbichler [Fri, 4 Aug 2017 12:54:02 +0000 (14:54 +0200)]
qm mtunnel: add write helper

reduce code duplication.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agomigrate: read mtunnel version
Fabian Grünbichler [Fri, 4 Aug 2017 12:54:01 +0000 (14:54 +0200)]
migrate: read mtunnel version

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agoqm mtunnel: add tunnel version
Fabian Grünbichler [Fri, 4 Aug 2017 12:54:00 +0000 (14:54 +0200)]
qm mtunnel: add tunnel version

to allow detection of supported features/commands for these
and future mtunnel changes.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agomigrate: refactor mtunnel read/write
Fabian Grünbichler [Fri, 4 Aug 2017 12:53:59 +0000 (14:53 +0200)]
migrate: refactor mtunnel read/write

to make adding new commands and reading replies easier

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agomigrate: switch back to qm mtunnel
Fabian Grünbichler [Fri, 4 Aug 2017 12:53:58 +0000 (14:53 +0200)]
migrate: switch back to qm mtunnel

to allow adding guest specific commands to the tunnel

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agoFix freeze_needed
Wolfgang Link [Mon, 31 Jul 2017 06:13:27 +0000 (08:13 +0200)]
Fix freeze_needed

We want freeze the filesystem if the vmstate is not saved, because when we save the state we need not to freeze the filesystem.

6 years agobump version to 5.0-14
Wolfgang Bumiller [Mon, 17 Jul 2017 09:19:45 +0000 (11:19 +0200)]
bump version to 5.0-14

6 years agouse machine version in vga default type selection
Thomas Lamprecht [Wed, 12 Jul 2017 05:34:51 +0000 (07:34 +0200)]
use machine version in vga default type selection

If we get an VM machine older than 2.9 we use the old selection
expression for the VGA type. This allows to live migrate VMs to PVE
5.0 from beta 1 and PVE 4.4 again.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agofix disk throttling syntax
Dominik Csapak [Fri, 14 Jul 2017 12:36:16 +0000 (14:36 +0200)]
fix disk throttling syntax

the syntax was wrong, it was (e.g. for iops-write):

throttling.iops-write=-max100
instead of
throttling.iops-write-max=100

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 years agobump version to 5.0-13
Dietmar Maurer [Thu, 13 Jul 2017 04:49:12 +0000 (06:49 +0200)]
bump version to 5.0-13

6 years agoFix #1417: make sure the target storage allows disk images before importing
Emmanuel Kasper [Wed, 12 Jul 2017 15:53:35 +0000 (17:53 +0200)]
Fix #1417: make sure the target storage allows disk images before importing

This was fixed in c46366fd494c7dd0cd46bf133146e6f7a98e32a4
for 'qm create', but 'qm importdisk' has the same issue

6 years agobump version to 5.0-12
Dietmar Maurer [Mon, 3 Jul 2017 12:39:37 +0000 (14:39 +0200)]
bump version to 5.0-12

6 years agoUse default values when memory is not set in vm.conf when migrating
Emmanuel Kasper [Mon, 3 Jul 2017 11:58:14 +0000 (13:58 +0200)]
Use default values when memory is not set in vm.conf when migrating

This fixes a "Use of uninitialized value in multiplication (*) "
warning when doing a migration

6 years agobump version to 5.0-11
Wolfgang Bumiller [Fri, 30 Jun 2017 07:33:31 +0000 (09:33 +0200)]
bump version to 5.0-11

6 years agocleanup: more the new-disk regex deduplication
Wolfgang Bumiller [Fri, 30 Jun 2017 07:31:29 +0000 (09:31 +0200)]
cleanup: more the new-disk regex deduplication

6 years agofix #1417: check if storage has 'images' set in content
Dominik Csapak [Mon, 19 Jun 2017 11:54:49 +0000 (13:54 +0200)]
fix #1417: check if storage has 'images' set in content

otherwise, qm and the api ignore this setting completely when creating
a vm

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 years agobump version to 5.0-10
Dietmar Maurer [Wed, 28 Jun 2017 11:26:58 +0000 (13:26 +0200)]
bump version to 5.0-10

6 years agosnapshot-test.pm: ignore existing replication config
Dietmar Maurer [Wed, 28 Jun 2017 11:28:41 +0000 (13:28 +0200)]
snapshot-test.pm: ignore existing replication config

6 years agodon't use cirrus by default for sane OS'
Wolfgang Bumiller [Wed, 28 Jun 2017 08:48:03 +0000 (10:48 +0200)]
don't use cirrus by default for sane OS'

(It can stay for $winversion < 6 because then you probably
don't have drivers for anything else.)

this is long overdue

6 years agoRemove guest states to ensure no old states are exists
Wolfgang Link [Tue, 27 Jun 2017 13:12:03 +0000 (15:12 +0200)]
Remove guest states to ensure no old states are exists

6 years agoallow disks on shared storages on replicated VMs
Wolfgang Bumiller [Tue, 27 Jun 2017 13:00:06 +0000 (15:00 +0200)]
allow disks on shared storages on replicated VMs

6 years agorefuse to add non-replicatable disks to replicating VMs
Wolfgang Bumiller [Tue, 27 Jun 2017 07:42:55 +0000 (09:42 +0200)]
refuse to add non-replicatable disks to replicating VMs

Unless replication is explicitly disabled for them.

6 years agoAPI HA tasks: we request states not execute them
Thomas Lamprecht [Wed, 21 Jun 2017 05:20:11 +0000 (07:20 +0200)]
API HA tasks: we request states not execute them

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agoconfig: has_feature() take default for backup into account
Wolfgang Bumiller [Mon, 26 Jun 2017 14:05:30 +0000 (16:05 +0200)]
config: has_feature() take default for backup into account

6 years agobump version to 5.0-9
Dietmar Maurer [Fri, 23 Jun 2017 09:01:40 +0000 (11:01 +0200)]
bump version to 5.0-9

6 years agomigrate: use 'mtunnel' from pvecm
Thomas Lamprecht [Fri, 23 Jun 2017 07:47:06 +0000 (09:47 +0200)]
migrate: use 'mtunnel' from pvecm

qm mtunnel was deemed as deprecated but still in use here.
Switch over to pvecm's mtunnel to allow removing the qm variant in
PVE 5.1

Also use an absolute path so we do not depended on the targets
environment variables

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agobump version to 5.0-8
Dietmar Maurer [Thu, 22 Jun 2017 10:58:55 +0000 (12:58 +0200)]
bump version to 5.0-8

6 years agomigrate: pass the with_snapshots parameter
Wolfgang Bumiller [Thu, 22 Jun 2017 10:24:41 +0000 (12:24 +0200)]
migrate: pass the with_snapshots parameter

6 years agobump version to 5.0-7
Dietmar Maurer [Thu, 22 Jun 2017 06:52:17 +0000 (08:52 +0200)]
bump version to 5.0-7

6 years agoPVE::QemuMigrate. do not use JSON - not required here
Dietmar Maurer [Thu, 22 Jun 2017 06:51:38 +0000 (08:51 +0200)]
PVE::QemuMigrate. do not use JSON - not required here

6 years agoPVE/QemuMigrate.pm: use new replication job helpers from AbstractMigrate
Dietmar Maurer [Wed, 21 Jun 2017 10:27:45 +0000 (12:27 +0200)]
PVE/QemuMigrate.pm: use new replication job helpers from AbstractMigrate

6 years agoChange target in replication-state when replication direction is switched
Dietmar Maurer [Wed, 21 Jun 2017 08:59:45 +0000 (10:59 +0200)]
Change target in replication-state when replication direction is switched

6 years agoPVE/QemuMigrate.pm: use replication job, transfer replication state
Dietmar Maurer [Tue, 20 Jun 2017 08:58:40 +0000 (10:58 +0200)]
PVE/QemuMigrate.pm: use replication job, transfer replication state

6 years agoget_replicatable_volumes: move checks to top
Dietmar Maurer [Wed, 14 Jun 2017 05:23:01 +0000 (07:23 +0200)]
get_replicatable_volumes: move checks to top

those checks do not depend on anything we do in the sub, so we can do
them at the beginning.

Also respect the $noerr flag (do not raise exceptions in that case).

6 years agoadd regression tests for get_replicatable_volumes
Dietmar Maurer [Wed, 14 Jun 2017 05:02:43 +0000 (07:02 +0200)]
add regression tests for get_replicatable_volumes

6 years agoget_replicatable_volumes: fix CDROM and local file/device handling
Dietmar Maurer [Wed, 14 Jun 2017 05:01:36 +0000 (07:01 +0200)]
get_replicatable_volumes: fix CDROM and local file/device handling

6 years agouse the full package to call storage_config
Dominik Csapak [Tue, 13 Jun 2017 14:11:20 +0000 (16:11 +0200)]
use the full package to call storage_config

because it is not in the local scope

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 years agoPVE/QemuMigrate.pm: fix syntax errors
Dietmar Maurer [Tue, 13 Jun 2017 09:56:26 +0000 (11:56 +0200)]
PVE/QemuMigrate.pm: fix syntax errors

6 years agoget_replicatable_volumes: add unused volumes
Dietmar Maurer [Tue, 13 Jun 2017 09:51:14 +0000 (11:51 +0200)]
get_replicatable_volumes: add unused volumes

6 years agoget_replicatable_volumes: skip volumes if we do not 'own' them
Dietmar Maurer [Tue, 13 Jun 2017 07:55:36 +0000 (09:55 +0200)]
get_replicatable_volumes: skip volumes if we do not 'own' them

And add and additional check for vtype 'images'.

6 years agoPVE/QemuMigrate.pm - use PVE::QemuServer::foreach_volid
Dietmar Maurer [Tue, 13 Jun 2017 06:32:37 +0000 (08:32 +0200)]
PVE/QemuMigrate.pm - use PVE::QemuServer::foreach_volid

6 years agoPVE::QemuServer::foreach_volid - record snapshot references
Dietmar Maurer [Tue, 13 Jun 2017 06:24:20 +0000 (08:24 +0200)]
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.

6 years agoget_replicatable_volumes: use PVE::QemuServer::foreach_volid
Dietmar Maurer [Tue, 13 Jun 2017 04:58:58 +0000 (06:58 +0200)]
get_replicatable_volumes: use PVE::QemuServer::foreach_volid

6 years agoPVE::QemuServer::foreach_volid - pass $attr hash to callback
Dietmar Maurer [Tue, 13 Jun 2017 04:47:05 +0000 (06:47 +0200)]
PVE::QemuServer::foreach_volid - pass $attr hash to callback

That way we can pass more informations, i.e. the 'replicate' attribute.

6 years agoget_replicatable_volumes: skip volumes on shared storage
Dietmar Maurer [Tue, 13 Jun 2017 04:30:57 +0000 (06:30 +0200)]
get_replicatable_volumes: skip volumes on shared storage

6 years agoget_replicatable_volumes: add $vmid parameter
Dietmar Maurer [Tue, 13 Jun 2017 07:01:27 +0000 (09:01 +0200)]
get_replicatable_volumes: add $vmid parameter

6 years agoPVE/API2/Qemu.pm: cleanup - remove unused $upid parameter
Dietmar Maurer [Mon, 12 Jun 2017 09:09:47 +0000 (11:09 +0200)]
PVE/API2/Qemu.pm: cleanup - remove unused $upid parameter

6 years agoPVE/API2/Qemu.pm: aquire guest_migration_lock inside worker
Dietmar Maurer [Mon, 12 Jun 2017 09:05:46 +0000 (11:05 +0200)]
PVE/API2/Qemu.pm: aquire guest_migration_lock inside worker

6 years agoAdd a migration lock to avoid a replication on rollback-time.
Wolfgang Link [Mon, 12 Jun 2017 08:38:22 +0000 (10:38 +0200)]
Add a migration lock to avoid a replication on rollback-time.

6 years agobuild: remove fakeroot from dpkg-buildpackage
Fabian Grünbichler [Mon, 12 Jun 2017 08:00:25 +0000 (10:00 +0200)]
build: remove fakeroot from dpkg-buildpackage

6 years agofix typo in previous changelog
Fabian Grünbichler [Mon, 12 Jun 2017 07:50:22 +0000 (09:50 +0200)]
fix typo in previous changelog

6 years agobuild: add substition variables
Fabian Grünbichler [Mon, 12 Jun 2017 07:49:21 +0000 (09:49 +0200)]
build: add substition variables

6 years agobuild: reformat b-d and depends
Fabian Grünbichler [Mon, 12 Jun 2017 07:47:01 +0000 (09:47 +0200)]
build: reformat b-d and depends

6 years agobuild: make control static
Fabian Grünbichler [Mon, 12 Jun 2017 07:44:04 +0000 (09:44 +0200)]
build: make control static

6 years agochange from dpkg-deb to dpkg-buildpackage
Thomas Lamprecht [Fri, 9 Jun 2017 16:37:03 +0000 (18:37 +0200)]
change from dpkg-deb to dpkg-buildpackage

Add debian directory and move the respective files there and add
missing (rules, compat, docs).

Add a Source section to the control.in file and "build" (sed
control.in >control) in the $DEB target as done in most other
packages

Move the qm verifyapi check to the new "test" target, which gets
executed before the dh_auto_install target.

Remove the obsolete vzsyscalls.ph target, vzsyscalls.h is gone for a
while now

Cleanup "clean" target.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agoPVE::QemuConfig - implement $cleanup flag for get_replicatable_volumes
Dietmar Maurer [Mon, 12 Jun 2017 07:09:53 +0000 (09:09 +0200)]
PVE::QemuConfig - implement $cleanup flag for get_replicatable_volumes

6 years agofix #1405: sort pci ids by functions
Wolfgang Bumiller [Thu, 8 Jun 2017 07:18:25 +0000 (09:18 +0200)]
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.

6 years agomigrate: migration_type setting moved to pve-guest-common
Wolfgang Bumiller [Tue, 6 Jun 2017 08:03:59 +0000 (10:03 +0200)]
migrate: migration_type setting moved to pve-guest-common

6 years agoimport disk: add \n to die
Fabian Grünbichler [Thu, 1 Jun 2017 09:40:06 +0000 (11:40 +0200)]
import disk: add \n to die

6 years agoimport disk: downgrade hotplug failure to warning
Fabian Grünbichler [Thu, 1 Jun 2017 09:15:14 +0000 (11:15 +0200)]
import disk: downgrade hotplug failure to warning

6 years agoAdd new qm command 'importdisk' to import external disk images
Emmanuel Kasper [Thu, 1 Jun 2017 08:26:39 +0000 (10:26 +0200)]
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

6 years agoAdd ImportDisk module to import external disk images into a VM
Emmanuel Kasper [Thu, 1 Jun 2017 08:26:38 +0000 (10:26 +0200)]
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.

6 years agoRefactor the resolution of target disk format in own sub
Emmanuel Kasper [Thu, 1 Jun 2017 08:26:37 +0000 (10:26 +0200)]
Refactor the resolution of target disk format in own sub

This will allow use to reuse the code in ImportDisk.pm.

6 years agomigration: implement insecure offline migration
Wolfgang Bumiller [Tue, 30 May 2017 13:30:13 +0000 (15:30 +0200)]
migration: implement insecure offline migration

6 years agocheck also pending changes when reverting/deleting
Dominik Csapak [Mon, 29 May 2017 08:37:23 +0000 (10:37 +0200)]
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>
6 years agobump version to 5.0-6
Dietmar Maurer [Wed, 31 May 2017 07:21:50 +0000 (09:21 +0200)]
bump version to 5.0-6

6 years agofix burst length parameter names and pass them to qemu
Wolfgang Bumiller [Tue, 30 May 2017 13:30:15 +0000 (15:30 +0200)]
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).