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

2047 Commits

Author SHA1 Message Date
Thomas Lamprecht
c5a4c92cd9 qxl max_outputs: ostype can be undefined, assume linux
Out code behaves like either l26 or other when the ostype is
undefined, both are not common as our webinterface _always_ sets the
ostype.

If one configured QXL with a VM as output device but does not has an
ostype set, and that works without "max_outputs=4" it really should
work with none too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-20 15:29:12 +01:00
Aaron Lauterer
6021c7a5ed print_vga_device: fix qxl displays on Linux guests
with pve-qemu-4.0.1-3 or higher it was not possible in a spice remote
session to enable more displays on the fly in linux guests.

Adding the `max_outputs` parameter to the qxl device manually restores
the functionality.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-11-20 15:05:43 +01:00
Thomas Lamprecht
9a9ba5f857 get_cpu_options: reuse ostype variable
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-20 15:05:43 +01:00
Thomas Lamprecht
a52692609c ostype: update verbose description
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-20 15:05:43 +01:00
Thomas Lamprecht
8a3f3851f2 cfg2cmd: add win10 spice test
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-19 16:12:20 +01:00
Thomas Lamprecht
7fe8b44c54 clone: pre-create cloud-init disk for destination
While we may not want to copy the cloudinit disk/drive, we still need
to create+allocate the volume, else the next start complains about a
missing CI drive..

fixes commit 7d6c99f0a0.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-19 10:29:58 +01:00
Wolfgang Bumiller
e5a66e48ba avoid cyclic reference
this otherwise leaks memory

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-19 09:26:45 +01:00
Matt Dunwoodie
4865715861 Add 'type' to agent_fmt
This adds an extra field to agent_fmt that specifes the type of guest
agent connection to use. Currently there is no choice, and defaults to
virtio-serial. Since qemu-ga also runs over isa-serial, this allows OSes
such as NetBSD and OpenBSD, which do not have support for virtio-serial,
to run a qemu-ga.

This is an optional field, which leaves the default as virtio-serial. As
it doesn't change the default, it will require no change to older
configuration files.

Signed-off-by: Matt Dunwoodie <ncon@noconroy.net>
2019-11-18 16:04:28 +01:00
Aaron Lauterer
255e9c546c api/migration: fix autocomplete for targetstorage
Show storages configured for the target node and not for the current one
because they can be different.

Duplicated the `complete_storage` sub and extended it to extract the
targetnode from the parameters to pass it into the storage_check_enabled
function.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-11-18 15:42:18 +01:00
Fabian Grünbichler
340d8b7510 bump version to 6.0-14
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-18 12:13:30 +01:00
Fabian Grünbichler
d3f7bdfe83 d/control: add (build-)depends on libpve-cluster-perl
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-18 12:10:25 +01:00
Fabian Grünbichler
b24e1ac224 refactor migration IP retrieval
since PVE::Cluster::get_local_migration_ip does not exist anymore. this
is basically an inlined version, since this is the only remaining caller
that we actually want to keep.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-18 12:10:25 +01:00
Fabian Grünbichler
95896f80c2 use PVE::RRD for RRD data
refactored from PVE::Cluster. same code, same semantics, different file.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-18 12:10:25 +01:00
Fabian Grünbichler
f42ea29b18 use PVE::SSHInfo
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-18 12:10:25 +01:00
Fabian Grünbichler
48cf040f75 use PVE::DataCenterConfig
to make sure that the corresponding cfs_read_file works() works.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-18 12:10:25 +01:00
Thomas Lamprecht
78b7776309 d/control: bump version dependency to ha-manager
so that we have the new "ha-manager crm-command" available

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-14 14:44:14 +01:00
Fabian Ebner
1805fac3a7 Use crm-command stop to allow shutdown with timeout and hard stop for HA
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2019-11-14 14:33:02 +01:00
Dominik Csapak
8baf8bc77e fix destroy_vm by using correct Config package
We are in the QemuServer package not in LXC, so use the correct
package for the Config, namely QemuConfig

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-14 10:04:35 +01:00
Thomas Lamprecht
3c1c3fe6a1 followup: what vs. why comment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-11 18:05:20 +01:00
Oguz Bektas
66026117b0 qmreboot: clear reboot request if reboot fails
the reboot request is only cleaned in the vm_start path, so if reboot
fails for some reason, the request still exists. this causes an
unintentional reboot when a shutdown/stop/hibernate is called.

