]> git.proxmox.com Git - qemu-server.git/log
qemu-server.git
11 years agosplit snapshot into separate methods.
Dietmar Maurer [Mon, 10 Sep 2012 05:32:33 +0000 (07:32 +0200)]
split snapshot into separate methods.

We also start background tasks now. I also removed the 'digest'and 'force' parameters, because I think we do not need them here.

11 years agoupdate config on snapshot commands
Dietmar Maurer [Fri, 7 Sep 2012 11:07:23 +0000 (13:07 +0200)]
update config on snapshot commands

11 years agoadd save/load snapshot information, add basic snapshot handling stubs
Dietmar Maurer [Fri, 7 Sep 2012 09:51:19 +0000 (11:51 +0200)]
add save/load snapshot information, add basic snapshot handling stubs

11 years agoadd qemu_volume_snapshot_delete
Alexandre Derumier [Thu, 6 Sep 2012 08:33:40 +0000 (10:33 +0200)]
add qemu_volume_snapshot_delete

We need to split the delvm monitor command, like savevm, to delete snapshot onlinefor each volume (qcow2,sheepdog,rbd)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoadd qga_unfreezefs
Alexandre Derumier [Thu, 6 Sep 2012 08:33:39 +0000 (10:33 +0200)]
add qga_unfreezefs

empty for now, need to implement

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoadd qga_freezefs
Alexandre Derumier [Thu, 6 Sep 2012 08:33:38 +0000 (10:33 +0200)]
add qga_freezefs

empty for now, need to implement

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoadd qemu_snapshot_end
Alexandre Derumier [Thu, 6 Sep 2012 08:33:37 +0000 (10:33 +0200)]
add qemu_snapshot_end

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoadd qemu_snapshot_start
Alexandre Derumier [Thu, 6 Sep 2012 08:33:36 +0000 (10:33 +0200)]
add qemu_snapshot_start

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoadd qm snapshot command
Alexandre Derumier [Thu, 6 Sep 2012 08:33:35 +0000 (10:33 +0200)]
add qm snapshot command

qm snapshot <vmid> <action> <snapshotname> --vmstate --freezefs

action : create|rollback|delete

vmstate : save the vmstate

freezefs: freezefs with qemu-ga

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoadd qemu_volume_snapshot
Alexandre Derumier [Thu, 6 Sep 2012 08:33:34 +0000 (10:33 +0200)]
add qemu_volume_snapshot

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoset correct default for new 'agent' option
Dietmar Maurer [Tue, 4 Sep 2012 04:46:53 +0000 (06:46 +0200)]
set correct default for new 'agent' option

We do not enable that by default for now.

11 years agorename option 'qga' to 'agent'
Dietmar Maurer [Tue, 4 Sep 2012 04:31:44 +0000 (06:31 +0200)]
rename option 'qga' to 'agent'

11 years agoadd qemu guest agent support
Alexandre Derumier [Mon, 3 Sep 2012 07:51:08 +0000 (09:51 +0200)]
add qemu guest agent support

this add chardev and virtio-serial devices for communication with guest agent.

vmconfig option :
qga: 1

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agobump version to 2.0-55
Dietmar Maurer [Fri, 31 Aug 2012 09:04:52 +0000 (11:04 +0200)]
bump version to 2.0-55

11 years agomigrate: disable xbzrle for now.
Dietmar Maurer [Fri, 31 Aug 2012 09:02:47 +0000 (11:02 +0200)]
migrate: disable xbzrle for now.

This is not stable, and sometimes cause endless migration (migration never stops).

11 years agobump version to 2.0-54
Dietmar Maurer [Thu, 30 Aug 2012 10:18:44 +0000 (12:18 +0200)]
bump version to 2.0-54

11 years agoavoid warning about uninitialized value
Dietmar Maurer [Thu, 30 Aug 2012 10:15:07 +0000 (12:15 +0200)]
avoid warning about uninitialized value

11 years agomigrate: tolerate query-migrate errors
Dietmar Maurer [Thu, 30 Aug 2012 07:28:24 +0000 (09:28 +0200)]
migrate: tolerate query-migrate errors

