Commit Graph

510 Commits

Author SHA1 Message Date
Wolfgang Bumiller
407e0b8bef migration: improve ipv6 case
Qemu parses hostnames in brackets correctly but sets an ipv6
flag for them as if they were ipv6 addresses, only insert
brackets for ipv6 addresses.
2015-11-06 07:53:03 +01:00
Dietmar Maurer
67812f9c97 simplify code: consistently use old bios files for older machine types 2015-10-29 07:37:00 +01:00
Dietmar Maurer
ba9e10002f use old netdevice bios files for older machine types 2015-10-28 09:07:03 +01:00
Alexandre Derumier
289e0b8564 migrate : add nocheck for resume
Users have reported resume bug when HA is used.

They seem to have a little race (bench show >0s < 1s) between the vm conf file move on source node and replication to,
and resume on target node.

I don't known why this is only with HA, maybe this occur will standard migration too.

Anyway, we don't need to read the vm config file to resume the vm on target host,
as we are sure that the vm is migrated, and config file move action is correct in the cluster.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-10-15 12:41:13 +02:00
Wolfgang Bumiller
0f2812c25a support serial numbers and models for disks
Note that the model is only supported for IDE harddisks via
the -device option, whereas the serial is part of the -drive
option.

Closes #153
2015-09-30 10:55:10 +02:00
Alexandre Derumier
ab7540f7e4 disable kvm_steal_time
It's currently buggy with live migration

https://bugs.launchpad.net/qemu/+bug/1494350
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-09-29 07:14:02 +02:00
Alexandre Derumier
b62532e4e8 migration: disable compress
it's already disable by default,
but we want to be sure if it's change in later release

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-09-25 17:58:44 +02:00
Alexandre Derumier
0b0a47e8ec enable xbzrle
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-09-25 17:58:40 +02:00
Dietmar Maurer
806873a198 fix kvm version parser for CVE stable releases, bump version to 4.0-25 2015-09-23 11:48:41 +02:00
Alexandre Derumier
6ea8cd3b52 pci passthough : make vfio default
and remove old legacy code.
(deprecated and disabled by default since kernel 4.2)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-09-21 06:31:33 +02:00
Wolfgang Link
6965d5d1f8 fix error message: allocate to much v-CPUs. 2015-09-14 09:42:04 +02:00
Wolfgang Link
5f96f4df75 add possibility to restore backup on rbd in krbd mode 2015-09-09 07:47:42 +02:00
Wolfgang Link
116da78402 add krbd support to online snapshot 2015-09-09 07:22:20 +02:00
Dietmar Maurer
335af808a4 improve bash completion 2015-09-07 08:13:07 +02:00
Dietmar Maurer
65e866e5da implement a few bash completion helpers 2015-09-06 16:01:59 +02:00
Alen Grizonic
cb0e4540f7 VM protection mode added
used to prevent an unintended virtual machine remove operation

v3 changes:

- changed man page message
- removed protection parameter (where not needed)
2015-09-06 11:31:05 +02:00
Wolfgang Link
1dbd6d30e0 fix move_disk on RBD
activating the disk when use RBD is necessary to have the given path.
2015-09-06 11:05:51 +02:00
Dietmar Maurer
d853f40aef fix: start kvm with os type other
this check is necessary, because we do not set ostype in qemu config when type is other

Seem that x2apic is now enabled by default when kvm is used

since this commit
http://git.qemu.org/?p=qemu.git;a=commit;h=ef02ef5f4536dba090b12360a6c862ef0e57e3bc

So we just need to disable it for solaris
2015-08-28 11:10:44 +02:00
Wolfgang Link
40b977f328 fix bug #688: if vm is not owner of this disk remove from config 2015-08-20 12:28:50 +02:00
Wolfgang Bumiller
cee01bcbd7 merge delete_drive into try_deallocate_drive
It used to be private and is only used once.
2015-08-13 12:34:12 +02:00
Wolfgang Bumiller
3dc38fbb74 pending-delete: remember force-deletes
The -force flag didn't have any effect since the pending
changes didn't carry over the the flag.
Now forced deletes have an exclamation mark prepended to the
option name.
2015-08-13 11:08:45 +02:00
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