Commit Graph

489 Commits

Author SHA1 Message Date
Dietmar Maurer
b0ec896e43 correctly handle empty description in pending section
So that we can delete descriptions with

 qm set <vmid> --descr ''
2015-08-11 11:24:41 +02:00
Alexandre Derumier
525814b230 add memory_unplug support V2
qemu 2.4 feature

changelog: rebase on last git

Note that currently linux guest don't support unplug of dimm when it'sused by kernel memory.
They are some tunning to do with memory zone movable.
http://events.linuxfoundation.org/sites/events/files/lcjp13_chen.pdf

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-07-29 10:16:28 +02:00
Thomas Lamprecht
38f7f26c44 fixed bug 662, wrong subroutine for parsing startup order
Changed from old, now missing, subroutine parse_startup() to new
pve_parse_startup_order() in qemu-server and pve-manager

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2015-07-22 12:44:30 +02:00
Alexandre Derumier
f1f7ea886a cpuflags : don't enforce with tcg mode
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-07-22 12:40:47 +02:00
Alexandre Derumier
dac7c6190c cpuflags : remove enforce for cpumodel=host
Currently enforce with cpumodel=host on amd cpus don't work,
because amd cpus have unsupported flags in qemu.

This is a protection, and this is good.

but cpumodel host should be never use by users for production (only for testing).
For production and stability, users need to choose a true cpu model which filter
the supported cpuflags by qemu.

So I think we can remove the enforce for host model as for testing it's ok.

warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 0]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 1]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 2]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 3]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 4]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 5]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 6]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 7]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 8]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 9]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 12]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 13]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 14]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 15]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 16]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 17]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 23]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 24]
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-07-22 12:40:20 +02:00
Alexandre Derumier
0dc48c3d5b cpuflags : remove -rdtscp for Opteron cpu models
rdtscp is not supported by qemu and with enforce it's not starting
warning: host doesn't support requested feature: CPUID.80000001H:EDX.rdtscp [bit 27]

from to qemu wiki
http://wiki.qemu.org/Features/CPUModels#Disabling_features_that_were_always_disabled_on_KVM
"Fact: currently libvirt runs CPU models having rdtscp without the "enforce" flag, and rdtscp is silently disabled
Consequence: libvirt SHOULD use something like "-cpu Opteron_G5,-rdtscp",
especially when it starts using (or emulating) enforce mode
This will require a solution on libvirt side. QEMU will just provide the mechanisms to report CPU model information
and check what the host and QEMU supports, but the decision to disable rdtscp to be able
to run Opteron_G[2345] needs to be taken by libvirt."

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-07-22 12:38:47 +02:00
Alexandre Derumier
22967505c4 qemu-server : drive-mirror : allow to interrupts at the scanning bitmap phase
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-07-01 06:39:50 +02:00
Alexandre Derumier
604ea64464 qemuserver : vm_status : add extended stats (disks, nics, memory) V3
Add extended stats results for each nics,disks and memory on full stats mode only.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-06-16 13:23:24 +02:00
Dietmar Maurer
85bdc6afc0 remove outdated host_device format
Newer qemu does not need it.