11 years agouse mbps instead of bps
Dietmar Maurer [Wed, 29 Aug 2012 11:42:41 +0000 (13:42 +0200)]
use mbps instead of bps

The new parser automatically converts old bps to mbps.

11 years agocleanup: split out parse_size
Dietmar Maurer [Wed, 29 Aug 2012 11:01:52 +0000 (13:01 +0200)]
cleanup: split out parse_size

11 years agoallow to specify sata as boot disk
Dietmar Maurer [Wed, 29 Aug 2012 07:19:21 +0000 (09:19 +0200)]
allow to specify sata as boot disk

11 years agofix changelog
Dietmar Maurer [Wed, 29 Aug 2012 06:00:26 +0000 (08:00 +0200)]
fix changelog

11 years agolivemigrate : activate xbzrle cache
Alexandre Derumier [Tue, 28 Aug 2012 10:46:08 +0000 (12:46 +0200)]
livemigrate : activate xbzrle cache

This help migrate for vm with of lot of memory access (like database)

live migration tests working:

kvm 1.2 -> kvm 1.2  (xbzrle set on both side)
kvm 1.1 -> kvm 1.2 (xbzrle on target)
kvm 1.1 -> kvm 1.1 (xbzrle not set, qmp command try to set xbzrle but fail)

failing migration

kvm 1.2 -> kvm 1.1 fail, but this is expected.

I tested with a memory benchmark running on the vm with 4GB ram

without xbzrle : migration take 10min, with many network hang
with xbzrle : migration take 1min, no hang

I display xbzrle counters for debug purpose, we can remove them later

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agouse scsi-generic by default with libiscsi
Alexandre Derumier [Tue, 28 Aug 2012 10:46:07 +0000 (12:46 +0200)]
use scsi-generic by default with libiscsi

This add scsi passthrough with libiscsi

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoscsihw: add megasas controller
Alexandre Derumier [Tue, 28 Aug 2012 10:46:06 +0000 (12:46 +0200)]
scsihw: add megasas controller

It could be useful for windows7 and windows2008 , as they are no more classic lsi driver for these platform

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agobump version to 2.0-53
Dietmar Maurer [Mon, 27 Aug 2012 11:45:50 +0000 (13:45 +0200)]
bump version to 2.0-53

11 years agofix bug 247: retry qmp open
Dietmar Maurer [Mon, 27 Aug 2012 11:41:24 +0000 (13:41 +0200)]
fix bug 247: retry qmp open

11 years agoset default qmp timout to 3 seconds
Dietmar Maurer [Mon, 27 Aug 2012 11:13:36 +0000 (13:13 +0200)]
set default qmp timout to 3 seconds

And allow to pass timeout paramater to vm_qmp_command().

11 years agoremove qmp socket file on vm_stop_cleanup
Alexandre Derumier [Fri, 24 Aug 2012 06:57:45 +0000 (08:57 +0200)]
remove qmp socket file on vm_stop_cleanup

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agobump version to 2.1-52
Dietmar Maurer [Thu, 23 Aug 2012 08:34:12 +0000 (10:34 +0200)]
bump version to 2.1-52

11 years agowe call vm_stop to target host,
Dietmar Maurer [Thu, 23 Aug 2012 08:28:41 +0000 (10:28 +0200)]
we call vm_stop to target host,

to be sure that kvm process is killed (but it should kill itself),
and deactivate volumes

I slightly modified this patch (orig. from Alexandre) so that it apply cleanly.

11 years agolive migration: reduce sleep when remaining memory is low
Alexandre Derumier [Tue, 21 Aug 2012 10:21:54 +0000 (12:21 +0200)]
live migration: reduce sleep when remaining memory is low

Reduce sleep to 0.3s when remaining memory is lower than the average transfert in 1 iteration.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agocleanup: detete trailing whitespace
Dietmar Maurer [Thu, 23 Aug 2012 05:36:48 +0000 (07:36 +0200)]
cleanup: detete trailing whitespace

