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>
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().
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>
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>
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>
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>
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>
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>
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>