5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-02-03 13:47:15 +03:00

837 Commits

Author SHA1 Message Date
Wolfgang Bumiller
fb8e95a218 fix burst length parameter names and pass them to qemu
bps_max_length & friends were wrongly named and were only
passed to qemu when hot-applying changes. They can only
be passed via the command line with their new names. For
consistency let's rename them all, that way they're all in
one place.

Fixes #1195 (for real this time).
2017-05-31 08:10:27 +02:00
Wolfgang Bumiller
911524414e fix #1229: more explicit spice port allocation
We cannot look for ports on "any" wildcard address while
letting qemu bind to "localhost", this may lead to a qemu
process occupying ::1 while the next search successfully
finds the same port available for IPv4's '*' address.

Instead, we now lookup the IP of the desired family for
'localhost'. Note that while we could simply be hardcoding
::1 or 127.0.0.1, with this code we are protocol agnostic.
2017-05-31 08:07:34 +02:00
Dietmar Maurer
3ab7663a91 remove 'replicate' configuration - we will store that in another file 2017-05-31 07:53:57 +02:00
Fabian Grünbichler
df58868200 print_cpu_device: remove unused variable 2017-05-23 14:23:52 +02:00
Tobias Böhm
7032e08c85 Fix #1384: add missing decrement to calculation of socket-id
For calculation of "current_core" the input variable id is decremented.
For calculation of "current_socket" this decrement was missing resulting
in a wrong value when "cores" is set to 1.

Signed-off-by: Tobias Böhm <tb@robhost.de>
2017-05-23 14:21:55 +02:00
Dietmar Maurer
3aa44d3b57 move get_replicatable_volumes from QemuServer.pm to QemuConfig.pm 2017-05-06 17:13:31 +02:00
Dietmar Maurer
0342b45bee get_replicatable_volumes: replacemnet for PVE::ReplicationTools::get_syncable_guestdisks()
correctly scan for volumes inside snapshots.

This will also solve the cyclic package dependency propblem.
2017-05-06 15:11:46 +02:00
Dietmar Maurer
8557d01f75 rename drive 'replica' property to 'replicate' 2017-05-06 10:46:21 +02:00
Dietmar Maurer
2286cb8c23 use a single replicate property (format pve-replicate) 2017-05-06 10:35:08 +02:00
Wolfgang Bumiller
1849c59288 whitespace fixup 2017-04-28 10:14:26 +02:00
Wolfgang Link
9edac22f5f Insert new properties in the Qemu config for the PVE Replica.
This patch will include all necessary properties for the replication.
Also will it enable and disable a replication job
when appointed flags are set or deleted.
2017-04-28 10:11:33 +02:00
Alexandre Derumier
6e9d255038 add rerror for all drives
it was missing for scsi, and it's supported for all kind of drive

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-04-28 10:02:38 +02:00
Fabian Grünbichler
b37ecfe6ae start: keep VM paused when migrating via unix socket
this (correctly!) errored out with Qemu 2.9 when live-migrating
local disks, because the NBD server blocks the VM from being
resumed. was probably missed when migrating via unix domains
was originally introduced..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-04-21 11:43:29 +02:00
Wolfgang Bumiller
d1782ebad3 don't compare booleans
a) because perl isn't THAT bad of a language that you'd need
to do this and b) because JSON::XS version 2.90 "dropped"
this "feature"
2017-04-03 14:13:15 +02:00
Dominik Csapak
3db920fc13 add Skylake to CPU Models
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-02-28 12:19:14 +01:00
Wolfgang Bumiller
7fe1b688b6 fix bad scsihw default value check
This was checking for scsihw being set in both branches
whereas lsi is also the default. Added the missing 'not'.

Fixes a bug where a VM with a disk with a scsi index >= 7
refused to start due to an invalid scsi id.

