]> git.proxmox.com Git - qemu-server.git/log
qemu-server.git
10 years agoupdate_vm_async: new asynchronous API
Dietmar Maurer [Fri, 7 Jun 2013 09:41:58 +0000 (11:41 +0200)]
update_vm_async: new asynchronous API

10 years agosnapshot rollback: use pc-i440fx-1.4 as default
Dietmar Maurer [Thu, 6 Jun 2013 04:38:12 +0000 (06:38 +0200)]
snapshot rollback: use pc-i440fx-1.4 as default

10 years agorequire VM.Config.HWType priviledges to modify 'machine' configuration
Dietmar Maurer [Thu, 6 Jun 2013 04:22:32 +0000 (06:22 +0200)]
require VM.Config.HWType priviledges to modify 'machine' configuration

10 years agobump version to 3.0-19
Dietmar Maurer [Wed, 5 Jun 2013 08:28:08 +0000 (10:28 +0200)]
bump version to 3.0-19

10 years agomigrate: pass --machine parameter to remote 'qm start' command
Dietmar Maurer [Wed, 5 Jun 2013 08:24:39 +0000 (10:24 +0200)]
migrate: pass --machine parameter to remote 'qm start' command

10 years agosnapshot: save/restore 'machine' configuration
Dietmar Maurer [Wed, 5 Jun 2013 08:17:49 +0000 (10:17 +0200)]
snapshot: save/restore 'machine' configuration

10 years agoimplement get_current_qemu_machine
Dietmar Maurer [Wed, 5 Jun 2013 07:52:22 +0000 (09:52 +0200)]
implement get_current_qemu_machine

10 years agoAPI extension: add 'machine' parameter to vm_start
Dietmar Maurer [Wed, 5 Jun 2013 07:27:31 +0000 (09:27 +0200)]
API extension: add 'machine' parameter to vm_start

This allows us to overwrite the machine type at start - useful for
migration to make sure we use the same machine at the target node.

10 years agoadd new 'machine' configuration
Dietmar Maurer [Wed, 5 Jun 2013 07:18:23 +0000 (09:18 +0200)]
add new 'machine' configuration

10 years agofix typo
Dietmar Maurer [Tue, 4 Jun 2013 11:33:35 +0000 (13:33 +0200)]
fix typo

10 years agoqemu_drive_mirror: correctly call block-job-cancel if block-job-complete fails
Dietmar Maurer [Fri, 31 May 2013 09:31:22 +0000 (11:31 +0200)]
qemu_drive_mirror: correctly call block-job-cancel if block-job-complete fails

10 years agobump version to 3.0-18
Dietmar Maurer [Fri, 31 May 2013 08:57:59 +0000 (10:57 +0200)]
bump version to 3.0-18

10 years agomove_disk: implement delete flag
Dietmar Maurer [Fri, 31 May 2013 08:56:16 +0000 (10:56 +0200)]
move_disk: implement delete flag

10 years agorename move to move_disk
Dietmar Maurer [Fri, 31 May 2013 06:46:21 +0000 (08:46 +0200)]
rename move to move_disk

Because that API call can only move a single disk (not the whole VM).

10 years agobump version to 3.0-17
Dietmar Maurer [Wed, 29 May 2013 11:01:45 +0000 (13:01 +0200)]
bump version to 3.0-17

10 years agoclone_disk: test if requested format is supported - else use default
Dietmar Maurer [Wed, 29 May 2013 10:59:21 +0000 (12:59 +0200)]
clone_disk: test if requested format is supported - else use default

10 years agomove_vm: add original disk as unusedX
Dietmar Maurer [Wed, 29 May 2013 10:15:30 +0000 (12:15 +0200)]
move_vm: add original disk as unusedX

10 years agomove_vm: make it work with PVE::QemuServer:::clone_disk
Dietmar Maurer [Wed, 29 May 2013 10:07:56 +0000 (12:07 +0200)]
move_vm: make it work with PVE::QemuServer:::clone_disk

