]> git.proxmox.com Git - qemu-server.git/log
qemu-server.git
5 years agoFix #1924: add snapshot parameter
Rhonda D'Vine [Wed, 30 Jan 2019 13:43:38 +0000 (14:43 +0100)]
Fix #1924: add snapshot parameter

The qm CLI command offer the config and showcmd functions. Both of those
outputs may vary with respect to a given snapshot. This adds a switch
that shows the corresponding snapshot's config and command line.

The code needs a newer libpve-guest-common-perl, thus bumping the
dependency.

Signed-off-by: Rhonda D'Vine <rhonda@proxmox.com>
5 years agoallow explicit set vga with gpu passthrough
Dominik Csapak [Mon, 21 Jan 2019 14:56:54 +0000 (15:56 +0100)]
allow explicit set vga with gpu passthrough

this patch allows the user to explicitely set a virtual vga,
even when using the 'x-vga' flag, this is sometimes necessary,
as some users need the 'x-vga' flag on the pci device,
but still want to use a virtual vga

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoapi/create: print correct error message if cleanup fails
Thomas Lamprecht [Sat, 26 Jan 2019 13:39:38 +0000 (14:39 +0100)]
api/create: print correct error message if cleanup fails

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofollowup: HV ID description
Thomas Lamprecht [Fri, 25 Jan 2019 16:10:49 +0000 (17:10 +0100)]
followup: HV ID description

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoallow explicit hv-vendor-id
Dominik Csapak [Mon, 21 Jan 2019 14:56:53 +0000 (15:56 +0100)]
allow explicit hv-vendor-id

with this, a user can set the hv_vendor_id independently of
any 'x-vga=on' setting he may or may not have configured.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agobump version to 5.0-45
Thomas Lamprecht [Mon, 21 Jan 2019 09:42:34 +0000 (10:42 +0100)]
bump version to 5.0-45

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agomigrate: fix local disk migration with online VMs
Thomas Lamprecht [Thu, 17 Jan 2019 09:53:36 +0000 (10:53 +0100)]
migrate: fix local disk migration with online VMs

commit 4530494bf9f3d45c4a405c53ef3688e641f6bd8e introduced an
regression with local disk migrations if the VM is online and thus
needs to live migrated and no target storage was passed as parameter.

We made the hack to write "1" to the targetstorage option in this
case obsolete, but it was still used on deciding if there are any
drives to mirror at all. Here it is enough to check if there are any
'online_local_volumes' because that hash gets only filled if we can
and are told to live mirror local disk on migrations anyway. Also,
we abort early if local disks are found and the 'with-local-disks'
option is not set.

This was reported at:
https://forum.proxmox.com/threads/livemigration-with-localdisk-doesnt-coppy-and-data-from-the-hdds-anymore.50744/

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofix #2003: give 'qm terminal' a terminal over ssh
Dominik Csapak [Thu, 29 Nov 2018 09:51:50 +0000 (10:51 +0100)]
fix #2003: give 'qm terminal' a terminal over ssh

this prevents a connection loop when using novnc on a vm with
vga: serialX
when proxying via ssh

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agovnc/termproxy: use ssh_info_to_command for ssh tunnel
Dominik Csapak [Thu, 29 Nov 2018 09:51:49 +0000 (10:51 +0100)]
vnc/termproxy: use ssh_info_to_command for ssh tunnel

this way we have two places less where we define a ssh cmd

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoconfig2command test: mock kernel_has_vhost_net
Thomas Lamprecht [Thu, 20 Dec 2018 09:44:13 +0000 (10:44 +0100)]
config2command test: mock kernel_has_vhost_net

just return true for now, the use is guarded by an 'is_native($arch)'
check anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoconfig2command test: diff: use /proc/self/fd
Thomas Lamprecht [Thu, 20 Dec 2018 09:38:07 +0000 (10:38 +0100)]
config2command test: diff: use /proc/self/fd