to mitigate, we can just clear the reboot request in case of an error.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-11-11 18:03:44 +01:00
Dominik Csapak
ba728fb535 fix #2457: ga: set-user-password: increase maxLength of password
SHA-512 crypted passwords are longer than 64 byte, and it also does
not make sense to limit passwords to such a short length.  Increase
to 1024, that should be enough for a while, but still limits maximal
password payload to avoid DOS or the like.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-11 16:28:44 +01:00
Thomas Lamprecht
b924c4355e api/create: remove some empty lines and sort
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-08 17:05:53 +01:00
Thomas Lamprecht
b04ea58453 destroy_vm: allow to pass new config and lock instead
This brings qemu more in line with containers, and it's nicer to
allow passing the replacement config if we want to keep it, instead
of setting a "memory: 128" config.

Use that to lock it on removal before final deletion, and on legacy
tar archive restore, in between old VM destruction and new
restoration.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-08 17:03:30 +01:00
Thomas Lamprecht
7dc7f315f3 restore_tar_archive: cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-08 15:43:22 +01:00
Thomas Lamprecht
a2f50f0172 destroy_vm: refactor+cleanup and continue on unused disk removal errors
it has some potential semantic change too, i.e., the Storage
vdisk_list call is not wrapped by eval anymore, put as
we did some (unguarded) storage things before that call I'd say that
that does not matters much..

We try to clean all unused disks too, even if one deletion fails

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-08 15:38:23 +01:00
Thomas Lamprecht
4b0269379b followup: make comment a bit shorter/more concise
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-08 15:02:50 +01:00
Dominic Jäger
9b4e53889b restore_tar_archive: Add skiplock to destroy_vm
When calling qmrestore a config file is created and locked with a lock
property. The following destroy_vm has been impossible as skiplock has not
been set.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2019-11-08 14:51:49 +01:00
Fabian Grünbichler
e987ca201b d/control: add build-dependency on pkg-config
needed to find libjson-c-dev headers for qmeventd

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-08 11:22:51 +01:00
Fabian Grünbichler
8bc27da653 d/control: add build-dependency on pve-edk2-firmware
needed for config2command tests

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-08 11:22:51 +01:00
Fabian Grünbichler
3fd78fdd9b d/control: add build-dependency on pve-qemu-kvm
instead of qemu-utils, since we actually depend on files from our qemu
package for some tests.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-08 11:22:51 +01:00
Fabian Grünbichler
b4dab55026 test: mock PVE::Storage for all tests
since the prepare step also attempts to read /etc/pve/storage.cfg

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-08 11:22:51 +01:00
Fabian Grünbichler
9bfca2ca13 test: mock PVE::ReplicationConfig->new
to allow tests to finish without running, functional pmxcfs instance.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-08 11:22:51 +01:00
Fabian Grünbichler
425441e6fa move 'use UUID' statement to correct file
and add the libuuid-perl package to build-depends as well.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-08 11:22:51 +01:00
Thomas Lamprecht
7be54044ef bump version to 6.0-13
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 17:46:10 +01:00
Wolfgang Bumiller
56afd466dd QMPClient: add destructor
Explicitly close leftover connections in the destructor,
otherwise the IO::Multiplex instance can be leaked causing
the qmp connection to never be closed.