- use POST instead of PUT (this is not idempotent).
- return task ID
- use declarative permission check

10 years agoadd qm move (storage migration)
Alexandre Derumier [Mon, 27 May 2013 04:22:05 +0000 (06:22 +0200)]
add qm move (storage migration)

qm move <vmid> <disk> <storage> --format [raw|qcow2|vmdk]

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
10 years agoallow to clone VM when name is not set
Dietmar Maurer [Wed, 29 May 2013 09:18:54 +0000 (11:18 +0200)]
allow to clone VM when name is not set

10 years agofactor out clone_disk
Dietmar Maurer [Wed, 29 May 2013 06:32:10 +0000 (08:32 +0200)]
factor out clone_disk

As suggested by Alexandre. Also cleanup  qemu_drive_mirror (fix white space).

10 years agobump version to 3.0-16
Dietmar Maurer [Tue, 28 May 2013 10:24:13 +0000 (12:24 +0200)]
bump version to 3.0-16

10 years agoqm rescan: do not add aliases as unused disks.
Dietmar Maurer [Tue, 28 May 2013 10:21:14 +0000 (12:21 +0200)]
qm rescan: do not add aliases as unused disks.

10 years agofix unused disk handling
Dietmar Maurer [Tue, 28 May 2013 10:02:29 +0000 (12:02 +0200)]
fix unused disk handling

Show unused disks even if disk is used inside snapshots. But do not allow
to remove those disks.

10 years agorescan: add check if config has really changed
Dietmar Maurer [Mon, 27 May 2013 07:30:40 +0000 (09:30 +0200)]
rescan: add check if config has really changed

10 years agofix bug 395: correctly handle unused disk with storage alias
Dietmar Maurer [Mon, 27 May 2013 06:25:39 +0000 (08:25 +0200)]
fix bug 395: correctly handle unused disk with storage alias

10 years agobump version to 3.0-15
Dietmar Maurer [Thu, 23 May 2013 09:34:09 +0000 (11:34 +0200)]
bump version to 3.0-15

10 years agoqemu_img_format : use raw for as default for other storage (nexenta, sheepdog, ...)
Alexandre Derumier [Thu, 23 May 2013 09:11:59 +0000 (11:11 +0200)]
qemu_img_format : use raw for as default for other storage (nexenta, sheepdog, ...)

Seem that something have change in qemu.

iscsi qemu block driver need to use raw, or we get a segfault. (like rbd).

sheepdog works also with .raw, so we don't need anymore specific storage format, we can use raw.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
10 years agobump version to 3.0-14
Dietmar Maurer [Wed, 22 May 2013 05:17:53 +0000 (07:17 +0200)]
bump version to 3.0-14

10 years agofix bug #389: avoid error if balloon is undefined
Dietmar Maurer [Wed, 22 May 2013 05:15:44 +0000 (07:15 +0200)]
fix bug #389: avoid error if balloon is undefined

10 years agobump version to 3.0-13
Dietmar Maurer [Tue, 21 May 2013 10:04:18 +0000 (12:04 +0200)]
bump version to 3.0-13

10 years agofix bug #391 - restore: test if requested format is supported
Dietmar Maurer [Tue, 21 May 2013 10:02:41 +0000 (12:02 +0200)]
fix bug #391 - restore: test if requested format is supported

11 years agobump version to 3.0-12
Dietmar Maurer [Tue, 14 May 2013 10:02:49 +0000 (12:02 +0200)]
bump version to 3.0-12

11 years agouse add_vm_to_pool/remove_vm_from_pool from PVE::AccessControl
Dietmar Maurer [Tue, 14 May 2013 10:01:57 +0000 (12:01 +0200)]
use add_vm_to_pool/remove_vm_from_pool from PVE::AccessControl

11 years agobump version to 3.0-11
Dietmar Maurer [Tue, 14 May 2013 08:18:35 +0000 (10:18 +0200)]
bump version to 3.0-11

