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

1675 Commits

Author SHA1 Message Date
Wolfgang Bumiller
458d4133a4 bump version to 5.0-37
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-10-16 14:54:55 +02:00
Wolfgang Bumiller
df648a6a7a lower hv_synic, hv_stimer requirement to qemu 2.12
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-10-16 14:52:28 +02:00
Alexandre Derumier
29004a20ca qemu_img_convert : use "-l snapshot.name" instead -s for internal snapshot
qemu-img convert -s has been removed in qemu 3.0
https://git.qemu.org/?p=qemu.git;a=commit;h=46e8d272baa0608adcfdbd8bc1d2312bea06da40

we should use qemu-img convert -l snapshot.name=<snapname>,
introduced in qemu 2.0 in 2013
http://patchwork.ozlabs.org/patch/296457/
2018-10-08 13:16:12 +02:00
Dominik Csapak
64a320303f add virtio gpu to qemuserver options
and sort the list

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-09-28 09:59:05 +02:00
Thomas Lamprecht
19d93db010 bump version to 5.0-36
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-24 11:39:01 +02:00
Wolfgang Bumiller
eba2b72199 use qemu's blockdev-snapshot functions
Instead of our own. The code is almost the same, but the
upstream implementation uses qemu's transactional system and
performs a drain() on the block device first. This seems to
help avoid some issues we run into with qcow2 files when
creating snapshots.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-09-24 11:12:34 +02:00
Thomas Lamprecht
babecffe00 restore vm: vmgenid: fixup regex capturing group reference
Reported-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-19 14:16:02 +02:00
Thomas Lamprecht
4f4d9772a5 rollback: vmgenid: comment why we regenerate vmgenid
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-19 14:01:05 +02:00
Thomas Lamprecht
f7ed64e7b9 schema: vmgenid: reword desscription, add verbose one and document default
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-19 14:01:05 +02:00
Thomas Lamprecht
1a0c2f032c restore vm: vmgenid: small code cleanup
do not use $1 do write out config, if code gets added this may easily
get overwritten, as vmgenid is a fixed key just hardcode it.

also move the comment to where it actually belongs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-19 13:31:26 +02:00
Dominik Csapak
6ee499fff8 fix #1908: add vmgenid config/device
this adds a VM Generation ID device uses by Windows (Server) to determine
some specific actions that may have happened with the vm
such as rollback, restore, etc.

see:

https://docs.microsoft.com/en-us/windows/desktop/hyperv_v2/virtual-machine-generation-identifier

for details on how it works and when it should change

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-09-19 12:23:24 +02:00
Wolfgang Bumiller
dd84e5ec14 fix version check in qemu_machine_feature_enabled
This caused a few hiccups with qemu 3.0...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Acked-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-18 09:37:32 +02:00
Thomas Lamprecht
178acded44 bump version to 5.0-35
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-17 15:49:31 +02:00
Thomas Lamprecht
75a38a04f5 d/control: bump version dependency on libpve-guest-common-perl
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-17 15:49:31 +02:00
Thomas Lamprecht
d91711cc3d d/control: add libpve-guest-common-perl as build dependency
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-17 15:49:31 +02:00
Dominik Csapak
28831e1014 add new tests for 'runningmachine' and rollback
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-09-17 15:49:31 +02:00
Thomas Lamprecht
e6d35c710c fixup comment formatting
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-17 15:49:31 +02:00
Dominik Csapak
c6737ef18b ensure correct machine type gets saved on snapshot
instead of overwriting the 'machine' config in the snapshot,
use its own 'runningmachine' config only for the snapshot

this way, we do not lose the machine type if it was
explicitely set during the snapshot, but deleted afterwards

we also have to adapt the tests for this

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-09-17 15:48:05 +02:00
Dominik Csapak
58b1a8d75d use new snapshot rollback hook to handle machine type
this was in guest-common, makes more sense to do it here - it's not
guest agnostic after all.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-09-17 15:43:37 +02:00
Alexandre Derumier
ebb346d6fa qemu 3.0 : add hv_synic && hv_stimer hyperv enlightment
This fix cpu bug on last win10 updates
2018-09-17 13:40:28 +02:00
Thomas Lamprecht
3279808688 bump version to 5.0-34
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-13 11:39:04 +02:00
Dominik Csapak
c725dd5f92 improve 'pending changes' message for clone
$newconf->{pending} is a reference to an empty hash, which is not falsy,
thus we always printed the warning

