5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-21 18:03:56 +03:00

1464 Commits

Author SHA1 Message Date
Alexandre Derumier
456a6fec00 add romfile option to hostpci
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-01-09 15:31:18 +01:00
Alexandre Derumier
56af714629 add with-local-disks option for live storage migration
As Fabian as required,
add an extra flag "with-local-disks"  to enable live storage migration with localdisk.

default target storage is same sid than source, this can be overrided with
"targetstorage" option.

I will try improve this later, with optionnal mapping, disk by disk.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-01-06 12:10:25 +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
b74cad8ae3 add live storage migration with vm migration
This allow to migrate disks on local storage  to a remote node storage.

When the target node start, a new volumes are created and exposed through qemu embedded nbd server.

qemu drive-mirror is launch on source vm for each disk with nbd server as target.

when drive-mirror reach 100% of 1 disk, we don't complete the block jobs and begin mirror of next disk.
(mirroring are parralel, but we try to mirroring them 1 by 1 to avoid storage && network overload)

Then we live migrate the vm to destination node. (drive-mirror still occur at the same time).

We the vm is livemigrate (source vm paused, target vm pause), we complete the block jobs mirror.

When is done we stop the source vm and resume the target vm

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
c6fdd002b2 clone live vm : add support for multiple jobs
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
Alexandre Derumier
a9e7997eb3 qmpclient : block-job-(complete|cancel) : set timeout to 10min
like query-block-jobs.

qmp socket can be busy when block job are running

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-01-05 09:09:46 +01:00
Dietmar Maurer
f4c1d8e29a bump version to 4.0-103 2016-12-22 12:41:13 +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
Emmanuel Kasper
0db93c2d8a Display volume size in log when doing a volume backup
Output before this patch
INFO: include disk 'scsi0' 'file=pve4tank:vm-402-disk-1'

Output after this patch:
INFO: include disk 'scsi0' 'file=pve4tank:vm-402-disk-1' 64G

we're mainly intersted by the volume size here, it was requested in #351
2016-12-22 10:25:13 +01:00
Dietmar Maurer
3a65f4c9de bump version to 4.0-102
and remove useless RELEASE
2016-12-20 10:13:36 +01:00
Dietmar Maurer
b017fbda29 avoid "No balloon device has been activated" warnings in vmstatus 2016-12-20 10:11:56 +01:00
Fabian Grünbichler
4f6f7b5462 bump version to 4.0-101 2016-12-05 12:39:24 +01:00
Dominik Csapak
b3205b153e allow migration of local qcow2 snapshots
we can migrate local snapshots when on zfs or dir storage with qcow2,
but the check was incorrect

we checked for if (zfs && !qcow2) instead of  if (zfs || qcow2)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-12-05 12:32:50 +01:00
Dietmar Maurer
e57d58e542 bump version to 4.0-100 2016-12-02 18:51:23 +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
Dietmar Maurer
1b314d19be bump version to 4.0-99 2016-12-01 07:59:24 +01:00
Dietmar Maurer
249d8fedd8 qm agent: remove 'guest-' prefix from commands 2016-12-01 07:57:26 +01:00
Dietmar Maurer
ee2ff074b1 qm agent: pass command as second required argument
usage: qm agent <vmid> <command>
2016-12-01 07:49:30 +01:00
Dietmar Maurer
788a6a35da qm agent: add output formatter 2016-12-01 07:44:23 +01:00
Dietmar Maurer
57bdd45943 qm agent: directly return result
This is required for correct error handling. The previous
code simply cought all exceptions.
2016-12-01 07:23:16 +01:00
Dietmar Maurer
a5d5341cb2 qm agent: enumerate possible guest commands 2016-12-01 07:18:31 +01:00
Dietmar Maurer
c07a9e3d64 cleanup: reorder code so that emacs font-lock-mode works again
This is just a work around for emacs bugs.
2016-11-30 13:07:52 +01:00
Dietmar Maurer
f38c5e270f qm agent: add command line completion for vmid 2016-11-30 12:47:03 +01:00
Dietmar Maurer
96e6a80417 bump version to 4.0-98 2016-11-30 12:32:02 +01:00
Wolfgang Link
d1a474273b Add qm agent.
This command makes it possible to run commnads on the Qemu-Guest-Agent if it is installed and running.
2016-11-30 12:30:31 +01:00
Thomas Lamprecht
cfb7a70165 increase timeout from guest-fsfreeze-freeze
The qmp command 'guest-fsfreeze-freeze' issues in linux a FIFREEZE
ioctl call on all mounted guest FS.
This ioctl call locks the filesystem and gets it into an consistent
state. For this all caches must be synced after blocking new writes
to the FS, which may need a relative long time, especially under high
IO load on the backing storage.

In windows a VSS (Volume Shadow Copy Service) request_freeze will
issued. As of the closed Windows nature the exact mechanisms cannot
be checked but some microsoft blog posts and other forum post suggest
that it should return fast but certain workloads can still trigger a
long delay resulting an similar problems.

Thus try to minimize the error probability and increase the timeout
significantly.
We use 60 minutes as timeout as this seems a limit which should not
get trespassed in a somewhat healthy system.

See:
https://forum.proxmox.com/threads/22192/

see the 'freeze_super' and 'thaw_super' function in fs/super.c from
the linux kernel tree for more details on the freeze behavior in
Linux guests.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-11-30 06:09:46 +01:00
Dietmar Maurer
4c3a2d3b53 bump version to 4.0-97 2016-11-29 09:09:39 +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
Dietmar Maurer
90e1670df8 bump version to 4.0-96 2016-11-23 10:02:55 +01:00
Fabian Grünbichler
a8f2f42714 restrict monitor API to Sys.Modify for most commands
because these allow adding arbitrary devices to VMs (and
other potentially dangerous things).

whitelist 'info *' and 'help' as usable with just
VM.Monitor, if more are desired and requested they can be
added later.
2016-11-23 10:02:06 +01:00
Dietmar Maurer
cad05dcfaa bump version to 4.0-95 2016-11-23 08:11:33 +01:00
Dietmar Maurer
ae849692d9 vm_shutdown: request 'stopped' state for HA enabled VMs 2016-11-23 08:03:08 +01:00
Dietmar Maurer
29ddbe702b combine option 'format' with previous line (avoid emacs confusion) 2016-11-23 06:40:33 +01:00
Dietmar Maurer
e0feef86ee use ha-manager 'stopped' state instead of 'disabled' 2016-11-23 06:23:21 +01:00
Thomas Lamprecht
2a7e2b82bb switch to 'ha-manager set'
ha-manager enabled/disabled will get removed

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-11-19 10:02:45 +01:00
Alexandre Derumier
3a8deb551f vmstate snapshot : activate|deactivate volume
This fix vmstate snasphot on krbd volume

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-11-17 09:46:54 +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
Stefan Priebe
e281273810 VZDump/QemuServer: set bless clas correctly
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2016-11-17 09:02:47 +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