11 years agoput target vm in singlestep mode and resume it only when config is moved
Alexandre Derumier [Tue, 21 Aug 2012 10:21:53 +0000 (12:21 +0200)]
put target vm in singlestep mode and resume it only when config is moved

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agopve-bridge: use enviroment variable PVE_MIGRATED_FROM
Dietmar Maurer [Thu, 23 Aug 2012 05:26:41 +0000 (07:26 +0200)]
pve-bridge: use enviroment variable PVE_MIGRATED_FROM

We use environment variable to pass additional information the
the network script.

11 years agoadd migratedfrom param to start vm with conf file an another node
Alexandre Derumier [Tue, 21 Aug 2012 10:21:51 +0000 (12:21 +0200)]
add migratedfrom param to start vm with conf file an another node

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoimplement phase2_cleanup
Alexandre Derumier [Tue, 21 Aug 2012 10:21:50 +0000 (12:21 +0200)]
implement phase2_cleanup

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agomove config file in phase3, when live migration is finished
Alexandre Derumier [Tue, 21 Aug 2012 10:21:49 +0000 (12:21 +0200)]
move config file in phase3, when live migration is finished

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agofix bug #236: use correct shutdown timeout
Dietmar Maurer [Tue, 21 Aug 2012 09:39:17 +0000 (11:39 +0200)]
fix bug #236: use correct shutdown timeout

11 years agobump version to 2.0-51
Dietmar Maurer [Tue, 21 Aug 2012 08:07:09 +0000 (10:07 +0200)]
bump version to 2.0-51

11 years agoallow only 16 virtio devices
Dietmar Maurer [Tue, 21 Aug 2012 08:03:17 +0000 (10:03 +0200)]
allow only 16 virtio devices

This is the same number we have in 1.9. In future, most users will uses virtio-scsi, so there is no real need to support more devices here.

11 years agoprint_pci_addr : check if $bridges is initialized
Alexandre Derumier [Mon, 20 Aug 2012 11:47:56 +0000 (13:47 +0200)]
print_pci_addr : check if $bridges is initialized

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoadd bridge hotplug
Alexandre Derumier [Mon, 20 Aug 2012 11:06:59 +0000 (13:06 +0200)]
add bridge hotplug

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agofix description for max number of devices
Dietmar Maurer [Mon, 20 Aug 2012 10:13:15 +0000 (12:13 +0200)]
fix description for max number of devices

11 years agoadd pci-bridge support and bump MAX_NET and MAX_VIRTIO to 32 devices
Alexandre Derumier [Mon, 20 Aug 2012 09:10:24 +0000 (11:10 +0200)]
add pci-bridge support and bump MAX_NET and MAX_VIRTIO to 32 devices

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoimplement 'qm rescan' to update disk sizes and unused disk info
Dietmar Maurer [Mon, 20 Aug 2012 07:23:00 +0000 (09:23 +0200)]
implement 'qm rescan' to update disk sizes and unused disk info

11 years agoremoved outdated TODO file
Dietmar Maurer [Mon, 20 Aug 2012 05:14:19 +0000 (07:14 +0200)]
removed outdated TODO file

I guess it is better to have no TODO, instead of a file with outdated information.

11 years agofix bug 242: re-add old monitor code
Dietmar Maurer [Fri, 17 Aug 2012 08:34:39 +0000 (10:34 +0200)]
fix bug 242: re-add old monitor code

11 years agobump version to 2.0-48
Dietmar Maurer [Tue, 14 Aug 2012 04:56:00 +0000 (06:56 +0200)]
bump version to 2.0-48

11 years agofix for resize: final cleanups
Dietmar Maurer [Wed, 8 Aug 2012 07:25:54 +0000 (09:25 +0200)]
fix for resize: final cleanups

11 years agofix for resize: only allow to resize one disk.
Dietmar Maurer [Wed, 8 Aug 2012 06:26:58 +0000 (08:26 +0200)]
fix for resize: only allow to resize one disk.

11 years agofix for resize: remove useless permission checks
Dietmar Maurer [Wed, 8 Aug 2012 05:36:51 +0000 (07:36 +0200)]
fix for resize: remove useless permission checks

11 years agofix for resize: avoid conflicting path
Dietmar Maurer [Wed, 8 Aug 2012 05:34:36 +0000 (07:34 +0200)]
fix for resize: avoid conflicting path

