Commit Graph

302 Commits

Author SHA1 Message Date
Dietmar Maurer
5acbfe9eea disable tablet for spice 2013-07-19 09:58:17 +02:00
Dietmar Maurer
80401dd861 support usb redirection for spice 2013-07-19 09:37:04 +02:00
Dietmar Maurer
943340a628 spice: use TLS
we now use a local tcp port instead of a unix socket, because that is
implemented and works with current spice libraries.
2013-07-17 11:33:02 +02:00
Dietmar Maurer
09984754a0 correctly return and use device type in scsi_inquiry 2013-07-15 13:46:41 +02:00
Dietmar Maurer
f334aa3e6e fix scsi inquiry command
I got wrong results if command is longer than 6 bytes.
2013-07-15 13:12:18 +02:00
Dietmar Maurer
29b1952991 fix coding style 2013-07-15 13:11:28 +02:00
Dietmar Maurer
be19058305 bump version to 3.0-22
and delete trailing white spaces
2013-07-15 09:16:01 +02:00
Alexandre Derumier
462e8d19fe add hyper-v enlightments for windows guests
This add special hyper-v cpu flags for windows guests.

This improve performance and avoid some bsod related to timer.

(I currently disable the hv_vapic flag because I can't get it working).

I have tested all theses flags with: win2003, win2008R2, winxp, linux debian 64bit, on intel and amd physicals processor

It doesn't break live migration, because new cpu flags are not see by guests until a vm reset.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-07-15 09:09:08 +02:00
Alexandre Derumier
2e1a5389f7 add +sep cpuflags to kvm32 && kvm64 cpu models
Need for win8 boot.

This flag was missing from rhel < 6.4 host kernel. It's ok now.
But it's also missing from kvm64 model. (It's exist in other cpu models, amd or intel).
So it's pretty safe to enable it.
If the host kernel is older, qemu filter the flag.

This also improve performance of winxp && win7 32 bits guests.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-07-15 09:08:50 +02:00
Alexandre Derumier
519ed28c96 enable x2apic by default for kvm machines
This reduce context switch with multicore guests.