https://lists.nongnu.org/archive/html/qemu-devel/2011-06/msg02790.html
2015-06-10 10:29:30 +02:00
Dietmar Maurer
d81f0f09fc parse_drive: do not overwrite configured format
Instead, we use qemu_img_format() to query the format when we need it.
We also pass the format to qemu in print_drive_full to avoid qemu warnings.
2015-06-10 10:22:42 +02:00
Wolfgang Bumiller
b2ee900e3c fix aio O_DIRECT check for cdrom drives
Only non-cdrom drives default to cache=none, so the check
for whether to default to aio=native needs to take the same
condition into account.
I combined them close together to make their relation more
visible.
2015-06-02 16:11:01 +02:00
Dietmar Maurer
c6f773b818 cpulimit: use number instead of integer 2015-06-02 16:03:25 +02:00
Alexandre Derumier
58be00f10a implement cpuunit with cgroups
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-06-02 15:56:52 +02:00
Dietmar Maurer
3a515a8805 code cleanup 2015-05-29 08:23:13 +02:00
Alexandre Derumier
ba02e591f0 remove old openvz fairscheduler code
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-05-29 08:11:07 +02:00
Alexandre Derumier
c8effec354 implement hotplug for cpuunits
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-05-29 08:11:04 +02:00
Alexandre Derumier
f08e17c7be implement cgroups through systemd-run
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-05-29 08:11:02 +02:00
Wolfgang Bumiller
fd1f36ac6f localhost instead of 127.0.0.1 makes ipv6 life easier 2015-05-27 08:25:38 +02:00
Wolfgang Bumiller
2fbd27eabc migration: put the source address in brackets
Always adding brackets around the address works. They're required for
ipv6 and qemu also accepts them for ipv4 and hostnames.
2015-05-21 17:30:30 +02:00
Wolfgang Bumiller
af0eba7e35 pass port family to next_*_port() calls 2015-05-12 12:28:56 +02:00
Alexandre Derumier
38e0c3b8ae qmp drive-mirror : set big timeout
drive-mirror is doing lseek on source image before starting, and this can take a lot of time for big nfs volume
during this time, qmp socket is hanging
http://lists.nongnu.org/archive/html/qemu-devel/2015-05/msg01838.html
so we need to setup a big timeout

qemu devs are currently working to fix this

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-05-12 08:18:42 +02:00
Alexandre Derumier
ad123d97f9 qemu-mirror : block job complete : use ready flag
Since qemu 2.2, a new "ready" flag has been added to blockjob
http://git.qemu.org/?p=qemu.git;a=commit;h=ef6dbf1e46ebd1d41ab669df5bba0bbdec6bd374
to known if we can complete it.

we can't use len==offset to known if all block are mirrored, because behaviour will change soon in qemu 2.3

http://git.qemu.org/?p=qemu.git;a=commit;h=b21c76529d55bf7bb02ac736b312f5f8bf033ea2
"block/mirror: Improve progress report

Instead of taking the total length of the block device as the block
job's length, use the number of dirty sectors. The progress is now the
number of sectors mirrored to the target block device. Note that this
may result in the job's length increasing during operation, which is
however in fact desirable.
"

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-05-12 08:18:30 +02:00
Wolfgang Link
e5eaa02815 remove running from Storage and check it in QemuServer
It is better to check if a VM is running in QemuServer then in Storage.
for the Storage there is no difference if it is running or not.

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
2015-05-06 11:47:11 +02:00
Dietmar Maurer
43574f738d use new standard option 'pve-startup-order' 2015-04-22 10:02:33 +02:00
Alexandre Derumier
6e11f14318 implement virtio-scsi multiqueues
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-04-04 10:03:38 +02:00
Alexandre Derumier
3f548708d3 use aio=native only with O_DIRECT (cache=none|directsync)
Currently qemu auto fallback to aio=threads if cache=none|directsync
It's better to handle that correctly

see:
https://bugzilla.redhat.com/show_bug.cgi?id=1086704

http://wiki.qemu.org/ChangeLog/2.3
Future incompatible changes:
Block device parameter aio=native has no effect without cache.direct=on. It will be made an error.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-04-04 09:57:53 +02:00
Alexandre Derumier
8bcf3068eb forbid hot-unplug of virtioscsi + iothread drive
qemu (<=2.3) currently segfault on drive_del

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-04-01 06:16:16 +02:00
Alexandre Derumier
fc8b40fd5f add virtio-scsi iothread support
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-04-01 06:16:16 +02:00
Dietmar Maurer
a1b7d57901 delete trailing white spaces 2015-03-27 06:16:24 +01:00
Dietmar Maurer
a1511b3c42 cleanup: do not use regex 2015-03-27 06:15:01 +01:00
Alexandre Derumier
ee034f5c9c new scsihw_infos sub : code factorization
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-27 06:05:34 +01:00
Alexandre Derumier
2733141ce3 implement virtio-scsi-single hotplug
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-27 06:05:31 +01:00
Alexandre Derumier
6731a4cfa9 implement virtio-scsi-single
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-27 06:05:27 +01:00
Alexandre Derumier
22de899a80 implement virtio iothread hotplug
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-20 06:18:19 +01:00
Alexandre Derumier
51f492cd6d add virtio iothread option
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-20 06:18:15 +01:00
Alexandre Derumier
8ce30ddea0 unplug scsi controller if no more disk exist
we need to remove scsi controller, because live migration will crash,

