Commit Graph

2788 Commits

Author SHA1 Message Date
Alexandre Derumier
f3f323a3fc fixes for qemu_block_set_io_throttle
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-16 09:19:38 +02:00
Dietmar Maurer
522c8f97d7 code cleanup, bump version to 2.0-44 2012-07-16 07:00:28 +02:00
Alexandre Derumier
80b2cbd1b9 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>
2012-07-16 06:52:35 +02:00
Dietmar Maurer
a05b47a8a8 migrate: fix warning about uninitialized values
And display acurate byte values instead of KB
2012-07-13 12:37:19 +02:00
Dietmar Maurer
f0002f62f1 fix command timeout 2012-07-13 12:36:40 +02:00
Dietmar Maurer
03a33f3005 new option for vmstatus to query $full informations from KVM using qmp 2012-07-13 09:31:39 +02:00
Dietmar Maurer
7b7c6d1b5d use qmp for everything - remove old monitor code 2012-07-13 09:00:21 +02:00
Dietmar Maurer
ceea9078ad use qmp for vm_devices_list 2012-07-13 08:42:13 +02:00
Dietmar Maurer
9df5cbcc70 implement vm_human_monitor_command using qmp 2012-07-13 07:30:13 +02:00
Dietmar Maurer
26f11676c7 use new QMPClient code 2012-07-13 07:21:34 +02:00
Dietmar Maurer
30a3378acd add PVE::QMPClient.pm
This is experimental code, not used currently.
2012-07-12 12:28:27 +02:00
Alexandre Derumier
ae287df075 qmp_read_available : correctly handle end of response
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-10 10:10:06 +02:00
Dietmar Maurer
bcb7c9cff5 fix whitespace errors 2012-06-26 06:42:18 +02:00
Alexandre Derumier
ce156282e6 convert eject cdrom monitor command to qmp
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:39:53 +02:00
Alexandre Derumier
5a7835f572 convert migrate monitor commands to qmp
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:38:34 +02:00
Alexandre Derumier
608164747f convert cont monitor command (in vm_start) to qmp
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:35:35 +02:00
Alexandre Derumier
ec843725c7 convert migrate_set_downtime monitor command to qmp
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:34:56 +02:00
Alexandre Derumier
2f674c7a5f convert migrate_set_speed monitor command to qmp
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:34:23 +02:00
Alexandre Derumier
988903cab5 convert system_powerdown and stop nocheck monitor command to qmp
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:33:34 +02:00
Alexandre Derumier
816e2c4a53 convert system_reset monitor command to qmp
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:31:57 +02:00
Alexandre Derumier
6f1dbbea52 convert block_io_throttle monitor command to qmp
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:31:39 +02:00
Alexandre Derumier
2d23ddc5db convert balloon monitor command to qmp
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:31:13 +02:00
Alexandre Derumier
12060fe8c3 convert cont monitor command to qmp
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:30:45 +02:00
Alexandre Derumier
f77f91f3d4 convert stop monitor command to qmp
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:30:29 +02:00
Alexandre Derumier
0eedc444b7 add vm_mon_cmd and vm_mon_cmd_nocheck wrapper
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:29:54 +02:00
Alexandre Derumier
d967756b10 vm_qmp_command : reworks of the sub
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:26:40 +02:00
Alexandre Derumier
f667373f27 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>
2012-06-26 06:21:02 +02:00
Alexandre Derumier
35cb731c42 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>
2012-06-25 06:51:17 +02:00
Dietmar Maurer
97d62eb73c fix coding style 2012-05-30 12:08:33 +02:00
Alexandre Derumier
c971c4f221 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>
2012-05-30 11:51:16 +02:00
Dietmar Maurer
4fc5242406 fix pool permission checks on create
We do not need Permission.Modify on the pool.
2012-05-30 10:13:51 +02:00
Alexandre Derumier
7e4e69a6d2 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>
2012-05-29 07:59:06 +02:00
Dietmar Maurer
f5bdefa483 fix cluster_lock_storage() call 2012-05-24 07:24:24 +02:00
Dietmar Maurer
d40282d3eb set RELEASE to 2.1 2012-05-23 08:05:36 +02:00
Dietmar Maurer
5d0094ead9 avoid warning if vm does not belong to a pool 2012-05-23 07:42:55 +02:00
Dietmar Maurer
a125592ce0 minor fixes for newer pve-storage versions 2012-05-23 07:24:15 +02:00
Alexandre Derumier
affd2f88ea add diskio throttling option to drive
This add disk io limit to drive options.

I also add the qemu monitor command, but I din't have added yet to Qemu.pm

>From qemu mailing:

Some available features follow as below:
(1) global bps limit.
   -drive bps=xxx            in bytes/s
(2) only read bps limit
   -drive bps_rd=xxx         in bytes/s
(3) only write bps limit
   -drive bps_wr=xxx         in bytes/s
(4) global iops limit
   -drive iops=xxx           in ios/s
(5) only read iops limit
   -drive iops_rd=xxx        in ios/s
(6) only write iops limit
   -drive iops_wr=xxx        in ios/s
(7) the combination of some limits.
   -drive bps=xxx,iops=xxx

Known Limitations:
(1) #1 can not coexist with #2, #3
(2) #4 can not coexist with #5, #6
(3) When bps/iops limits are specified to a small value such as 511 bytes/s,
this VM will hang up. We are considering how to handle this senario.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-05-14 06:48:05 +02:00
Dietmar Maurer
41e7bdb916 removed startall/stopall commands
Because we now support startup priorities, and start/stop order must include containers
2012-04-20 09:30:42 +02:00
Dietmar Maurer
59411c4e10 new startup option to define startup order 2012-04-19 14:28:05 +02:00
Dietmar Maurer
71c11a8301 fix bug #147: allow to set migrate_downtime to 0 2012-04-11 10:54:04 +02:00
Dietmar Maurer
084d6a59bd increase package version to release directsync cache mode 2012-04-11 08:52:46 +02:00
Alexandre Derumier
e482cec30b add directsync cache mode
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-04-10 09:21:28 +02:00
Dietmar Maurer
22d646a733 fix bug in storage availability check (migrate) 2012-04-07 08:26:51 +02:00
Dietmar Maurer
b7e0c8bf39 use '-no-kvm-pit-reinjection -no-hpet' for win7 and w2k8 2012-04-05 12:34:33 +02:00
Dietmar Maurer
d7810bc123 fix bug #134: allow to pass file names to qmrestore and 'qm set' 2012-04-02 10:52:05 +02:00
Dietmar Maurer
47152e2ee3 fix bug #12: check storage availability early (migrate) 2012-03-30 09:13:31 +02:00
Dietmar Maurer
8b192abf57 fix bug #121: activate volumes correctly 2012-03-29 11:09:52 +02:00
Dietmar Maurer
036e0e2b4b correctly pass hexadecimal numbers with prefix 0x to kvm
This is related to this change in kvm:

http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=commitdiff;h=97aa6e9b8f9df37add21d86fac1a9ca6ce7df9b7
2012-03-29 07:12:43 +02:00
Dietmar Maurer
9f03d50d5c use new network setup code from PVE::Network (libpve-common-perl) 2012-03-28 10:42:02 +02:00
Dietmar Maurer
cce3774992 do not use clusvcadm if we start using 'starturi' parameter 2012-03-27 12:21:15 +02:00