11 years agoclone disk : keep source volume params
Alexandre Derumier [Tue, 14 May 2013 07:24:15 +0000 (09:24 +0200)]
clone disk : keep source volume params

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoclone: check is we can clone to target storage
Dietmar Maurer [Mon, 13 May 2013 09:16:21 +0000 (11:16 +0200)]
clone: check is we can clone to target storage

11 years agobump version to 3.0-10
Dietmar Maurer [Mon, 13 May 2013 05:32:56 +0000 (07:32 +0200)]
bump version to 3.0-10

11 years agofix bug #381: use PVE::Tools::next_migrate_port()
Dietmar Maurer [Mon, 13 May 2013 05:30:50 +0000 (07:30 +0200)]
fix bug #381: use PVE::Tools::next_migrate_port()

11 years agobump version to 3.0-9
Dietmar Maurer [Wed, 8 May 2013 08:24:13 +0000 (10:24 +0200)]
bump version to 3.0-9

11 years agorestore: do not restore template flag
Dietmar Maurer [Wed, 8 May 2013 08:19:38 +0000 (10:19 +0200)]
restore: do not restore template flag

A restored VM is never a template. Else we would need to create
base images after the restore, and not all storages supports base
images. Anyways, the user can easily convert the restored VM into a
template later.

11 years agobump version to 3.0-8
Dietmar Maurer [Tue, 7 May 2013 08:20:29 +0000 (10:20 +0200)]
bump version to 3.0-8

11 years agoqemu_img_format: use 'raw' for lvm
Dietmar Maurer [Tue, 7 May 2013 08:15:57 +0000 (10:15 +0200)]
qemu_img_format: use 'raw' for lvm

With host_device we get the following error:

qemu-img: error while writing sector 0: Bad file descriptor

11 years agodrive-mirror : die if stats are empty.
Alexandre Derumier [Mon, 6 May 2013 09:21:01 +0000 (11:21 +0200)]
drive-mirror : die if stats are empty.

If drive have bad sectors, the block job die.
we need to die if stats are empty to avoid this:

transferred: 21440086016 bytes remaining: 34668544 bytes total: 21474754560 bytes progression: 99.84 %
Use of uninitialized value $transferred in subtraction (-) at /usr/share/perl5/PVE/QemuServer.pm line 4611.
Use of uninitialized value $total in subtraction (-) at /usr/share/perl5/PVE/QemuServer.pm line 4611.
Use of uninitialized value $transferred in multiplication (*) at /usr/share/perl5/PVE/QemuServer.pm line 4612.
Use of uninitialized value $total in division (/) at /usr/share/perl5/PVE/QemuServer.pm line 4612.
clone failed: mirroring error: Illegal division by zero at /usr/share/perl5/PVE/QemuServer.pm line 4612.

Maybe it should be improved by catching qmp events, but doesn't seem to work for now

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoset long timeout for query-block-jobs
Dietmar Maurer [Mon, 6 May 2013 07:25:39 +0000 (09:25 +0200)]
set long timeout for query-block-jobs

Like we do for other block job query commands. Seems those commands
can hangs for some time.

11 years agobump version to 3.0-7
Dietmar Maurer [Mon, 6 May 2013 06:58:55 +0000 (08:58 +0200)]
bump version to 3.0-7

11 years agohas_features: also return a list of allowed nodes
Dietmar Maurer [Mon, 6 May 2013 06:56:17 +0000 (08:56 +0200)]
has_features: also return a list of allowed nodes

This is useful if a feature is restricted to a limited set of nodes.

11 years agohas_feature: add 'copy' to enum
Dietmar Maurer [Fri, 3 May 2013 10:30:43 +0000 (12:30 +0200)]
has_feature: add 'copy' to enum

11 years agocreate template: fix permission check
Dietmar Maurer [Fri, 3 May 2013 07:10:39 +0000 (09:10 +0200)]
create template: fix permission check