11 years agoqm : add resize
Alexandre Derumier [Tue, 7 Aug 2012 10:05:17 +0000 (12:05 +0200)]
qm : add resize

qm resize <vmid> -ide1 +10(G|M|K)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoadd qemu_block_resize
Alexandre Derumier [Mon, 6 Aug 2012 09:56:34 +0000 (11:56 +0200)]
add qemu_block_resize

this call storage plugin resize first.
storage plugin will
  return undef if we don't need to call qmp block_resize
or
 return 1 if we need to call qmp block_resize

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agocorrectly use new disksize() method
Dietmar Maurer [Wed, 1 Aug 2012 11:44:54 +0000 (13:44 +0200)]
correctly use new disksize() method

11 years agoadd size hint to drive options
Dietmar Maurer [Wed, 1 Aug 2012 11:22:43 +0000 (13:22 +0200)]
add size hint to drive options

We now store the size when we create a drive. This is just a hint, but
good enough to display on the GUI. We can now avoid to query the storage in
vmstatus().

11 years agoAvoid warnings about undefined values
Dietmar Maurer [Wed, 1 Aug 2012 11:15:57 +0000 (13:15 +0200)]
Avoid warnings about undefined values

11 years agobump version to 2.0-47
Dietmar Maurer [Wed, 1 Aug 2012 06:58:16 +0000 (08:58 +0200)]
bump version to 2.0-47

11 years agoremove more unused subs
Dietmar Maurer [Wed, 1 Aug 2012 05:29:23 +0000 (07:29 +0200)]
remove more unused subs

11 years agoremove old subs no more used
Alexandre Derumier [Sat, 28 Jul 2012 08:46:56 +0000 (10:46 +0200)]
remove old subs no more used

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoimplement virtio-scsi-pci controller
Alexandre Derumier [Mon, 30 Jul 2012 12:58:40 +0000 (14:58 +0200)]
implement virtio-scsi-pci controller

This add the new virtio-scsi controller support.
http://wiki.qemu.org/Features/VirtioSCSI

Guest need kernel >= 3.4 to support. Windows drivers are also available in last virtio-win

Advantages :

- true scsi controller.(like lsi but a lot faster, around 5% slower than virtio-blk)
- multiples disk by controller (256 for now)
- scsi passthrough
- discard support (great for ssd or thinp storages)
- bootable

Hotplug is not yet available in 1.1. (already available in git)

to define lsi or virtio-scsi-pci controller for scsi disk:

scsihw: lsi|virtio-scsi-pci

default is lsi if not defined.
A megasas controller is comming form qemu 1.2, so we'll able to simply add it in the list of scsi controllers

lsi0 and lsi1 controllers have been renamed to generic scsihw0 and scsihw1,
so we can use them for both lsi or virtio-scsi controller type. (and use same pci slot addr).

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agobug fix: allow to set devices directly (-ide1 /dev/XYZ)
Dietmar Maurer [Fri, 27 Jul 2012 09:59:42 +0000 (11:59 +0200)]
bug fix: allow to set devices directly (-ide1 /dev/XYZ)

11 years agoreplace file_size_info by volume_size_info.
Alexandre Derumier [Fri, 27 Jul 2012 05:59:20 +0000 (07:59 +0200)]
replace file_size_info by volume_size_info.

Currently we only find a volume size by using qemu-img info (in file_size_info).

This doesn't works with "virtual" storage like sheepdog,rbd,iscsidirect,nexenta.

This also doesn't work with classic iscsi direct plugin.

So, we need to define a method for each plugin.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agomigrate: only scan available storages
Dietmar Maurer [Mon, 16 Jul 2012 08:19:11 +0000 (10:19 +0200)]
migrate: only scan available storages

11 years agoimplement qmp block_set_io_throttle on running vm config update
Alexandre Derumier [Sun, 15 Jul 2012 15:19:07 +0000 (17:19 +0200)]
implement qmp block_set_io_throttle on running vm config update

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agofixes for qemu_block_set_io_throttle
Alexandre Derumier [Sun, 15 Jul 2012 15:19:06 +0000 (17:19 +0200)]
fixes for qemu_block_set_io_throttle

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agocode cleanup, bump version to 2.0-44
Dietmar Maurer [Mon, 16 Jul 2012 04:59:53 +0000 (06:59 +0200)]
code cleanup, bump version to 2.0-44