Reported-by: Friedrich Ramberger <f.ramberger@proxmox.com>
2017-02-13 14:10:00 +01:00
Wolfgang Bumiller
1e4fb053d3 skiplock standard option was moved to pve-common
this now need libpve-common-perl >= 4.0-92
2017-02-08 09:56:02 +01:00
Fabian Grünbichler
5ff2bb065a change TLS cipher suite to HIGH
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-01-31 13:38:20 +01:00
Fabian Grünbichler
8e3c33ab64 only use scsi-block with explicit opt-in
since it can cause I/O errors and data corruption in low
memory or highly fragmented memory situations since Qemu 2.7

use scsi-hd by default instead

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-01-25 09:18:46 +01:00
Dmitry Petuhov
7246e8f92f Set zero $size and continue if volume_resize() returns false
Needed for some storages with backing block devices to do oonlinr resize.

Signed-off-by: Dmitry Petuhov <mityapetuhov@gmail.com>
2017-01-16 09:14:32 +01:00
Wolfgang Bumiller
9009150b81 cleanup: drop superfluous condition in assignment
Its use later on already uses itself as condition.
2017-01-09 15:33:12 +01:00
Alexandre Derumier
456a6fec00 add romfile option to hostpci
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-01-09 15:31:18 +01:00
Wolfgang Bumiller
bd2d5fe6ff cleanup: error messages 2017-01-05 10:03:16 +01:00
Wolfgang Bumiller
923aaa9e1a drive-mirror: bump timeout to 5s, add 30s inactivity timeout 2017-01-05 10:03:16 +01:00
Wolfgang Bumiller
ca5c27f065 drive-mirror: warn use POSIX::_exit on exec failure 2017-01-05 10:03:16 +01:00
Wolfgang Bumiller
3b4cf0f0fc cleanup: whitespaces & style 2017-01-05 10:03:10 +01:00
Alexandre Derumier
5619e74aed live clone_vm : suspend or freezefs before block-job-cancel
if qga is enabled, we try to freeze the fs before cancelling block job.
if not , we pause the vm.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-01-05 09:09:46 +01:00
Alexandre Derumier
35e4ab0498 add socat and unix socket for storage migration
This is a workaround for nbd infinite timeout connect

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-01-05 09:09:46 +01:00
Alexandre Derumier
63a0937008 add qm nbdstop
we use it to stop remote nbd server

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-01-05 09:09:46 +01:00
Alexandre Derumier
2189246c5c add targetstorage to vm_start
This will create a new drive for each local drive found,
and start the vm with this new drives.

if targetstorage == 1, we use same sid than original vm disk

a nbd server is started in qemu and expose local volumes to network port

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-01-05 09:09:46 +01:00
Alexandre Derumier
5a34596743 qemu_drive_mirror : handle multiple jobs
we can use multiple drive_mirror in parralel.

block-job-complete can be skipped, if we want to add more mirror job later.

also add support for nbd uri to qemu_drive_mirror

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-01-05 09:09:46 +01:00
Fabian Grünbichler
31b522478d destroy_vm: allow vdisk_free to fail
otherwise we end up with undeletable VM configs in case
vdisk_free fails (which could happen because of cluster-wide
lock contention, storage problems, ..).

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2016-12-22 12:40:09 +01:00
Dietmar Maurer
b017fbda29 avoid "No balloon device has been activated" warnings in vmstatus 2016-12-20 10:11:56 +01:00
Thomas Lamprecht
b7a5a2251b allow insecure migrations from older qemu-servers
When trying to migrate a VM from a node with qemu server <= 4.0-92 to
a node with qemu server >= 4.0-93 we failed as the remote qemu-server
got no explicit migration_type' from the older qemu server on the
source.