This function only works if the VM already exists. But pool permissions
are automatically inherited on existing VMs, so there is no need
to explicitly check pool permissions.

11 years agoclone: correctly add VM to pool
Dietmar Maurer [Fri, 3 May 2013 07:07:53 +0000 (09:07 +0200)]
clone: correctly add VM to pool

11 years agofix typo, whitespace cleanups
Dietmar Maurer [Fri, 3 May 2013 06:39:41 +0000 (08:39 +0200)]
fix typo, whitespace cleanups

11 years agovm_clone : add running vm drive mirror
Alexandre Derumier [Thu, 2 May 2013 16:18:04 +0000 (18:18 +0200)]
vm_clone : add running vm drive mirror

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoadd qemu_drive_mirror
Alexandre Derumier [Thu, 2 May 2013 16:18:03 +0000 (18:18 +0200)]
add qemu_drive_mirror

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agobump version to 3.0-6
Dietmar Maurer [Fri, 3 May 2013 05:54:05 +0000 (07:54 +0200)]
bump version to 3.0-6

11 years agorestore: allow to overwrite existing VMs if user has VM.Backup permissions
Dietmar Maurer [Fri, 3 May 2013 05:47:08 +0000 (07:47 +0200)]
restore: allow to overwrite existing VMs if user has VM.Backup permissions

The requirement to have VM.Allocate it non-obvious and confusing
if the VM already exists. If the user can backup, he should also be able
to restore that backup.

11 years agoremane copy to clone
Dietmar Maurer [Thu, 2 May 2013 09:42:22 +0000 (11:42 +0200)]
remane copy to clone

11 years agocheck has_feature copy for full clone
Dietmar Maurer [Thu, 2 May 2013 05:17:15 +0000 (07:17 +0200)]
check has_feature copy for full clone

11 years agocopy_vm: re-structure code to allow more checks before fork
Dietmar Maurer [Thu, 2 May 2013 05:10:46 +0000 (07:10 +0200)]
copy_vm: re-structure code to allow more checks before fork

11 years agofix : signal interrupt don't delete volume on full copy
Alexandre Derumier [Thu, 2 May 2013 04:43:37 +0000 (06:43 +0200)]
fix : signal interrupt don't delete volume on full copy

Currently we  push newvolid to newvollist after qemu-img convert,
so if signal interrupt occur during qemu-img convert, the newvollist is empty and we can't free the volume

Instead, We need to push newvolid to newvollist just after volume creation

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agofix "Use of uninitialized value $target"
Alexandre Derumier [Thu, 2 May 2013 04:33:45 +0000 (06:33 +0200)]
fix "Use of uninitialized value $target"

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agowhite-space cleanups
Dietmar Maurer [Tue, 30 Apr 2013 09:46:38 +0000 (11:46 +0200)]
white-space cleanups

11 years agocopy_vm: new option to move final VM to other node (option target)
Dietmar Maurer [Tue, 30 Apr 2013 09:44:39 +0000 (11:44 +0200)]
copy_vm: new option to move final VM to other node (option target)

This only works if the VM is on shared storage.

11 years agovm_copy : add optional format parameter
Alexandre Derumier [Tue, 30 Apr 2013 08:34:08 +0000 (10:34 +0200)]
vm_copy : add optional format parameter

can be qcow2,raw,vmdk

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agocopy_vm: add name and description option
Dietmar Maurer [Tue, 30 Apr 2013 07:54:34 +0000 (09:54 +0200)]
copy_vm: add name and description option

11 years agocopy_vm: allow to copy from snapshot
Dietmar Maurer [Tue, 30 Apr 2013 07:31:23 +0000 (09:31 +0200)]
copy_vm: allow to copy from snapshot

11 years agocopy_vm: use exclusive lock for running VM
Dietmar Maurer [Tue, 30 Apr 2013 05:40:43 +0000 (07:40 +0200)]
copy_vm: use exclusive lock for running VM

