]> git.proxmox.com Git - qemu-server.git/log
qemu-server.git
5 years agobump version to 5.0-41
Thomas Lamprecht [Mon, 19 Nov 2018 13:43:32 +0000 (14:43 +0100)]
bump version to 5.0-41

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agod/control: bump version dependency to libpve-common-perl
Thomas Lamprecht [Mon, 19 Nov 2018 13:42:48 +0000 (14:42 +0100)]
d/control: bump version dependency to libpve-common-perl

to ensure we have the new PVE::SysFSTools module available

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobsys: CFLAGS should add to existing
Thomas Lamprecht [Mon, 19 Nov 2018 14:18:01 +0000 (15:18 +0100)]
bsys: CFLAGS should add to existing

else the environment from buildpackage gets overwritten and the '-g'
misses, which results in an debug symbols file without debug
symbols.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobsys: we have a dbgsym package now too
Thomas Lamprecht [Mon, 19 Nov 2018 13:41:14 +0000 (14:41 +0100)]
bsys: we have a dbgsym package now too

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoqmeventd: fixup program name in license
Thomas Lamprecht [Mon, 19 Nov 2018 13:36:01 +0000 (14:36 +0100)]
qmeventd: fixup program name in license

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoQemuServer: remove now unused $pcisysfs
Thomas Lamprecht [Mon, 19 Nov 2018 13:07:54 +0000 (14:07 +0100)]
QemuServer: remove now unused $pcisysfs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoQemuServer: remove PCI sysfs helpers
Dominik Csapak [Fri, 16 Nov 2018 15:17:51 +0000 (16:17 +0100)]
QemuServer: remove PCI sysfs helpers

and use them from PVE::SysFSTools, where they got moved to

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agod/control: remove unused dependency
Wolfgang Bumiller [Mon, 19 Nov 2018 08:57:43 +0000 (09:57 +0100)]
d/control: remove unused dependency

this was a leftover from a previous iteration of the
qmeventd patches

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agouse qmeventd to execute qm cleanup
Dominik Csapak [Wed, 14 Nov 2018 13:59:58 +0000 (14:59 +0100)]
use qmeventd to execute qm cleanup

we reverse the direction of the event socket (this does not
prevent live migration) and point it to wher qmeventd listens

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoadd 'qm cleanup'
Dominik Csapak [Wed, 14 Nov 2018 13:59:57 +0000 (14:59 +0100)]
add 'qm cleanup'

this is intended to be used with qmeventd, to do
the necessary cleanups when qemu crashes or is being
shut down from within the guest

this can also be the point where we could introduce
shutdown/stop/reboot hooks

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoadd qmeventd
Dominik Csapak [Wed, 14 Nov 2018 13:59:56 +0000 (14:59 +0100)]
add qmeventd

this adds a program that can listen to qemu qmp events on a given socket
and if a shutdown event followed by a disconnected socket occurs,
executes qm cleanup with arguments that indicate if the
vm was closed gracefully and whether the guest initiated it

this is useful if we want to cleanup after the qemu process exited,
e.g. tap devices, vgpus, etc.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoAdd missing Build-Depends
Rhonda D'Vine [Mon, 12 Nov 2018 13:59:59 +0000 (14:59 +0100)]
Add missing Build-Depends

These were found while building the package within a clean chroot.

Signed-off-by: Rhonda D'Vine <rhonda@proxmox.com>
5 years agod/control: bump version dependency for pve-edk2-firmware
Thomas Lamprecht [Tue, 13 Nov 2018 14:09:35 +0000 (15:09 +0100)]
d/control: bump version dependency for pve-edk2-firmware

to ensure that we have AAVMF available

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoarm: use virtio gpu by default
Wolfgang Bumiller [Mon, 12 Nov 2018 13:10:44 +0000 (14:10 +0100)]
arm: use virtio gpu by default

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agodon't use amd64-specific cpu options on arm
Wolfgang Bumiller [Mon, 12 Nov 2018 13:10:43 +0000 (14:10 +0100)]
don't use amd64-specific cpu options on arm