11 years agomigrate: syncdisk : avoid scanning shared storage
Alexandre Derumier [Fri, 13 Jul 2012 13:12:41 +0000 (15:12 +0200)]
migrate: syncdisk : avoid scanning shared storage

Currently we get list from PVE::Storage (for unused volumes), from all storage.
If something goes wrong with the network on host and thenwe can't communicate with a network shared storage(sheepdog,rbd,..),
the vdisk_list die (timeout) and we cannot migrate the vm on another kvm host.(online or offline).

We don't need to scan shared storage, as they are no disk to sync.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agomigrate: fix warning about uninitialized values
Dietmar Maurer [Fri, 13 Jul 2012 10:37:19 +0000 (12:37 +0200)]
migrate: fix warning about uninitialized values

And display acurate byte values instead of KB

11 years agofix command timeout
Dietmar Maurer [Fri, 13 Jul 2012 10:36:40 +0000 (12:36 +0200)]
fix command timeout

11 years agonew option for vmstatus to query $full informations from KVM using qmp
Dietmar Maurer [Fri, 13 Jul 2012 07:25:58 +0000 (09:25 +0200)]
new option for vmstatus to query $full informations from KVM using qmp

11 years agouse qmp for everything - remove old monitor code
Dietmar Maurer [Fri, 13 Jul 2012 06:56:13 +0000 (08:56 +0200)]
use qmp for everything - remove old monitor code

11 years agouse qmp for vm_devices_list
Dietmar Maurer [Fri, 13 Jul 2012 06:42:13 +0000 (08:42 +0200)]
use qmp for vm_devices_list

11 years agoimplement vm_human_monitor_command using qmp
Dietmar Maurer [Fri, 13 Jul 2012 05:30:13 +0000 (07:30 +0200)]
implement vm_human_monitor_command using qmp

11 years agouse new QMPClient code
Dietmar Maurer [Fri, 13 Jul 2012 05:06:22 +0000 (07:06 +0200)]
use new QMPClient code

11 years agoadd PVE::QMPClient.pm
Dietmar Maurer [Thu, 12 Jul 2012 10:28:27 +0000 (12:28 +0200)]
add PVE::QMPClient.pm

This is experimental code, not used currently.

11 years agoqmp_read_available : correctly handle end of response
Alexandre Derumier [Fri, 29 Jun 2012 10:34:55 +0000 (12:34 +0200)]
qmp_read_available : correctly handle end of response

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agofix whitespace errors
Dietmar Maurer [Tue, 26 Jun 2012 04:42:18 +0000 (06:42 +0200)]
fix whitespace errors