This could occur for instance when cancelling vzdump with
ctrl+c with extremely unlucky timing...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-10-30 10:36:51 +01:00
Thomas Lamprecht
73a4470a8f followup: nit-pick code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-29 19:11:21 +01:00
Thomas Lamprecht
c75bf16117 qm importdisk: tell user to what VM disk we actually imported
as else one has no idea what the imported disk is, especially if
multiple unused disks are already present..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-29 19:11:21 +01:00
Thomas Lamprecht
5600c5b22f cleanup do_import, s/optional/params/ and move skiplock into params
mixed with indentation changes a whole lot of other changes which
should normally not mixed to much together, but this is all a bit
tangled and I'm not sure if splitting it into two or three parts
would help anybody.. just use "-w" (ignore whitespace changes) when
looking at the diff..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-29 19:11:21 +01:00
Dominic Jäger
439390e868 Import OVF: Lock config with "lock" property
Previously a VMID conflict was possible when creating a VM on another node
between locking the config with lock_config_full and writing to it for the
first time with write_config.

Using create_and_lock_config eliminates this possibility. This means that now
the "lock" property is set in the config instead of using flock only.

$param was empty when it was assigned the three values "name", "memory" and
"cores" before being assigned to $conf later on. Assigning those values
directly to $conf avoids confusion about what the two variables contain.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2019-10-29 19:11:21 +01:00
Dominic Jäger
7f384190de Add skiplock to do_import
Functions like qm importovf can now set the "lock" property in a config file
before calling do_import.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2019-10-29 19:11:21 +01:00
Dominic Jäger
b406ab6342 replace remaining vm_destroy call-sites with destroy_vm
This function has been used in one place only into which we inlined its
functionality. Removing it avoids confusion between vm_destroy and vm_destroy.

The whole $importfn is executed in a lock_config_full.
As a consequence, for the inlined code:
1. lock_config is redundant
2. it is not possible that the VM has been started (check_running) in the
    meanwhile
Additionally, it is not possible that the "lock" property has been written into
the VM's config file (check_lock) in the meanwhile

Add warning after eval so that it does not go unnoticed if it ever comes into
action.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2019-10-29 19:11:02 +01:00
Thomas Lamprecht
93981fa799 refactor hugepages_size conf
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-29 17:58:53 +01:00
Thomas Lamprecht
71aba4eac3 refactor hugepages_size
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-29 17:49:37 +01:00
Stefan Reiter
062a7ea714 hugepages: fix memory size checking
The codepath for "any" hugepages did not check if memory size was even,
leading to the code below trying to allocate half a hugepage (e.g. VM
with 2049MiB RAM would lead to 1024.5 2kB hugepages).

Also improve error message for systems with only 1GB hugepages enabled.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-10-29 16:52:54 +01:00
Thomas Lamprecht
331a5079e1 d/control: bump version dependency to pve-common
ensures we have the new get_host_arch method replacement in common
available

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-29 16:06:56 +01:00
Stefan Reiter
cc111f2ab5 Use get_host_arch from PVE::Tools
...now that it no longer does LXC-specific stuff. Removes a FIXME.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-10-29 16:05:37 +01:00
Thomas Lamprecht
7c2d9b4089 [no-change] sort and group module use
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-29 15:59:10 +01:00
Thomas Lamprecht
0600c3bf07 runs_at_least_qemu_version: propagate QMP errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-29 15:58:42 +01:00
Fabian Ebner
9270672e67 fix typo in migration cleanup error message
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-28 11:30:10 +01:00
Dominik Csapak
84a50d6ef0 fix #2434: extend machine regex
with qemu 4.0.1, there is now a machine type pc-q35-4.0.1 which does not fit
into our regex

this broke live migration of q35, as we give the machine type (incl version
info) to 'qm start' on the target node, which checks it against the
JSONSchema

to fix this, extend the regex to allow any number of version levels,
for q35, i440fx and virt (to be more future proof)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-10-25 15:03:32 +02:00