FIXME: This function needs proper reorganisation...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoarm: pci addressing, keyboard and ehci controller
Wolfgang Bumiller [Mon, 12 Nov 2018 13:10:42 +0000 (14:10 +0100)]
arm: pci addressing, keyboard and ehci controller

On arm we start off with a pcie bridge pcie.0. We need a
keyboard in addition to the tablet device, and we need to
connect both to an 'ehci' controller.

To do all this, we also pass the $arch variable through a
whole lot of function calls to ultimately also adapt the
hotplug code to take care of the new keyboard device.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoarm: use UART for serial0 instead of a separate device
Wolfgang Bumiller [Mon, 12 Nov 2018 13:10:41 +0000 (14:10 +0100)]
arm: use UART for serial0 instead of a separate device

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoonly use vhost-net for native kvm machines
Wolfgang Bumiller [Mon, 12 Nov 2018 13:10:40 +0000 (14:10 +0100)]
only use vhost-net for native kvm machines

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agouse cortex-a57 as cpu for arm emulation for now...
Wolfgang Bumiller [Mon, 12 Nov 2018 13:10:39 +0000 (14:10 +0100)]
use cortex-a57 as cpu for arm emulation for now...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agomove cpu option creation into separate sub
Wolfgang Bumiller [Mon, 12 Nov 2018 13:10:38 +0000 (14:10 +0100)]
move cpu option creation into separate sub

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agouse qemu-system-aarch64 for arm machines
Wolfgang Bumiller [Mon, 12 Nov 2018 13:10:37 +0000 (14:10 +0100)]
use qemu-system-aarch64 for arm machines

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agouse AAVMF for arm
Wolfgang Bumiller [Mon, 12 Nov 2018 13:10:36 +0000 (14:10 +0100)]
use AAVMF for arm

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agocreate_vm: don't add vmgenid for ARM machines by default
Wolfgang Bumiller [Mon, 12 Nov 2018 13:10:35 +0000 (14:10 +0100)]
create_vm: don't add vmgenid for ARM machines by default

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoadd 'arch' vm configuration
Wolfgang Bumiller [Mon, 12 Nov 2018 13:10:34 +0000 (14:10 +0100)]
add 'arch' vm configuration

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agofix and simplify kvm_version()
Wolfgang Bumiller [Mon, 12 Nov 2018 13:10:33 +0000 (14:10 +0100)]
fix and simplify kvm_version()

This was never actually used, but we want to use it as
alternative to checking /proc/cpuinfo for 'hvm' on ARM.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agofix #1959: add fallback for 'auto' previously set by SLAAC
David Limbeck [Thu, 25 Oct 2018 09:32:45 +0000 (11:32 +0200)]
fix #1959: add fallback for 'auto' previously set by SLAAC

SLAAC previously set 'auto' which is not supported by nocloud network
config. On an up-to-date Ubuntu this should work as it uses 'dhcp' for
both dhcp and SLAAC. For others it was invalid anyway.

Signed-off-by: David Limbeck <d.limbeck@proxmox.com>
5 years agobump version to 5.0-40
Thomas Lamprecht [Mon, 12 Nov 2018 16:28:45 +0000 (17:28 +0100)]
bump version to 5.0-40

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agocheck for $vga->{type} instead of $vga
Dominik Csapak [Mon, 12 Nov 2018 07:40:20 +0000 (08:40 +0100)]
check for $vga->{type} instead of $vga

with commit 55655ebc32ce4eb3fe52f233ec4ac5926b15603f
we changed $vga to a parsed hash instead of a string
and forgot to check the property type in one place

this fixes an issue where a vm with a gpu passed through
with x-vga=on could not start

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoupdate bump to 5.0-39
Thomas Lamprecht [Fri, 9 Nov 2018 15:24:11 +0000 (16:24 +0100)]
update bump to 5.0-39

to include another ready fix in this release

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofix #1969: increase max unused disks
David Limbeck [Mon, 5 Nov 2018 13:02:15 +0000 (14:02 +0100)]
fix #1969: increase max unused disks

increase to 256, same as containers