so check if there are actual values there and if yes,
give the names of the properties for which pending changes are found

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-09-12 10:54:27 +02:00
Thomas Lamprecht
91bba27165 d/control: add build dependency to qemu-utils
the OVF tests use `qemu-img`, which is provided by either our
pve-qemu(-kvm) or qemu-utils (upstream).

Use qemu-utils as it's provided by ours and upstreams package and
thus makes bootstrapping easier, e.g., if our qemu package is not yet
installed this can still be build.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-04 10:22:49 +02:00
Thomas Lamprecht
5b7c5f6331 d/control: add libio-multiplex-perl as build dependency
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-04 10:14:41 +02:00
Alexandre Derumier
eabc189ee8 add ibpb, ssbd, virt-ssbd, amd-ssbd, amd-no-ssb, pdpe1gb cpu flags
> The following are important CPU features that should be used on
> Intel x86 hosts, when available in the host CPU. Some of them
> require explicit configuration to enable, as they are not included
> by default in some, or all, of the named CPU models listed above.
> In general all of these features are included if using “Host
> passthrough” or “Host model”.
>
> pcid: Recommended to mitigate the cost of the Meltdown
> (CVE-2017-5754) fix. Included by default in Haswell, Broadwell &
> Skylake Intel CPU models. Should be explicitly turned on for
> Westmere, SandyBridge, and IvyBridge Intel CPU models. Note that
> some desktop/mobile Westmere CPUs cannot support this feature.
>
> spec-ctrl: Required to enable the Spectre (CVE-2017-5753 and
> CVE-2017-5715) fix, in cases where retpolines are not sufficient.
> Included by default in Intel CPU models with -IBRS suffix. Must be
> explicitly turned on for Intel CPU models without -IBRS suffix.
> Requires the host CPU microcode to support this feature before it
> can be used for guest CPUs.
>
> ssbd: Required to enable the CVE-2018-3639 fix. Not included by
> default in any Intel CPU model. Must be explicitly turned on for
> all Intel CPU models. Requires the host CPU microcode to support
> this feature before it can be used for guest CPUs.
>
> pdpe1gbr: Recommended to allow guest OS to use 1GB size pages.Not
> included by default in any Intel CPU model. Should be explicitly
> turned on for all Intel CPU models. Note that not all CPU hardware
> will support this feature.
-- https://www.berrange.com/posts/2018/06/29/cpu-model-configuration-for-qemu-kvm-on-x86-hosts/
2018-08-28 11:19:10 +02:00
David Limbeck
8d54522b90 fix #1865: CloudInit doesn't add IPv6
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-08-22 12:40:26 +02:00
Thomas Lamprecht
dc02254ec9 qm rescan: fix typo in dryrun description
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-08-21 09:21:41 +02:00
Thomas Lamprecht
e27003dfc7 bump version to 5.0-33
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-08-20 14:43:37 +02:00
Stoiko Ivanov
ca6621315e Fix #1242 : clone_disk : call qga fstrim after clone
Some storage like rbd or lvm can't keep thin-provising after a qemu-mirror.

Call qga guest-fstrim if qga is available and fstrim_cloned_disks is enabled
after move_disk and migrate.

