Commit Graph

354 Commits

Author SHA1 Message Date
Stefan Priebe
258e646c57 pass snapname to PVE::Storage::vdisk_clone
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2014-07-17 09:21:37 +02:00
Dietmar Maurer
2796e7d542 new option smbios1: specify SMBIOS type 1 fields (uuid, ...) 2014-06-26 11:12:25 +02:00
Alexandre Derumier
b1f72af6d4 add pci multifunction unbind support
we need to unbind each functions of a multifunction pci device

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2014-06-25 09:30:01 +02:00
Alexandre Derumier
4543ecf07f add pci multifunction support
multifunction device should be define without the .function

hostpci0: 00:00

example
-------
if 00:00.0
   00:00.1
   00:00.2

exists,

then we generate the multifunction devices

-device (pci-assign|vfio-pci),host=00:00.0,id=hostpci0.0,bus=...,addr=0x0.0,multifunction=on
-device (pci-assign|vfio-pci),host=00:00.1,id=hostpci0.1,bus=...,addr=0x0.1
-device (pci-assign|vfio-pci),host=00:00.2,id=hostpci0.2,bus=...,addr=0x0.2

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2014-06-25 09:29:53 +02:00
Alexandre Derumier
2e3b7e2a3a add pcie and x-vga passthrough
hostpci0:  .....,x-vga=on,pcie=1

x-vga require kernel 3.10 with vfio-vga support enable
if x-vga=on, we force vfio-pci device

pcie=1 choose the pciexpress bus (need q35 machine model)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2014-06-25 09:29:10 +02:00
Stefan Priebe
000fc0a254 added support for vfio-pci passthrough
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2014-06-18 07:03:09 +02:00
Dietmar Maurer
db656e5f24 cleanup previous patch 2014-06-18 06:54:45 +02:00
Alexandre Derumier
f8e83f0548 enable q35 machine support
q35 use pcie.0 root by default. so currently we can't start machine model q35.

we need to add 3 pci-bridge pci.0, pci.1, pci.2, to handle our devices.

pcie.0 does not support hotplug. so pci-bridge are defined at startup.

I use an pve-q35.cfg (mostly the same than q35-chipset.cfg from qemu docs).

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2014-06-18 06:03:53 +02:00
Alexandre Derumier
a9410357d2 add virtio-net multiqueue support
this a new option queue=(\d+) to net interface

Allow to use more than 1 cpu for network stream, so this can improve network bandwidth,
when vhost-net cpu is the bottleneck

http://www.linux-kvm.org/page/Multiqueue#Enable_MQ_feature

-netdev tap,vhost=on,queues=N -device virtio-net-pci,mq=on,vectors=2N+2

host requirement
----------------
this require host kernel >= 3.8 (or qemu die at start)

linux guest requirement
-----------------------
kernel >= 3.8

manual enabling multiqueue

windows guest requierement
--------------------------
recent virtio-net driver

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2014-06-11 09:22:01 +02:00
Dietmar Maurer
5881b913c0 add option iscsi only once
We simply add option iscsi if we have an initiator name. So we
never add this option multiple times, and it works with hotplug
in case someone plugs an 'iscsi:' drive later.
2014-05-17 09:14:58 +02:00
Dietmar Maurer
46f58b5f03 cleanup previous commit - use IO::File 2014-05-17 09:07:18 +02:00
Michael Rasmussen
15b21acc0d add initiator-name to iscsi drives if configured
Signed-off-by: Michael Rasmussen <mir@datanom.net>
2014-05-17 08:42:54 +02:00
Alexandre Derumier
28138e9a1b print_net : add firewall option
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2014-05-09 11:52:15 +02:00
Alexandre Derumier
011c581720 add pve-bridgedown script
This allow to delete fwbr bridge, link interfaces, cleanup ovs
when vm is shutdown

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2014-05-08 08:37:04 +02:00
Alexandre Derumier
2dd4aa4c95 add firewall option to qemu network interface
this allow to disable firewall for a specific interface

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2014-05-08 08:35:37 +02:00
Dietmar Maurer
3cf90d7a40 qmrestore: removed short timeout 2014-04-17 10:37:46 +02:00
Dietmar Maurer
c0efd8cd0e disable cpu enforce flag
Enforce needs kernel 3.10, so we do not use it for now.
2014-04-03 09:39:54 +02:00
Alexandre Derumier
2430d37886 enforce cpu check
enable check if host support all cpu flags configured for the guests