Signed-off-by: David Limbeck <d.limbeck@proxmox.com>
5 years agobump version to 5.0-39
Thomas Lamprecht [Fri, 9 Nov 2018 15:21:37 +0000 (16:21 +0100)]
bump version to 5.0-39

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agomove nbd_stop up, it's not a completion helper
Thomas Lamprecht [Fri, 9 Nov 2018 15:11:18 +0000 (16:11 +0100)]
move nbd_stop up, it's not a completion helper

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofollowup for VGA memory: improve q35 comment
Thomas Lamprecht [Fri, 9 Nov 2018 13:01:45 +0000 (14:01 +0100)]
followup for VGA memory: improve q35 comment

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofix #1952: make vga memory configurable
Dominik Csapak [Fri, 9 Nov 2018 12:31:09 +0000 (13:31 +0100)]
fix #1952: make vga memory configurable

we change 'vga' to a property string and add a 'memory' property
with this, the user can better control the memory given to the virtual
gpu, this is especially useful for spice/qxl since high resolutions need
more memory

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoAdd `ssd` property to IDE, SATA, and SCSI drives
Nick Chevsky [Sun, 28 Oct 2018 20:41:46 +0000 (16:41 -0400)]
Add `ssd` property to IDE, SATA, and SCSI drives

When enabled, the `ssd` property exposes drives as SSDs (rather than
rotational hard disks) by setting QEMU's `rotation_rate` property [1,
2] on `ide-hd`, `scsi-block`, and `scsi-hd` devices. This is required
to enable support for TRIM and SSD-specific optimizations in certain
guest operating systems that are limited to emulated controller types
(IDE, AHCI, and non-VirtIO SCSI).

