Commit Graph

137 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
b7e0c8bf39 use '-no-kvm-pit-reinjection -no-hpet' for win7 and w2k8 2012-04-05 12:34:33 +02:00
Dietmar Maurer
47152e2ee3 fix bug #12: check storage availability early (migrate) 2012-03-30 09:13:31 +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
191435c643 only wait 1 second to aquire lock on vm_create
Waiting is not necessary, and we want to avoid delays in the GUI.
2012-03-27 09:02:50 +02:00
Dietmar Maurer
18744ba33f corretcly use tag instead of vlan 2012-03-22 06:30:43 +01:00
Derumier Alexandre
5070f384d1 renamme vlan option to tag
Signed-off-by: Derumier Alexandre <aderumier@odiso.com>
2012-03-22 06:27:58 +01:00
Dietmar Maurer
fc1ddcdcae use Digest::SHA instead of Digest::SHA1 2012-03-20 12:25:08 +01:00
Derumier Alexandre
3c720aeac6 add vlan for testing
Signed-off-by: Derumier Alexandre <aderumier@odiso.com>
2012-03-20 06:12:46 +01:00
Dietmar Maurer
28ef82d3be use scsi inquiry to test if we can use the scsi-block driver
This is basically the same test as done inside the scsi-block driver. This also works for device-mapper multipath devices.
2012-03-19 10:39:43 +01:00
Dietmar Maurer
7fabe17df2 restrict name to DNS format 'dns-name' 2012-03-13 07:00:27 +01:00
Dietmar Maurer
961bfcb224 fix bug 102: remove stale status file on stop 2012-03-01 12:54:06 +01:00
Dietmar Maurer
0581fe4fd6 save description as comment 2012-03-01 08:13:14 +01:00
Dietmar Maurer
684bcdd7a4 revert tablet mice fix 2012-02-29 09:47:31 +01:00
Derumier Alexandre
ce332eeb58 fix tablet mice as default when live migrate
Signed-off-by: Derumier Alexandre <aderumier@odiso.com>
2012-02-29 06:49:57 +01:00
Derumier Alexandre
5b805e5081 Support new cpu models
Signed-off-by: Derumier Alexandre <aderumier@odiso.com>
2012-02-22 07:18:07 +01:00
Dietmar Maurer
da21653bfb ignore -tdf (avoid kvm warning) - this is no longer needed 2012-02-13 11:18:09 +01:00
Derumier Alexandre
95d6343bfa don't try to hotplug/unplug is device exist/don't exist
Signed-off-by: Derumier Alexandre <aderumier@odiso.com>
2012-02-06 07:26:38 +01:00
Dietmar Maurer
ae57f6b352 cleanup update_vm - factor out code to make is simpler 2012-02-03 10:23:50 +01:00
Dietmar Maurer
1858638fe3 replace change_config_nolock with update_config_nolock
We now use cfs_file_write() in order to avoid race conditions between
file IO and cfs operations (read after write works now).
2012-02-02 14:18:41 +01:00
Dietmar Maurer
5d7a6767be cleanup update_vm - carefully reload config after changes
Split out code to delete drive into delete_drive()

Always hotplug after config is written and reloaded.

Do not revert config if hotplug fails.

Do not safe config in add_unused_volume.
2012-02-02 10:57:16 +01:00