Check if migration_type is defined on a incoming migration start, if
not set it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-12-02 18:48:49 +01:00
Emmanuel Kasper
0cb9971ec2 Add entry for windows 10 and 2016 support
All special flags for Windows 8 and Windows 2012 (win8 type)
are kept the same , since we set flags based on checking  if
/^win(\d+)$/ is greater than 6 or 7
2016-11-29 09:08:42 +01:00
Alexandre Derumier
1ef7592f1e qemu_volume_snapshot_delete : fix krbd snapshot delete
like for snapshot, we need to check if krbd is enabled, to known
if we need to use qmp delete-drive-snapshot or storage command directly

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-11-17 09:46:16 +01:00
Alexandre Derumier
ac08761682 qxlnum: use $winversion
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-11-11 09:54:39 +01:00
Alexandre Derumier
5aba3953bd hv_vendor_id : for winversion >= 6 , not >=7.
as It was previously.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-11-11 09:54:28 +01:00
Alexandre Derumier
4317f69fc5 cleanup windows version handling and hyperv enlightments
This cleanup windows guest os version handling,
with normalizing ostype with numbers in a new windows_version sub.

if($ostype eq 'wxp' || $ostype eq 'w2k3' || $ostype eq 'w2k') {
      $winversion = 5;
} elsif($ostype eq 'w2k8' || $ostype eq 'wvista') {
      $winversion = 6;
} elsif ($ostype =~ m/^win(\d+)$/) {
      $winversion = $1;
}

so we can simply do test on windows version with lower or upper version

Hyperv enlightments configuration is centralized
in a new add_hyperv_enlighments sub.

Also disable hyperv with win < 8 + ovmf.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-11-11 06:06:28 +01:00
Dietmar Maurer
36e54bd7f1 remove format_description from $met_fmt->{model} 2016-11-05 16:28:59 +01:00
Dietmar Maurer
8485b9ba68 remove unnecessary format_description from cputype 2016-11-05 15:56:12 +01:00
Dietmar Maurer
c7d2b65040 register new standard option 'pve-qm-image-format' 2016-11-03 13:21:53 +01:00
Dietmar Maurer
d3f3f1b348 fix add_throttle_desc - pass correct units 2016-11-03 12:48:24 +01:00
Wolfgang Bumiller
9196a8ec62 Close #1195: support iops/bps_max_length throttling options 2016-11-03 10:24:12 +01:00
Wolfgang Bumiller
6ecfbb4400 fix a warning: discard is not a number 2016-11-03 09:55:59 +01:00
Thomas Lamprecht
2de2d6f74e allow dedicated migration network, bug #1177
Without this patch we use the network were the cluster traffic runs
for sending migration traffic. This is not ideal as it may hinder
cluster traffic. Further some users have a powerful network which
would be perfect for migrations, with this patch they can run the
migration traffic over such a network without having the corosync
traffic on the same network.

The network is configurable through /etc/pve/datacenter.cfg which
got a new property, namely migration. migration has two
subproperties: type (replaces the old migration_unsecure property)
and network.

For the case of a network failure or that a VM has to be moved over
another network for arbitrary other reasons I added the
migration_type and migration_network parameters to qm migrate (and
respectively vm_start as this gets used on migration).
They allow overwriting the datacenter.cfg settings.

Fixes bug #1177

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-11-03 09:51:23 +01:00
Dietmar Maurer
613d76a179 change default value for cpuunits to 1024
Use the same default as containers.
2016-10-27 07:23:32 +02:00
Wolfgang Bumiller
b799312f2f Fix #1174: remove pve-qm-drive
Let 'cdrom' use the pve-qm-ide format, as it's supposed to
be an alias to ide2.
We're not using the 'alias' schema property since the qemu
configs still use a custom parser (due to the
pending-changes system and the filename-to-volume-id
conversion for legacy support) which does not deal with
schema aliases.
2016-10-18 11:45:41 +02:00
Wolfgang Bumiller
961af8a3c5 improve error messages 2016-10-17 14:49:05 +02:00
Alexandre Derumier
2e5416790f enable drive-mirror with iothread for qemu 2.7 v2
changelog : check running qemu binary version

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-10-17 14:34:56 +02:00