Co-Authored-By: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-08-02 11:35:50 +02:00
Stoiko Ivanov
9d66b39769 Make agent a property string, add fstrim_cloned_disks
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-08-02 11:35:50 +02:00
Dietmar Maurer
b1a70cab3d vmstatus: define return propertries
We can use the same properties in vmlist and vmstatus.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2018-08-01 12:58:21 +02:00
Dietmar Maurer
03f879fd85 vmlist: document 'uptime' and 'cpus' returmn value 2018-07-31 13:31:49 +02:00
Thomas Lamprecht
4e09f915bf bump version to 5.0-32
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-30 11:02:18 +02:00
Thomas Lamprecht
ccd166381b agent: import used check_agent_error method
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-30 11:01:30 +02:00
Thomas Lamprecht
50ecb1ba58 api/agent: do not dereference params hash before passing to agent_cmd
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-30 10:41:48 +02:00
Thomas Lamprecht
4c4622a880 bump version to 5.0-31
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-30 10:25:29 +02:00
Dominik Csapak
332ff39abe add missing import of 'agent_cmd'
see https://pve.proxmox.com/pipermail/pve-user/2018-July/169712.html

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-07-30 08:56:39 +02:00
Alexandre Derumier
a2f1554b6e Fix #1717: delete snapshot when vm running and drive not attached
changelog v2:
 - remove hash
 - remove check if cdrom

if we try to delete a snapshot, and that is disk from the snapshot
is not attached anymore (unused), we can't delete the snapshot
with qemu snapshot delete command (for storage which use it (qcow2,rbd,...))

example:

...
unused0: rbd:vm-107-disk-3

[snap1]
...
scsi2: rbd:vm-107-disk-3,size=1G

-> die
 qmp command 'delete-drive-snapshot' failed - Device 'drive-scsi2' not found

If drive is not attached, we need to use the storage snapshot delete command
2018-07-19 10:42:03 +02:00
Thomas Lamprecht
c2eb7ec274 bump version to 5.0-30
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-17 11:39:31 +02:00
Thomas Lamprecht
bf744e94f3 qm: move 'agent' command into 'guest' comand group
with a backwards compatible alias

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-17 11:01:55 +02:00
Thomas Lamprecht
34e4c0aa6c qm: rename 'ga' command group to 'guest'
https://pve.proxmox.com/pipermail/pve-devel/2018-July/033010.html

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-17 11:01:55 +02:00
Dzmitry Kotsikau
a489dd9c81 Fix SPICE multi-monitor mode on q35
Signed-off-by: Dzmitry Kotsikau <dkotsikau@gmail.com>
2018-07-13 09:51:36 +02:00
Thomas Lamprecht
804fffdfc3 qemu agent: fixup error message letter-case
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-11 11:26:00 +02:00
Dominik Csapak
735821a4fe implement file-write via guest-agent in the api
writes the given content to the file

the size is at the moment limited by the max post size of the
pveproxy/daemon, so we set the maxLength to 60k

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-07-11 10:29:45 +02:00
Dominik Csapak
bb14060a1c implement file-read api call via guest-agent
this api call reads a file via the guest agent,
(in 1MB chunks) but is limited to 16MiB (for now)

if the file is bigger, the output gets truncated and a
'truncated' flag is set in the return object

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-07-11 10:29:45 +02:00
Dominik Csapak
520884deca add exec(-status) to qm
on the commandline the implementation for exec is a bit different
because there we want (by default) to wait for the result,
as opposed to the api, where it is enough to return the pid and
let the client handle the polling

this behaviour is optional and can be turned off, as well as the
timeout of 30 seconds

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-07-11 10:29:45 +02:00
Dominik Csapak
8efdf41820 implement agent exec api call
this imitates the qemu-guest-agent interface
with an 'exec' api call which returns a pid
and an 'exec-status' api call which takes a pid

the command for the exec call is given as an 'alist'
which means that when using we have to give the 'command'
parameter multiple times e.g.

pvesh create <...>/exec --command ls --command '-lha' --command '/home/user'

so that we avoid having to deal with shell escaping etc.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-07-11 10:29:45 +02:00
Dominik Csapak
8593cbe41c add 'passwd' to qm
this adds a command 'qm ga passwd' so that we can reuse
'qm ga' for future guest agent calls

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-07-11 10:29:45 +02:00
Dominik Csapak
b428fb63fa implement set-user-password guest agent api call
this executes the guest agent command 'set-user-password'
with which one can change the password of an existing user in the vm

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-07-11 10:29:45 +02:00
Dominik Csapak
3824765e64 add Agent helper package
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-07-11 10:29:45 +02:00