Commit Graph

455 Commits

Author SHA1 Message Date
Dietmar Maurer
f91b2e4554 fix for resize: final cleanups 2012-08-08 09:25:54 +02:00
Dietmar Maurer
2f48a4f522 fix for resize: only allow to resize one disk. 2012-08-08 08:26:58 +02:00
Dietmar Maurer
3b2773f606 fix for resize: remove useless permission checks 2012-08-08 07:36:51 +02:00
Dietmar Maurer
614e3941a3 fix for resize: avoid conflicting path 2012-08-08 07:34:36 +02:00
Alexandre Derumier
0d02881ce5 qm : add resize
qm resize <vmid> -ide1 +10(G|M|K)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-08 07:25:50 +02:00
Alexandre Derumier
c1175c9264 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>
2012-08-07 08:11:55 +02:00
Dietmar Maurer
af990afe34 correctly use new disksize() method 2012-08-01 13:44:54 +02:00
Dietmar Maurer
24afaca0b6 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().
2012-08-01 13:22:43 +02:00
Dietmar Maurer
93ae06e180 Avoid warnings about undefined values 2012-08-01 13:15:57 +02:00
Dietmar Maurer
de733742d2 bump version to 2.0-47 2012-08-01 08:58:16 +02:00
Dietmar Maurer
b1a470ade6 remove more unused subs 2012-08-01 07:29:23 +02:00
Alexandre Derumier
3ea99fc4a1 remove old subs no more used
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-31 11:12:01 +02:00
Alexandre Derumier
cdd2008803 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>
2012-07-31 11:11:19 +02:00
Dietmar Maurer
eabe0da02d bug fix: allow to set devices directly (-ide1 /dev/XYZ) 2012-07-27 11:59:42 +02:00
Alexandre Derumier
2a7993d9ef 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>
2012-07-27 10:51:23 +02:00
Dietmar Maurer
373ea5798a migrate: only scan available storages 2012-07-16 10:20:36 +02:00
Alexandre Derumier
0f56d571e4 implement qmp block_set_io_throttle on running vm config update
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-16 09:20:49 +02:00
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