/dev/fd works only through some compatibility hacks in some shells,
use the correct one for Linux: /proc/self/fd/*

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoconfig2command test: mock kvm_version too
Thomas Lamprecht [Thu, 20 Dec 2018 09:27:21 +0000 (10:27 +0100)]
config2command test: mock kvm_version too

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version to 5.0-44
Thomas Lamprecht [Thu, 20 Dec 2018 09:18:48 +0000 (10:18 +0100)]
bump version to 5.0-44

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agocleanup: use a local $override_targetsid variable
Wolfgang Bumiller [Thu, 20 Dec 2018 08:55:12 +0000 (09:55 +0100)]
cleanup: use a local $override_targetsid variable

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agofix local disk migration when no target storage is set
Thomas Lamprecht [Thu, 20 Dec 2018 08:55:11 +0000 (09:55 +0100)]
fix local disk migration when no target storage is set

the check for targetstorage in:
if ($self->{running} && $self->{opts}->{targetstorage} && $local_volumes->{$volid}->{ref} eq 'config') {

was obsolete, as we always set the tragetstorage opts variable to '1'
in a broader "use same sid for remote local" check above.
So removing it leads to the same if truthtable but fixes the
check if we should fallback to the volume's SID if targetstorage is
not set, as else it seemed to be always set, and '1' is naturally not
a correct stroage ID.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agofix #1013 : migrate : sync_disk : --targetstorage with offline disk
Alexandre Derumier [Thu, 20 Dec 2018 08:55:10 +0000 (09:55 +0100)]
fix #1013 : migrate : sync_disk : --targetstorage with offline disk

targetsid was not used, for disk unused (offline copy)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoadd win7 pcie quirk
Dominik Csapak [Mon, 17 Dec 2018 12:57:08 +0000 (13:57 +0100)]
add win7 pcie quirk

Win7 is very picky about pcie assignments and fails with
'error 12' the way we add hospci devices.

To combat that, we simply give the hostpci device a normal port
instead.

Start with address 0x10, so that we have space before those devices,
and between them and the ones configured in pve-q35.cfg should we
need it in the future.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agofix #2032: check that type is set before using
Dominik Csapak [Mon, 17 Dec 2018 08:19:58 +0000 (09:19 +0100)]
fix #2032: check that type is set before using

When not setting 'vga' we would get a warning:

Use of uninitialized value $type in string eq at
/usr/share/perl5/PVE/QemuServer.pm line 2026.

This patch changes the order of the conditions and checks if $type is set
before using it, so that we do not get the warning anymore.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agot/cfg2cmd: ensure tests can pass again
Thomas Lamprecht [Mon, 10 Dec 2018 17:00:03 +0000 (18:00 +0100)]
t/cfg2cmd: ensure tests can pass again

the change to use a real diff to check tests, with it's nicer output
for failing cases, failed to ensure that the test system knew if a
case passed - earlier done indirectly by 'is_deeply', thus add a
manual 'pass' call if the tes was OK.
Further, the firs test failing aborted everything, which isn't to
nice, normally it's much more convenient if all test get run and one
can view at the results of all of them. So put the diff in an eval
and fail/note the test manually.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agot/cfg2cmd: replace is_deeply with diff
Wolfgang Bumiller [Mon, 10 Dec 2018 17:00:02 +0000 (18:00 +0100)]
t/cfg2cmd: replace is_deeply with diff

(The diff() sub is copied from our pve-common's network
interfaces test scripts)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Acked-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agot/cfg2cmd: mock iscsi initiator name
Wolfgang Bumiller [Mon, 10 Dec 2018 17:00:01 +0000 (18:00 +0100)]
t/cfg2cmd: mock iscsi initiator name

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Acked-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoadd config to command tests
Thomas Lamprecht [Mon, 10 Dec 2018 17:00:00 +0000 (18:00 +0100)]
add config to command tests

To have a better safety net for not introducing regressions and also
some functional checks as the QEMU command defines the layout
behavior of the VM.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoadd the rest of themissing lock types
Wolfgang Bumiller [Tue, 11 Dec 2018 09:09:21 +0000 (10:09 +0100)]
add the rest of themissing lock types

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoadd 'clone' to lock schema definition/confdesc.
Stoiko Ivanov [Tue, 4 Dec 2018 19:52:46 +0000 (20:52 +0100)]
add 'clone' to lock schema definition/confdesc.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
5 years agovga: allow 'none'
Dominik Csapak [Thu, 6 Dec 2018 09:17:26 +0000 (10:17 +0100)]
vga: allow 'none'

so that one can explicitly disable the vga without having to specify
a serial port as display, this is mostly useful for very special
and custom gpu passthrough setups which have to be specified with
'args' and for setups which do not care about any display (not even serial)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agofix #1267: move args to the end of qemu commandline
Dominik Csapak [Thu, 6 Dec 2018 09:17:25 +0000 (10:17 +0100)]
fix #1267: move args to the end of qemu commandline

there is nothing that should be really affected by this, but
even then, this option is only for experts and people using this
should know what they are doing

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoclone_disk : cloudinit drive: don't clone snapname
Alexandre Derumier [Fri, 7 Dec 2018 06:45:55 +0000 (07:45 +0100)]
clone_disk : cloudinit drive: don't clone snapname

we don't snapshot cloudinit drive,

this fix "qm clone <vmid> <targetvmid> --snapname mysnap" when a cloudinit drive exist

5 years agobump version to 5.0-43
Thomas Lamprecht [Thu, 29 Nov 2018 11:58:12 +0000 (12:58 +0100)]
bump version to 5.0-43

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobetter cleanup logging for migration
Dominik Csapak [Wed, 28 Nov 2018 09:40:45 +0000 (10:40 +0100)]
better cleanup logging for migration

if we migrate a vm we call cleanup but the logging looks like:

Starting cleanup for 101
trying to acquire lock...
 OK
Configuration file 'nodes/pve-ceph-01/qemu-server/101.conf' does not exist

with this patch, we omit any logging in the case we do not have the config,
since we cannot know what to clean up

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agofollowup: add FIXME comment
Thomas Lamprecht [Tue, 27 Nov 2018 12:45:23 +0000 (13:45 +0100)]
followup: add FIXME comment

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofix check if machine type is q35
Dominik Csapak [Tue, 27 Nov 2018 10:32:17 +0000 (11:32 +0100)]
fix check if machine type is q35

When live migrating, with a q35 machine will get the qemu version
encoded in the machine type, for example,'pc-q35-2.12', so we need to
allow this too and cannot expect that all q35 machine have
q35' in verbatim as their type.

So, when migrating such a machine live, we missed to include the q35
cfg because we didn't allowed versioned q35 machine types, which then
failed the migration.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agobump version to 5.0-42
Thomas Lamprecht [Thu, 22 Nov 2018 10:27:35 +0000 (11:27 +0100)]
bump version to 5.0-42

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump libpve-common-perl version dependency to >= 5.0-43
Thomas Lamprecht [Thu, 22 Nov 2018 10:27:17 +0000 (11:27 +0100)]
bump libpve-common-perl version dependency to >= 5.0-43

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agouse improved lspci
Dominik Csapak [Tue, 20 Nov 2018 16:13:40 +0000 (17:13 +0100)]
use improved lspci

since lspci does not split between id and function anymore,
there is no need to plug id + function together

also we can remove the capture groups from PCIRE
since parse_property_string does this check for us

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoadd mediated devices support
Dominik Csapak [Tue, 20 Nov 2018 16:13:39 +0000 (17:13 +0100)]
add mediated devices support

with this, we are able to create and use mediated devices,
which include Intel GVT-g (aka KVMGT) and Nvidia vGPUs, and probably more
types of devices in the future

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
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>