as on migration target node, we'll start the vm without controller if no disk exist

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-19 06:55:03 +01:00
Alexandre Derumier
8bb5e28d50 add IvyBridge cpu model (qemu >= 2.3)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-19 06:50:27 +01:00
Alexandre Derumier
fc79e81353 add pci bridges by default for qemu > 2.3
pci bridge are not hot-unplugglable,
which can give us live migration problem,
if we hot-unplug a device on pcibridge 1 or 2, we don't create the pci bridge on target guest

and pci bridge hotplug is not working on all os (windows for example).

So it's better to always add them at startup.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-18 06:26:55 +01:00
Alexandre Derumier
6a33d44a91 enable cpu enforce
It wasn't working with 2.6.32,
now that 3.10 kernel is the default, we can enable it.

It's help to be sure that all cpu flags are supported by host && qemu,
to be sure that nothing break

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-17 08:58:14 +01:00
Alexandre Derumier
0da5a08cb4 enable kvm_pv_eoi cpuflag
Paravirtualized End-of-Interrupt Indication (PV-EOI)
Hosts and guests require two VM exits (context switches from a VM to a Hypervisor) for each interrupt:
one to inject the interrupt, and another to signal the end of the interrupt.

With pv_eoi , they can negotiate a paravirtualized end-of-interrupt feature and only require one switch per interrupt.
Number of exits is reduced by half for interrupt-intensive workloads,
such as incoming network traffic with a virtio network device.
This leads to significant reduction in host CPU utilization for such workloads.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-17 08:57:47 +01:00
Alexandre Derumier
117a041466 add kvm_pv_unhalt cpu flag
require pvticketlocks from kernel 3.12 (backported in redhat 3.10 kernel)

see:
http://lwn.net/Articles/493402/

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-17 08:57:32 +01:00
Alexandre Derumier
cfac0be43d enable hv_time hyperv-v enlightment
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-17 08:56:59 +01:00
Alexandre Derumier
8a054ffd81 enable hv_vapic hyperv enlightment
works fine now with rhel 7.1 kernel
https://bugzilla.redhat.com/show_bug.cgi?id=1091818

(It's wasn't working on newer intel xeon)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-17 08:56:51 +01:00
Alexandre Derumier
8f3f959d46 hv_spinlocks : use 0x1fff instead 0xffff
redhat use 0x1fff (8191)  vs 0xffff (65535)
This is the number of retries of spinlocks

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-17 08:56:36 +01:00
Alexandre Derumier
23f73120b7 add qemu_machine_feature_enabled sub
This sub compare current machine type to a specific version,
and return 1 if machinetype is bigger or equal to version

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-17 08:55:49 +01:00
Alexandre Derumier
eb06531726 always setup balloon polling interval.
we always need to enable pooling interval, because it doesn't seem to be setup with -machine option

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-09 08:30:32 +01:00
Alexandre Derumier
d7c8364b22 vmstatus : use vcpus if defined
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-09 08:22:05 +01:00
Dietmar Maurer
38babf816c Revert "balloon: use qom-get for guest balloon statistics V5"
This reverts commit 0ea19b9cf7.
2015-03-09 08:14:37 +01:00
Alexandre Derumier
0ea19b9cf7 balloon: use qom-get for guest balloon statistics V5
changelog:

we use MB, not bytes

$d->{balloon} = int($info->{stats}->{"stat-total-memory"}/1024/1024);
$d->{freemem} = int($info->{stats}->{"stat-free-memory"}/1024/1024);

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-06 10:19:28 +01:00
Alexandre Derumier
7a69fc3cd1 drive_add : escape \ character
storage.cfg
-----------
rbd mystorage
    monhost 10.5.0.11:6789; 10.5.0.12:6789; 10.5.0.13:6789

drive_add auto "file=rbd:poolceph1/vm-101-disk-8:mon_host=10.5.0.11\\:6789; 10.5.0.12\\:6789; 10.5.0.13\\:6789:id=admin:auth_supported=cephx:keyring=/etc/pve/priv/ceph/cephzimbra.keyring,if=none,id=drive-virtio2,aio=native,cache=none,detect-zeroes=on"

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-03-06 10:19:09 +01:00