11 years agoconvert eject cdrom monitor command to qmp
Alexandre Derumier [Mon, 25 Jun 2012 08:02:58 +0000 (10:02 +0200)]
convert eject cdrom monitor command to qmp

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoconvert migrate monitor commands to qmp
Alexandre Derumier [Mon, 25 Jun 2012 08:02:57 +0000 (10:02 +0200)]
convert migrate monitor commands to qmp

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoconvert cont monitor command (in vm_start) to qmp
Alexandre Derumier [Mon, 25 Jun 2012 08:02:56 +0000 (10:02 +0200)]
convert cont monitor command (in vm_start) to qmp

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoconvert migrate_set_downtime monitor command to qmp
Alexandre Derumier [Mon, 25 Jun 2012 08:02:55 +0000 (10:02 +0200)]
convert migrate_set_downtime monitor command to qmp

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoconvert migrate_set_speed monitor command to qmp
Alexandre Derumier [Mon, 25 Jun 2012 08:02:54 +0000 (10:02 +0200)]
convert migrate_set_speed monitor command to qmp

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoconvert system_powerdown and stop nocheck monitor command to qmp
Alexandre Derumier [Mon, 25 Jun 2012 08:02:53 +0000 (10:02 +0200)]
convert system_powerdown and stop nocheck monitor command to qmp

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoconvert system_reset monitor command to qmp
Alexandre Derumier [Mon, 25 Jun 2012 08:02:52 +0000 (10:02 +0200)]
convert system_reset monitor command to qmp

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoconvert block_io_throttle monitor command to qmp
Alexandre Derumier [Mon, 25 Jun 2012 08:02:51 +0000 (10:02 +0200)]
convert block_io_throttle monitor command to qmp

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoconvert balloon monitor command to qmp
Alexandre Derumier [Mon, 25 Jun 2012 08:02:50 +0000 (10:02 +0200)]
convert balloon monitor command to qmp

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoconvert cont monitor command to qmp
Alexandre Derumier [Mon, 25 Jun 2012 08:02:49 +0000 (10:02 +0200)]
convert cont monitor command to qmp

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoconvert stop monitor command to qmp
Alexandre Derumier [Mon, 25 Jun 2012 08:02:48 +0000 (10:02 +0200)]
convert stop monitor command to qmp

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoadd vm_mon_cmd and vm_mon_cmd_nocheck wrapper
Alexandre Derumier [Mon, 25 Jun 2012 08:02:47 +0000 (10:02 +0200)]
add vm_mon_cmd and vm_mon_cmd_nocheck wrapper

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agovm_qmp_command : reworks of the sub
Alexandre Derumier [Mon, 25 Jun 2012 08:02:46 +0000 (10:02 +0200)]
vm_qmp_command : reworks of the sub

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agoqmp_read_avail : reworks
Alexandre Derumier [Mon, 25 Jun 2012 08:02:45 +0000 (10:02 +0200)]
qmp_read_avail : reworks

qmp response could me more than 1 json.

we can have 1 json with event info, and 1 json with return infos.

We die if we receive an error message in response.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agocheck if volume exist on volume update.
Alexandre Derumier [Sat, 23 Jun 2012 07:07:32 +0000 (09:07 +0200)]
check if volume exist on volume update.

for the moment we check only if the real path exist on the host.
This doesn't work for "virtual" device that host doesn't see.(like rbd, virtio-scsi,...).

This add a check if the volid exist in the storage.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agofix coding style
Dietmar Maurer [Wed, 30 May 2012 10:08:33 +0000 (12:08 +0200)]
fix coding style

11 years agoadd basic qmp support
Alexandre Derumier [Tue, 29 May 2012 12:01:50 +0000 (14:01 +0200)]
add basic qmp support

this add qmp socket to kvm process
and anew sub copied from vm_monitor_command:

vm_qmp_command ($vmid, $cmdstr, $nocheck)

$cmdstr could be a simple command to be executed, without argument

vm_qmp_command($vmid,"stop");

or a complex hash with arguments

$cmdstr->{execute}="eject";
$cmdstr->{arguments}->{device}="ide1-cd0";
vm_qmp_command($vmid,$cmdstr);

documentation about qmp commands is here
http://git.qemu.org/?p=qemu.git;a=blob;f=qmp-commands.hx;h=db980fa811325aeca8ad43472ba468702d4a25a2;hb=HEAD

Code must be polish a little more, but it's a start.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 years agofix pool permission checks on create
Dietmar Maurer [Wed, 30 May 2012 08:13:51 +0000 (10:13 +0200)]
fix pool permission checks on create

We do not need Permission.Modify on the pool.

11 years agodie if vdisk_free fail on delete_drive
Alexandre Derumier [Tue, 29 May 2012 05:56:16 +0000 (07:56 +0200)]
die if vdisk_free fail on delete_drive

 replace the warn by a die.

 Currently, if we vdisk_free a disk and something goes wrong (network
 storage problem by example), the drive is removed from config and we
 cannot retry to remove it later.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
12 years agofix cluster_lock_storage() call
Dietmar Maurer [Thu, 24 May 2012 05:22:41 +0000 (07:22 +0200)]
fix  cluster_lock_storage() call

12 years agoset RELEASE to 2.1
Dietmar Maurer [Wed, 23 May 2012 06:05:36 +0000 (08:05 +0200)]
set RELEASE to 2.1