Even if the host cpu don't have x2apic, it's working because qemu have an virtual x2apic implementation for guest.
We need  in-kernel irqchip support for this, which is enable for kvm guest since qemu 1.3.
(I don't enable it if nokvm param is set)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-07-15 09:08:34 +02:00
Dietmar Maurer
288eeea8ae add spice proxy API
This is experimental code, spice connections are not encryped and thus insecure.
We use ticket passwords for spice auth, and do direct spice connections to
the nodes instead of using a tunnel.
2013-06-25 12:09:05 +02:00
Dietmar Maurer
1011b57090 add support for spice display driver (vga=qxl)
This is based on the patch from Alexandre, but we use vga=qlx instead
of introducing a new 'spice: 1' boolean flag.
2013-06-25 07:10:42 +02:00
Dietmar Maurer
9b2c0efbd6 correctly handle undef values when calling qemu_block_set_io_throttle 2013-06-12 07:08:02 +02:00
Alexandre Derumier
0e6165343a qemu-server : bridge_add : fix uninitialized value
fix : Use of uninitialized value $bridgeid in numeric lt (<) at /usr/share/perl5/PVE/QemuServer.pm line 2774.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-06-12 06:58:20 +02:00
Dietmar Maurer
d8b916fdb0 snapshot rollback: use pc-i440fx-1.4 as default 2013-06-06 06:38:12 +02:00
Dietmar Maurer
4b15803dee snapshot: save/restore 'machine' configuration 2013-06-05 10:17:49 +02:00
Dietmar Maurer
ff556cf2a0 implement get_current_qemu_machine 2013-06-05 09:52:22 +02:00
Dietmar Maurer
952958bc87 API extension: add 'machine' parameter to vm_start
This allows us to overwrite the machine type at start - useful for
migration to make sure we use the same machine at the target node.
2013-06-05 09:27:31 +02:00
Dietmar Maurer
3bafc5106e add new 'machine' configuration 2013-06-05 09:18:23 +02:00
Dietmar Maurer
1a71fa73a4 fix typo 2013-06-04 13:33:35 +02:00
Dietmar Maurer
2fc6bc1722 qemu_drive_mirror: correctly call block-job-cancel if block-job-complete fails 2013-05-31 11:31:22 +02:00
Dietmar Maurer
1377d7b0f5 clone_disk: test if requested format is supported - else use default 2013-05-29 12:59:21 +02:00
Dietmar Maurer
152fe752c4 factor out clone_disk
As suggested by Alexandre. Also cleanup  qemu_drive_mirror (fix white space).
2013-05-29 08:32:10 +02:00
Dietmar Maurer
05937a147d qm rescan: do not add aliases as unused disks. 2013-05-28 12:21:14 +02:00
Dietmar Maurer
a8e2f942bd fix unused disk handling
Show unused disks even if disk is used inside snapshots. But do not allow
to remove those disks.
2013-05-28 12:08:45 +02:00
Dietmar Maurer
7a907ce612 rescan: add check if config has really changed 2013-05-27 10:51:01 +02:00
Dietmar Maurer
5996a936e3 fix bug 395: correctly handle unused disk with storage alias 2013-05-27 08:25:39 +02:00
Alexandre Derumier
e9cfd9cb01 qemu_img_format : use raw for as default for other storage (nexenta, sheepdog, ...)
Seem that something have change in qemu.

iscsi qemu block driver need to use raw, or we get a segfault. (like rbd).

sheepdog works also with .raw, so we don't need anymore specific storage format, we can use raw.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-05-23 11:33:17 +02:00
Dietmar Maurer
8fd5743158 fix bug #391 - restore: test if requested format is supported 2013-05-21 12:02:41 +02:00
Dietmar Maurer
f9a971e0ee fix bug #381: use PVE::Tools::next_migrate_port() 2013-05-13 07:30:50 +02:00
Dietmar Maurer
ca3e4fa4e1 restore: do not restore template flag
A restored VM is never a template. Else we would need to create
base images after the restore, and not all storages supports base
images. Anyways, the user can easily convert the restored VM into a
template later.
2013-05-08 10:19:38 +02:00
Dietmar Maurer
ccb5c001d6 qemu_img_format: use 'raw' for lvm
With host_device we get the following error:

qemu-img: error while writing sector 0: Bad file descriptor
2013-05-07 10:15:57 +02:00
Alexandre Derumier
f6ab3bdbf9 drive-mirror : die if stats are empty.
If drive have bad sectors, the block job die.
we need to die if stats are empty to avoid this:

transferred: 21440086016 bytes remaining: 34668544 bytes total: 21474754560 bytes progression: 99.84 %
Use of uninitialized value $transferred in subtraction (-) at /usr/share/perl5/PVE/QemuServer.pm line 4611.
Use of uninitialized value $total in subtraction (-) at /usr/share/perl5/PVE/QemuServer.pm line 4611.
Use of uninitialized value $transferred in multiplication (*) at /usr/share/perl5/PVE/QemuServer.pm line 4612.
Use of uninitialized value $total in division (/) at /usr/share/perl5/PVE/QemuServer.pm line 4612.
clone failed: mirroring error: Illegal division by zero at /usr/share/perl5/PVE/QemuServer.pm line 4612.

Maybe it should be improved by catching qmp events, but doesn't seem to work for now

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-05-06 11:29:41 +02:00
Dietmar Maurer
4fca015325 set long timeout for query-block-jobs
Like we do for other block job query commands. Seems those commands
can hangs for some time.
2013-05-06 09:25:39 +02:00
Dietmar Maurer
719893a944 has_features: also return a list of allowed nodes
This is useful if a feature is restricted to a limited set of nodes.
2013-05-06 08:56:17 +02:00
Alexandre Derumier
cfad42afd4 add qemu_drive_mirror
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-05-03 08:37:03 +02:00
Dietmar Maurer
4e4f83fea0 copy_vm: use exclusive lock for running VM
Because we can only run one block job to copy data.
2013-04-30 07:40:43 +02:00
Alexandre Derumier
15b1fc9395 don't send qmp balloon commands if vm is started with a state file
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-04-30 07:01:58 +02:00
Alexandre Derumier
bdf3f36209 parse_drive : return correct format
Currently format is always empty, we need to parse file extension

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-04-30 06:55:33 +02:00
Alexandre Derumier
5133de429e add qemu_img_convert
also work with snapshot as source for qcow2,rbd,sheepdog.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-04-29 09:30:58 +02:00
Dietmar Maurer
6116f72902 implement shared file locks
and add a first prototype for copy_vm
2013-04-29 09:30:15 +02:00
Dietmar Maurer
35c5fdefce move assertion so that we have all checks at the same place. 2013-04-22 07:10:58 +02:00
Dietmar Maurer
75e7e997e7 set template flag earlier 2013-04-22 07:08:51 +02:00
Dietmar Maurer
0402a80b77 do not allow template creation if there are snapshots. 2013-04-22 07:05:54 +02:00
Alexandre Derumier
bbd560974a template_create : add template:1 option.
Also allow template create of non base-xxx renamable storage

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-04-22 06:59:18 +02:00
Dietmar Maurer
03da3f0d46 fix bug 377: make qm rescan work properly 2013-04-19 10:45:46 +02:00
Alexandre Derumier
96d695c08a is_template : return 1 if template option == 1
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-04-19 06:56:30 +02:00
Alexandre Derumier
68eda3abc4 add template config option
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-04-19 06:56:03 +02:00
Dietmar Maurer
013d52755f allow sparse restore for sheepdog and rbd 2013-04-18 06:14:50 +02:00
Dietmar Maurer
92f0fedcce parse_net: fix warning about uninitialized value 2013-03-22 06:23:22 +01:00