This change also unifies the diverging IDE and SATA code paths in
QemuServer::print_drivedevice_full(), which suffered from:
* Code duplication: The only differences between IDE and SATA were in
bus-unit specification and maximum device counts.
* Inconsistent implementation: The IDE code used the new `ide-hd`
and `ide-cd` device types, whereas SATA still relied on the deprecated
`ide-drive` [3, 4] (which doesn't support `rotation_rate`).
* Different feature sets: The IDE code exposed a `model` property that
the SATA code didn't, even though QEMU supports it for both.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1498042
[2] https://lists.gnu.org/archive/html/qemu-devel/2017-10/msg00698.html
[3] https://www.redhat.com/archives/libvir-list/2012-March/msg00684.html
[4] https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg02024.html

Signed-off-by: Nick Chevsky <nchevsky@gmail.com>
5 years agobump version to 5.0-38
Wolfgang Bumiller [Thu, 18 Oct 2018 10:29:11 +0000 (12:29 +0200)]
bump version to 5.0-38

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoadd second qmp socket with qemu 2.12
Dominik Csapak [Wed, 17 Oct 2018 12:31:19 +0000 (14:31 +0200)]
add second qmp socket with qemu 2.12

we will use this for the qmeventd, but we have to limit this
to qemu 2.12, because we cannot add this during a live migration

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agobump version to 5.0-37
Wolfgang Bumiller [Tue, 16 Oct 2018 12:54:55 +0000 (14:54 +0200)]
bump version to 5.0-37

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agolower hv_synic, hv_stimer requirement to qemu 2.12
Wolfgang Bumiller [Tue, 16 Oct 2018 12:52:27 +0000 (14:52 +0200)]
lower hv_synic, hv_stimer requirement to qemu 2.12

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoqemu_img_convert : use "-l snapshot.name" instead -s for internal snapshot
Alexandre Derumier [Sun, 7 Oct 2018 17:15:22 +0000 (19:15 +0200)]
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/

5 years agoadd virtio gpu to qemuserver options
Dominik Csapak [Thu, 27 Sep 2018 11:51:05 +0000 (13:51 +0200)]
add virtio gpu to qemuserver options

and sort the list

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agobump version to 5.0-36
Thomas Lamprecht [Mon, 24 Sep 2018 09:39:01 +0000 (11:39 +0200)]
bump version to 5.0-36

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agouse qemu's blockdev-snapshot functions
Wolfgang Bumiller [Mon, 24 Sep 2018 08:44:22 +0000 (10:44 +0200)]
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>
5 years agorestore vm: vmgenid: fixup regex capturing group reference
Thomas Lamprecht [Wed, 19 Sep 2018 12:15:56 +0000 (14:15 +0200)]
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>
5 years agorollback: vmgenid: comment why we regenerate vmgenid
Thomas Lamprecht [Wed, 19 Sep 2018 11:34:48 +0000 (13:34 +0200)]
rollback: vmgenid: comment why we regenerate vmgenid

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoschema: vmgenid: reword desscription, add verbose one and document default
Thomas Lamprecht [Wed, 19 Sep 2018 11:33:40 +0000 (13:33 +0200)]
schema: vmgenid: reword desscription, add verbose one and document default

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agorestore vm: vmgenid: small code cleanup
Thomas Lamprecht [Wed, 19 Sep 2018 11:31:19 +0000 (13:31 +0200)]
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>
5 years agofix #1908: add vmgenid config/device
Dominik Csapak [Wed, 19 Sep 2018 09:35:11 +0000 (11:35 +0200)]
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>
5 years agofix version check in qemu_machine_feature_enabled
Wolfgang Bumiller [Tue, 18 Sep 2018 07:35:26 +0000 (09:35 +0200)]
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>
5 years agobump version to 5.0-35
Thomas Lamprecht [Mon, 17 Sep 2018 13:30:55 +0000 (15:30 +0200)]
bump version to 5.0-35

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agod/control: bump version dependency on libpve-guest-common-perl
Thomas Lamprecht [Mon, 17 Sep 2018 13:34:19 +0000 (15:34 +0200)]
d/control: bump version dependency on libpve-guest-common-perl

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agod/control: add libpve-guest-common-perl as build dependency
Thomas Lamprecht [Mon, 17 Sep 2018 13:33:56 +0000 (15:33 +0200)]
d/control: add libpve-guest-common-perl as build dependency

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoadd new tests for 'runningmachine' and rollback
Dominik Csapak [Fri, 14 Sep 2018 12:08:44 +0000 (14:08 +0200)]
add new tests for 'runningmachine' and rollback

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agofixup comment formatting
Thomas Lamprecht [Mon, 17 Sep 2018 13:49:14 +0000 (15:49 +0200)]
fixup comment formatting

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoensure correct machine type gets saved on snapshot
Dominik Csapak [Fri, 14 Sep 2018 12:08:43 +0000 (14:08 +0200)]
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>
5 years agouse new snapshot rollback hook to handle machine type
Dominik Csapak [Fri, 14 Sep 2018 12:08:42 +0000 (14:08 +0200)]
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>
5 years agoqemu 3.0 : add hv_synic && hv_stimer hyperv enlightment
Alexandre Derumier [Fri, 31 Aug 2018 13:43:01 +0000 (15:43 +0200)]
qemu 3.0 : add hv_synic && hv_stimer hyperv enlightment

This fix cpu bug on last win10 updates

5 years agobump version to 5.0-34
Thomas Lamprecht [Thu, 13 Sep 2018 09:39:04 +0000 (11:39 +0200)]
bump version to 5.0-34

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoimprove 'pending changes' message for clone
Dominik Csapak [Wed, 12 Sep 2018 08:53:52 +0000 (10:53 +0200)]
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>
5 years agod/control: add build dependency to qemu-utils
Thomas Lamprecht [Tue, 4 Sep 2018 08:22:43 +0000 (10:22 +0200)]
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>
5 years agod/control: add libio-multiplex-perl as build dependency
Thomas Lamprecht [Tue, 4 Sep 2018 08:14:41 +0000 (10:14 +0200)]
d/control: add libio-multiplex-perl as build dependency

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoadd ibpb, ssbd, virt-ssbd, amd-ssbd, amd-no-ssb, pdpe1gb cpu flags
Alexandre Derumier [Mon, 20 Aug 2018 15:53:18 +0000 (17:53 +0200)]
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/

5 years agofix #1865: CloudInit doesn't add IPv6
David Limbeck [Wed, 22 Aug 2018 09:35:49 +0000 (11:35 +0200)]
fix #1865: CloudInit doesn't add IPv6

Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoqm rescan: fix typo in dryrun description
Thomas Lamprecht [Tue, 21 Aug 2018 07:21:41 +0000 (09:21 +0200)]
qm rescan: fix typo in dryrun description

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version to 5.0-33
Thomas Lamprecht [Mon, 20 Aug 2018 12:43:37 +0000 (14:43 +0200)]
bump version to 5.0-33

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoFix #1242 : clone_disk : call qga fstrim after clone
Stoiko Ivanov [Wed, 1 Aug 2018 18:29:05 +0000 (20:29 +0200)]
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>
5 years agoMake agent a property string, add fstrim_cloned_disks
Stoiko Ivanov [Wed, 1 Aug 2018 18:29:04 +0000 (20:29 +0200)]
Make agent a property string, add fstrim_cloned_disks

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
5 years agovmstatus: define return propertries
Dietmar Maurer [Wed, 1 Aug 2018 10:55:29 +0000 (12:55 +0200)]
vmstatus: define return propertries

We can use the same properties in vmlist and vmstatus.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
5 years agovmlist: document 'uptime' and 'cpus' returmn value
Dietmar Maurer [Tue, 31 Jul 2018 11:31:49 +0000 (13:31 +0200)]
vmlist: document 'uptime' and 'cpus' returmn value

5 years agobump version to 5.0-32
Thomas Lamprecht [Mon, 30 Jul 2018 08:56:15 +0000 (10:56 +0200)]
bump version to 5.0-32

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoagent: import used check_agent_error method
Thomas Lamprecht [Mon, 30 Jul 2018 08:59:44 +0000 (10:59 +0200)]
agent: import used check_agent_error method

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoapi/agent: do not dereference params hash before passing to agent_cmd
Thomas Lamprecht [Mon, 30 Jul 2018 08:41:48 +0000 (10:41 +0200)]
api/agent: do not dereference params hash before passing to agent_cmd

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version to 5.0-31
Thomas Lamprecht [Mon, 30 Jul 2018 08:25:29 +0000 (10:25 +0200)]
bump version to 5.0-31

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoadd missing import of 'agent_cmd'
Dominik Csapak [Mon, 30 Jul 2018 06:24:59 +0000 (08:24 +0200)]
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>
5 years agoFix #1717: delete snapshot when vm running and drive not attached
Alexandre Derumier [Wed, 11 Jul 2018 11:55:53 +0000 (13:55 +0200)]
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

5 years agobump version to 5.0-30
Thomas Lamprecht [Tue, 17 Jul 2018 09:39:31 +0000 (11:39 +0200)]
bump version to 5.0-30

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoqm: move 'agent' command into 'guest' comand group
Thomas Lamprecht [Wed, 11 Jul 2018 11:27:51 +0000 (13:27 +0200)]
qm: move 'agent' command into 'guest' comand group

with a backwards compatible alias

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoqm: rename 'ga' command group to 'guest'
Thomas Lamprecht [Thu, 12 Jul 2018 12:44:50 +0000 (14:44 +0200)]
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>
5 years agoFix SPICE multi-monitor mode on q35
Dzmitry Kotsikau [Wed, 4 Jul 2018 11:51:32 +0000 (14:51 +0300)]
Fix SPICE multi-monitor mode on q35

Signed-off-by: Dzmitry Kotsikau <dkotsikau@gmail.com>
5 years agoqemu agent: fixup error message letter-case
Thomas Lamprecht [Wed, 11 Jul 2018 09:26:00 +0000 (11:26 +0200)]
qemu agent: fixup error message letter-case

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoimplement file-write via guest-agent in the api
Dominik Csapak [Tue, 26 Jun 2018 12:15:49 +0000 (14:15 +0200)]
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>
5 years agoimplement file-read api call via guest-agent
Dominik Csapak [Tue, 26 Jun 2018 12:15:48 +0000 (14:15 +0200)]
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>
5 years agoadd exec(-status) to qm
Dominik Csapak [Tue, 26 Jun 2018 12:15:47 +0000 (14:15 +0200)]
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>
5 years agoimplement agent exec api call
Dominik Csapak [Tue, 26 Jun 2018 12:15:46 +0000 (14:15 +0200)]
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>
5 years agoadd 'passwd' to qm
Dominik Csapak [Tue, 26 Jun 2018 12:15:45 +0000 (14:15 +0200)]
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>
5 years agoimplement set-user-password guest agent api call
Dominik Csapak [Tue, 26 Jun 2018 12:15:44 +0000 (14:15 +0200)]
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>
5 years agoadd Agent helper package
Dominik Csapak [Tue, 26 Jun 2018 12:15:43 +0000 (14:15 +0200)]
add Agent helper package

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoqm: add more return schema definitions
Dietmar Maurer [Tue, 10 Jul 2018 11:59:37 +0000 (13:59 +0200)]
qm: add more return schema definitions

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoqm rescan: add dryrun option
Thomas Lamprecht [Wed, 11 Jul 2018 06:40:07 +0000 (08:40 +0200)]
qm rescan: add dryrun option

tells an user what would get touched, so he has a chance to fix
unwanted things before changes are actually made.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agorescan update_disksize: be more verbose
Thomas Lamprecht [Wed, 11 Jul 2018 06:40:06 +0000 (08:40 +0200)]
rescan update_disksize: be more verbose

Else an user has no idea what, or if something happened.

Gets printed to tty when using qm rescan or to tasklog for the case
where we do a rescan after restoring a backup.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agorescan: comment that this is a temporarily workaround
Thomas Lamprecht [Thu, 5 Jul 2018 06:46:11 +0000 (08:46 +0200)]
rescan: comment that this is a temporarily workaround

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoFix #1650: add content type filter to rescan
Alwin Antreich [Tue, 3 Jul 2018 15:41:09 +0000 (17:41 +0200)]
Fix #1650: add content type filter to rescan

Unused disk(s) appeared after a rescan of storages. Especially shown
with ceph pools, where two storage entries are made, <storage>_ct and
<storage>_vm. The rescan method did include images from both storages.

This patch filters any storage not containing the content type 'images'.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
5 years agod/control: update pve-common version dependency
Thomas Lamprecht [Wed, 27 Jun 2018 11:40:42 +0000 (13:40 +0200)]
d/control: update pve-common version dependency

as we use the new param_mapping functionallity from PVE::CLIHandler

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoqm: PVE::PTY is not used anymore
Thomas Lamprecht [Wed, 27 Jun 2018 11:58:33 +0000 (13:58 +0200)]
qm: PVE::PTY is not used anymore

5 years agouse get_standard_mapping for cipassword_map
Dominik Csapak [Mon, 25 Jun 2018 10:33:26 +0000 (12:33 +0200)]
use get_standard_mapping for cipassword_map

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agobump version to 5.0-29
Thomas Lamprecht [Fri, 15 Jun 2018 10:13:34 +0000 (12:13 +0200)]
bump version to 5.0-29

5 years agod/control: update version dependency on pve-common
Thomas Lamprecht [Fri, 15 Jun 2018 10:11:01 +0000 (12:11 +0200)]
d/control: update version dependency on pve-common

To ensure we have the enw Systemd module available to use

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agouse the new PVE::SystemD package
Wolfgang Bumiller [Fri, 15 Jun 2018 09:00:53 +0000 (11:00 +0200)]
use the new PVE::SystemD package

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agouse 'system_wakeup' to resume suspended vms
Dominik Csapak [Wed, 13 Jun 2018 09:17:26 +0000 (11:17 +0200)]
use 'system_wakeup' to resume suspended vms

when a vm is suspended (e.g. autosuspend on windows)
we detect that it is not running, display the resume button,
but 'cont' does not wakeup the system from suspend

with this we can wake up suspended vms

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoapi create: cleanup the new config log on error
Wolfgang Bumiller [Tue, 12 Jun 2018 08:50:41 +0000 (10:50 +0200)]
api create: cleanup the new config log on error

Otherwise cases like trying to restore a protected VM would
leave a lock in the config.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>