Because we can only run one block job to copy data.

11 years agocopy_vm : add optional storage parameter
Alexandre Derumier [Tue, 30 Apr 2013 05:08:27 +0000 (07:08 +0200)]
copy_vm : add optional storage parameter

Optionnal target storage for full copy

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agodon't send qmp balloon commands if vm is started with a state file
Alexandre Derumier [Mon, 29 Apr 2013 12:13:57 +0000 (14:13 +0200)]
don't send qmp balloon commands if vm is started with a state file

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoparse_drive : return correct format
Alexandre Derumier [Tue, 30 Apr 2013 04:17:50 +0000 (06:17 +0200)]
parse_drive : return correct format

Currently format is always empty, we need to parse file extension

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agovm_copy : fix typo in description
Alexandre Derumier [Tue, 30 Apr 2013 04:17:49 +0000 (06:17 +0200)]
vm_copy : fix typo in description

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoimplement copy_vm
Dietmar Maurer [Mon, 29 Apr 2013 08:42:35 +0000 (10:42 +0200)]
implement copy_vm

This is based on patches from Alexandre Derumier <aderumier@odiso.com>.

It just implements copy/clone for stopped VMs and Templates. Copying
running VMs or copy from snapshots is not implemented.

11 years agoadd qemu_img_convert
Alexandre Derumier [Mon, 29 Apr 2013 06:41:01 +0000 (08:41 +0200)]
add qemu_img_convert

also work with snapshot as source for qcow2,rbd,sheepdog.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoimplement shared file locks
Dietmar Maurer [Mon, 29 Apr 2013 07:30:15 +0000 (09:30 +0200)]
implement shared file locks

and add a first prototype for copy_vm

11 years agobump version to 3.0-4
Dietmar Maurer [Wed, 24 Apr 2013 06:00:13 +0000 (08:00 +0200)]
bump version to 3.0-4

11 years agouse correct package prefix
Dietmar Maurer [Mon, 22 Apr 2013 08:57:24 +0000 (10:57 +0200)]
use correct package prefix

11 years agofix assertion
Dietmar Maurer [Mon, 22 Apr 2013 07:43:54 +0000 (09:43 +0200)]
fix assertion

11 years agomove assertion so that we have all checks at the same place.
Dietmar Maurer [Mon, 22 Apr 2013 05:10:58 +0000 (07:10 +0200)]
move assertion so that we have all checks at the same place.

11 years agoset template flag earlier
Dietmar Maurer [Mon, 22 Apr 2013 05:08:51 +0000 (07:08 +0200)]
set template flag earlier

11 years agodo not allow template creation if there are snapshots.
Dietmar Maurer [Mon, 22 Apr 2013 05:05:54 +0000 (07:05 +0200)]
do not allow template creation if there are snapshots.

11 years agofix wrong comment
Dietmar Maurer [Mon, 22 Apr 2013 05:02:10 +0000 (07:02 +0200)]
fix wrong comment

11 years agotemplate_create : add template:1 option.
Alexandre Derumier [Thu, 18 Apr 2013 15:05:31 +0000 (17:05 +0200)]
template_create : add template:1 option.

Also allow template create of non base-xxx renamable storage

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agouse vm create permissions for templates
Stefan Priebe [Fri, 19 Apr 2013 06:37:32 +0000 (08:37 +0200)]
use vm create permissions for templates

Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
11 years agofix bug 377: make qm rescan work properly
Dietmar Maurer [Fri, 19 Apr 2013 08:45:46 +0000 (10:45 +0200)]
fix bug 377: make qm rescan work properly

11 years agois_template : return 1 if template option == 1
Alexandre Derumier [Thu, 18 Apr 2013 15:05:30 +0000 (17:05 +0200)]
is_template : return 1 if template option == 1

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoadd template config option
Alexandre Derumier [Thu, 18 Apr 2013 15:05:29 +0000 (17:05 +0200)]
add template config option

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoavoid endless loop in QMPClient
Dietmar Maurer [Thu, 18 Apr 2013 08:34:44 +0000 (10:34 +0200)]
avoid endless loop in QMPClient