this avoid some bad setup like Opteron vcpu on a intel host for example,
and avoid some bad live migrations

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2014-03-28 09:03:21 +01:00
Dietmar Maurer
22430fa2c9 remove unneeded parentheses 2014-02-10 08:05:06 +01:00
Stefan Priebe
b463a3cec0 since qemu 1.7 xbzrle is AUTOMATICALLY enabled in the end of transfer - we need to explicit disable all feature we do not want
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2014-02-10 08:01:19 +01:00
Dietmar Maurer
264e519fab white space cleanups 2014-01-14 10:33:36 +01:00
Alexandre Derumier
838776ab65 add cpu_hotplug
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2014-01-14 07:29:25 +01:00
Alexandre Derumier
3bd18e48cf add maxcpus config
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2014-01-14 07:26:55 +01:00
Dietmar Maurer
8b8345f3ac cleanup previous commit 2014-01-10 13:09:19 +01:00
Alexandre Derumier
a89fded11f migration : enable auto-converge capability v2
This reduce guest cpu speed if dirtied bytes is 50% more than the approx.amount of bytes that just got transferred since the last time we were in this routine.

qemu commit :
http://git.qemu.org/?p=qemu.git;a=commit;h=bde1e2ec2176c363c1783bf8887b6b1beb08dfee

tested with "stress -m 2 -c 2" under debian

without autoconvergence : downtime 12s - duration 12min
with autoconvergence : downtime 2s - duration 4min

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2014-01-10 13:01:55 +01:00
Dietmar Maurer
0cea6a0160 add more options for pci passthrough 2013-12-13 11:43:05 +01:00
Dietmar Maurer
dd25eecf62 code cleanup
Use new helper methods.
2013-12-10 10:46:50 +01:00
Dietmar Maurer
cd339d1fe9 use new helper PVE::Tools::next_spice_port() 2013-12-09 13:23:26 +01:00
Alexandre Derumier
74edd76ba8 qemuserver : iothrottle add support for throttling burst max
http://git.qemu.org/?p=qemu.git;a=commit;h=3e9fab690d59ac15956c3733fe0794ce1ae4c4af

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-12-05 06:31:06 +01:00
Dietmar Maurer
5b952ff541 add 'lsi53c810' to the list of scsi controllers 2013-12-04 09:11:36 +01:00
Dietmar Maurer
8d87f8aa4f add drive option 'discard' 2013-12-04 08:43:46 +01:00
Dietmar Maurer
e4c6e0b88c add vmxnet3 to list of available network card models 2013-12-04 07:37:42 +01:00
Dietmar Maurer
87c5bc3493 add 'pvscsi' to the list of scsi controllers.
QEMU can now emulate the VMware PVSCSI device.
2013-12-04 06:52:38 +01:00
Alexandre Derumier
71ddbff9cb qemu-img : qemu 1.7 use -n for skip volume create
http://git.qemu.org/?p=qemu.git;a=commit;h=b2e10493c71160d88bb823cae9a92e806a79b9d6

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-12-03 10:46:37 +01:00
Alexandre Derumier
4dc339e7b4 add +lahf_lm flag to kvm64 cpudef
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-11-29 09:17:03 +01:00
Dietmar Maurer
49ca581d5d allow to migrate VMs using SPICE usb redirection 2013-11-26 07:37:18 +01:00
Dietmar Maurer
590e698c07 cleanup spice code 2013-10-02 09:11:57 +02:00
Alexandre Derumier
2fa3151ebd add multi-monitors spice support
add qxl2 (2monitors),qxl3 (3monitors),qxl4 (4monitors) vga type.

For linux, we only need 1 qxl card with more memory

For windows, we need 1 qxl card by monitor

Original Information from spice-mailing
"
You need to specify multiple devices for Windows VMs. This is what
libvirt gives me (via 'virsh domxml-to-native qemu argv DOMAIN_XML'):
<...> -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=33554432 -device qxl,id=video1,ram_size=67108864,vram_size=33554432 -device qxl,id=video2,ram_size=67108864,vram_size=33554432 -device qxl,id=video3,ram_size=67108864,vram_size=33554432

For Linux VM, just one qxl device is OK but then it's advisable to
increase the available RAM:
<...> -vga qxl -global qxl-vga.ram_size=134217728 -global qxl-vga.vram_size=33554432

If you don't turn off surfaces, then you should increase vram size to
say 64 MB from current default of 32 MB.
"

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-10-02 08:26:32 +02:00
Dietmar Maurer
990fc5e22e use warnings instead of global -w flag 2013-10-01 13:14:49 +02:00
Alexandre Derumier
6b9d84cfb2 add opensolaris ostype and disable x2apic
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-09-24 06:53:26 +02:00
Dietmar Maurer
244f2577c5 speedup restore on glusterfs (do not write zero bytes) 2013-09-17 09:12:07 +02:00
Dietmar Maurer
32e698051f fix typo - s/parallel/parport/ 2013-08-14 15:55:01 +02:00
Dietmar Maurer
4c5dbaf6ab use tty chardev for usb-to-parallel 2013-08-14 14:22:24 +02:00
Dietmar Maurer
9ecc843138 allow to use usb parallel ports 2013-08-14 12:18:54 +02:00
Dietmar Maurer
ef5e2be2a4 add ability to run without graphic card ('vga: serial[n]') 2013-07-31 09:19:36 +02:00
Dietmar Maurer
9f9d2fb261 allow to use a socket for serial devices 2013-07-31 06:58:26 +02:00
Stefan Priebe
5bc1e0397e qemu-server: add support for unsecure migration (setting in datacenter.cfg)
This patch adds support for unsecure migration using a direct tcp connection
KVM <=> KVM instead of an extra SSH tunnel. Without ssh the limit is just the
bandwith and no longer the CPU / one single core.

