]> git.proxmox.com Git - qemu-server.git/log
qemu-server.git
10 years agoadd +sep cpuflags to kvm32 && kvm64 cpu models
Alexandre Derumier [Mon, 15 Jul 2013 06:51:36 +0000 (08:51 +0200)]
add +sep cpuflags to kvm32 && kvm64 cpu models

Need for win8 boot.

This flag was missing from rhel < 6.4 host kernel. It's ok now.
But it's also missing from kvm64 model. (It's exist in other cpu models, amd or intel).
So it's pretty safe to enable it.
If the host kernel is older, qemu filter the flag.

This also improve performance of winxp && win7 32 bits guests.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
10 years agoenable x2apic by default for kvm machines
Alexandre Derumier [Mon, 15 Jul 2013 06:51:35 +0000 (08:51 +0200)]
enable x2apic by default for kvm machines

This reduce context switch with multicore guests.

Even if the host cpu don't have x2apic, it's working because qemu have an virtual x2apic implementation for guest.
We need  in-kernel irqchip support for this, which is enable for kvm guest since qemu 1.3.
(I don't enable it if nokvm param is set)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
10 years agospiceproxy: set delete-this-file
Dietmar Maurer [Thu, 27 Jun 2013 07:28:13 +0000 (09:28 +0200)]
spiceproxy: set delete-this-file

10 years agospiceconfig: port can't be 0
Alexandre Derumier [Wed, 26 Jun 2013 14:24:42 +0000 (16:24 +0200)]
spiceconfig: port can't be 0

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
10 years agospice : fix proxy address
Alexandre Derumier [Wed, 26 Jun 2013 14:08:08 +0000 (16:08 +0200)]
spice : fix proxy address

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
10 years agovm status API: return info about spice
Dietmar Maurer [Wed, 26 Jun 2013 11:37:14 +0000 (13:37 +0200)]
vm status API: return info about spice

10 years agobump version to 3.0-21
Dietmar Maurer [Wed, 26 Jun 2013 11:16:19 +0000 (13:16 +0200)]
bump version to 3.0-21

10 years agospiceproxy: remove socat, and return data to access the new spiceproxy server
Dietmar Maurer [Wed, 26 Jun 2013 11:13:58 +0000 (13:13 +0200)]
spiceproxy: remove socat, and return data to access the new spiceproxy server

10 years agokill socat if we do not get any connection within $timeout seconds
Dietmar Maurer [Tue, 25 Jun 2013 12:34:59 +0000 (14:34 +0200)]
kill socat if we do not get any connection within $timeout seconds

10 years agodepend on socat (used for spice)
Dietmar Maurer [Tue, 25 Jun 2013 11:14:00 +0000 (13:14 +0200)]
depend on socat (used for spice)

10 years agospice proxy: try to cirrectly count open socat connections
Dietmar Maurer [Tue, 25 Jun 2013 10:54:15 +0000 (12:54 +0200)]
spice proxy: try to cirrectly count open socat connections

10 years agolimit spice ticket length to 59 charachters
Dietmar Maurer [Tue, 25 Jun 2013 10:47:33 +0000 (12:47 +0200)]
limit spice ticket length to 59 charachters

10 years agoadd spice proxy API
Dietmar Maurer [Tue, 25 Jun 2013 10:09:05 +0000 (12:09 +0200)]
add spice proxy API

This is experimental code, spice connections are not encryped and thus insecure.
We use ticket passwords for spice auth, and do direct spice connections to
the nodes instead of using a tunnel.

10 years agoadd support for spice display driver (vga=qxl)
Dietmar Maurer [Tue, 25 Jun 2013 05:10:42 +0000 (07:10 +0200)]
add support for spice display driver (vga=qxl)

This is based on the patch from Alexandre, but we use vga=qlx instead
of introducing a new 'spice: 1' boolean flag.

10 years agocorrectly handle undef values when calling qemu_block_set_io_throttle
Dietmar Maurer [Wed, 12 Jun 2013 05:08:02 +0000 (07:08 +0200)]
correctly handle undef values when calling qemu_block_set_io_throttle

10 years agoqemu-server : bridge_add : fix uninitialized value
Alexandre Derumier [Tue, 11 Jun 2013 09:35:13 +0000 (11:35 +0200)]
qemu-server : bridge_add : fix uninitialized value

fix : Use of uninitialized value $bridgeid in numeric lt (<) at /usr/share/perl5/PVE/QemuServer.pm line 2774.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
10 years agocode cleanups
Dietmar Maurer [Tue, 11 Jun 2013 05:26:43 +0000 (07:26 +0200)]
code cleanups

removed trailing white space

10 years agosimplify previous patch
Dietmar Maurer [Tue, 11 Jun 2013 05:22:13 +0000 (07:22 +0200)]
simplify previous patch

10 years agocreate_disks : avoid storage scan v3
Alexandre Derumier [Mon, 10 Jun 2013 07:27:04 +0000 (09:27 +0200)]
create_disks : avoid storage scan v3

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
10 years agobump version to 3.0-20
Dietmar Maurer [Fri, 7 Jun 2013 09:44:42 +0000 (11:44 +0200)]
bump version to 3.0-20

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

11 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

11 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>
11 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

11 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

11 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

11 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