11 years agodo not delete unmatched content from $$input
Dietmar Maurer [Thu, 18 Apr 2013 06:26:23 +0000 (08:26 +0200)]
do not delete unmatched content from $$input

11 years agobump version to 3.0-3
Dietmar Maurer [Thu, 18 Apr 2013 04:22:19 +0000 (06:22 +0200)]
bump version to 3.0-3

11 years agoallow sparse restore for sheepdog and rbd
Dietmar Maurer [Thu, 18 Apr 2013 04:14:50 +0000 (06:14 +0200)]
allow sparse restore for sheepdog and rbd

11 years agobump version to 3.0-2
Dietmar Maurer [Fri, 22 Mar 2013 05:25:26 +0000 (06:25 +0100)]
bump version to 3.0-2

11 years agoparse_net: fix warning about uninitialized value
Dietmar Maurer [Fri, 22 Mar 2013 05:23:22 +0000 (06:23 +0100)]
parse_net: fix warning about uninitialized value

11 years agoadd better checks to test if backup was successful
Dietmar Maurer [Tue, 12 Mar 2013 07:50:02 +0000 (08:50 +0100)]
add better checks to test if backup was successful

11 years agovirtio disk hot-unplug: drive_del after device_del
Alexandre Derumier [Wed, 6 Mar 2013 15:22:43 +0000 (16:22 +0100)]
virtio disk hot-unplug: drive_del after device_del

we need to remove drive after device has correctly by remove.

With this patch:

Windows : if drive is locked/"mounted", the hot-unplug fail and disk is accessible (100% safe)

Linux: without hotplug module : the hot-unplug fail and disk is accessible (100% safe)

Linux : with hotplug module : the hot-unplug work, but no verification is done is the drive is mounted

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agonic hot-unplug: delete netdev after device removal
Alexandre Derumier [Wed, 6 Mar 2013 14:48:59 +0000 (15:48 +0100)]
nic hot-unplug: delete netdev after device removal

Currently we delete netdev before acpi hot-unplug.

if guest don't support hotplug, this break network.

We need to remove netdev after the device had be correctly unplug.(we check that device has been correctly removed)
So, If guest don't support hotplug, It's simply thrown a unplug error message without breaking the network

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agodynamic bridge rate/vlan change on nic update
Alexandre Derumier [Tue, 5 Mar 2013 09:22:18 +0000 (10:22 +0100)]
dynamic bridge rate/vlan change on nic update

if model change : we try to unplug like before
if bridge/nat change : we try to unplug like before

else if bridge, but rate/vlan/bridge change, we dynamicly change them without need hotplug

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agopve-bridge : move tap_plug code in PVE::Network::tap_plug
Alexandre Derumier [Tue, 5 Mar 2013 09:22:17 +0000 (10:22 +0100)]
pve-bridge : move tap_plug code in PVE::Network::tap_plug

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agopve-bridge : move tap creation code in PVE::Network::tap_create
Alexandre Derumier [Tue, 5 Mar 2013 09:22:16 +0000 (10:22 +0100)]
pve-bridge : move tap creation code in PVE::Network::tap_create

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agopve-bridge : move rate limit code to PVE::Network:tap_rate_limit
Alexandre Derumier [Tue, 5 Mar 2013 09:22:15 +0000 (10:22 +0100)]
pve-bridge : move rate limit code to PVE::Network:tap_rate_limit

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agostart 3.0 development
Dietmar Maurer [Tue, 5 Mar 2013 10:40:03 +0000 (11:40 +0100)]
start 3.0 development

bump version to 3.0-1

11 years agofix backup-cancel timeout
Dietmar Maurer [Fri, 1 Mar 2013 09:57:15 +0000 (10:57 +0100)]
fix backup-cancel timeout