You can enable this by adding:
migration_unsecure: 1
to datacenter.cfg

Examples using qemu 1.4 as migration with qemu 1.3 still does not work for me:

current default with SSH Tunnel VM uses 2GB mem:
Dec 27 21:10:32 starting migration of VM 105 to node 'cloud1-1202' (10.255.0.20)
Dec 27 21:10:32 copying disk images
Dec 27 21:10:32 starting VM 105 on remote node 'cloud1-1202'
Dec 27 21:10:35 starting ssh migration tunnel
Dec 27 21:10:36 starting online/live migration on localhost:60000
Dec 27 21:10:36 migrate_set_speed: 8589934592
Dec 27 21:10:36 migrate_set_downtime: 1
Dec 27 21:10:38 migration status: active (transferred 152481002, remaining 1938546688), total 2156396544) , expected downtime 0
Dec 27 21:10:40 migration status: active (transferred 279836995, remaining 1811140608), total 2156396544) , expected downtime 0
Dec 27 21:10:42 migration status: active (transferred 421265271, remaining 1669840896), total 2156396544) , expected downtime 0
Dec 27 21:10:44 migration status: active (transferred 570987974, remaining 1520152576), total 2156396544) , expected downtime 0
Dec 27 21:10:46 migration status: active (transferred 721469404, remaining 1369939968), total 2156396544) , expected downtime 0
Dec 27 21:10:48 migration status: active (transferred 875595258, remaining 1216057344), total 2156396544) , expected downtime 0
Dec 27 21:10:50 migration status: active (transferred 1034654822, remaining 1056931840), total 2156396544) , expected downtime 0
Dec 27 21:10:54 migration status: active (transferred 1176288424, remaining 915369984), total 2156396544) , expected downtime 0
Dec 27 21:10:56 migration status: active (transferred 1339734759, remaining 752050176), total 2156396544) , expected downtime 0
Dec 27 21:10:58 migration status: active (transferred 1503743261, remaining 588206080), total 2156396544) , expected downtime 0
Dec 27 21:11:02 migration status: active (transferred 1645097827, remaining 446906368), total 2156396544) , expected downtime 0
Dec 27 21:11:04 migration status: active (transferred 1810562934, remaining 281751552), total 2156396544) , expected downtime 0
Dec 27 21:11:06 migration status: active (transferred 1964377505, remaining 126033920), total 2156396544) , expected downtime 0
Dec 27 21:11:08 migration status: active (transferred 2077930417, remaining 0), total 2156396544) , expected downtime 0
Dec 27 21:11:09 migration speed: 62.06 MB/s - downtime 37 ms
Dec 27 21:11:09 migration status: completed
Dec 27 21:11:13 migration finished successfuly (duration 00:00:41)
TASK OK

with unsecure migration without SSH Tunnel:
Dec 27 22:43:14 starting migration of VM 105 to node 'cloud1-1203' (10.255.0.22)
Dec 27 22:43:14 copying disk images
Dec 27 22:43:14 starting VM 105 on remote node 'cloud1-1203'
Dec 27 22:43:17 starting online/live migration on 10.255.0.22:60000
Dec 27 22:43:17 migrate_set_speed: 8589934592
Dec 27 22:43:17 migrate_set_downtime: 1
Dec 27 22:43:19 migration speed: 1024.00 MB/s - downtime 1100 ms
Dec 27 22:43:19 migration status: completed
Dec 27 22:43:22 migration finished successfuly (duration 00:00:09)
TASK OK
2013-07-26 11:23:49 +02:00
Dietmar Maurer
86b8228b59 new vga_conf_has_spice() helper
code cleanups
2013-07-24 12:01:03 +02:00
Dietmar Maurer
1d794448fc return spice_port from config_to_command()
That way we do not need to run qmp command to get the port.
Set spice ticket expire time to 30 (5 seconds seems a bit too short).
Coding style cleanups.
2013-07-24 11:24:20 +02:00
Alexandre Derumier
95a4b4a98b add spice migration
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-07-24 10:54:20 +02:00