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

1932 Commits

Author SHA1 Message Date
Thomas Lamprecht
8752e5a3ec move qmeventd to own directory
It's really not nice if such many files, source code, meta-files, …
linger around in the top level directory..

Also, cleanup the build a bit, i.e., use LDFLAGS as dpkg-buildpackage
can set some LDFLAGS so it'd be nice if both CFLAFGS and LDFLAGS have
the same (related) ones.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-24 18:57:54 +02:00
Thomas Lamprecht
64e7017e44 buildsys: use $(MAKE) instead of make
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-24 18:06:16 +02:00
Thomas Lamprecht
89e50385a8 buildsys: omit manual manpage gzip, done by debhelpers
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-24 18:03:46 +02:00
Thomas Lamprecht
ed94b2adaa followup: reorder error so that $volid is last (potential long)
and add "current" as keyword, further remove the parenthesis for the
post-if, to adapt to Proxmox general perl code style

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-23 18:26:27 +02:00
Tim Marx
f8b829aaba add check to resize disk if current size could not be determined
This check ensures that disks aren't unintentionally shrunken, if the
size is zero due to an underlying problem.
2019-09-23 18:25:01 +02:00
Thomas Lamprecht
fda7291362 followup: add newline in warn to avoid extra perl-internal info
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-23 13:15:30 +02:00
Fabian Ebner
1373938627 Improve handling and description of migrate with --online
Thanks to Stefan and Thomas for the suggestions.

Changes from v1:
* update parameter description
* warn instead of die

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2019-09-23 13:12:08 +02:00
Thomas Lamprecht
f70a6ea97d api: config deletion: avoid regex on undefined values
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-23 12:53:04 +02:00
Dominik Csapak
4c1f3929ea api: deletion: check also pending values for serial/usb
otherwise a user with only VM.Config.HWType cannot
delete a 'pending' usbX: spice or serial: socket option

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-09-23 11:24:57 +02:00
Thomas Lamprecht
97ef535658 followup: fix usb3 description, SPICE is OK now
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-23 10:25:01 +02:00
Aaron Lauterer
a9ce7583cf usb: Fix local resource check of Spice USB devices
The check relied on the fact that in a regular use case a usb device of
type spice would not have any other settings like `usb3=1`. An exact
match worked fine for this.

This patch changes the behaviour and makes it possible to migrate VMs
with Spice USB devices that have additional usb options set.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-09-21 13:42:47 +02:00
Thomas Lamprecht
ff9e7dc1bb cfg2cmd: mock SPICE/VNC port allocation methods
to make them independent of environment, else other running VMs or
quickly sequential test runs may result in false negative test
results, as the port differed.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-21 13:41:09 +02:00
Thomas Lamprecht
bae64b0ec6 cfg2cmd: add config test for SPICE with USB3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-21 13:40:40 +02:00
Aaron Lauterer
ae36393d5a usb: Add USB3 capabilities to Spice USB devices
To not change current behaviour and thus breaking live migration USB3
for a Spice USB device requires Qemu v4.1.

The old behavior was that even though technically it was possible to
the set `usb3=1` setting, it was ignored. The bus was hardcoded to
ehci. If another USB2 device was added or the machine type was set to
Q35 an ehci controller was present and the VM was able to boot.

With this patch the behaviour is changing and the bus is set to xhci if
USB3 is set for the Spice USB device and the VM is running under Qemu
v4.1.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-09-21 13:22:17 +02:00
Aaron Lauterer
47717a90cf usb: Cleanup redundant if condition
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-09-21 13:17:40 +02:00
Dominik Csapak
165411f0c2 api: add reboot api call
this creates a reboot request file (inspired by pve-container)
and relies on the 'qm cleanup' call by the qmeventd to detect
and restart the vm afterwards

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-09-11 14:13:35 +02:00
Dominik Csapak
575d19dab5 refactor vm_stop locked code
we want to reuse most of the code in the locked context of vm_stop
for vm_reboot (since it really is just a vm_stop with a
create_reboot_request in there) so we factor that out into
_do_vm_stop
and note that it has to be called in a locked context

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-09-11 14:13:35 +02:00
Dominik Csapak
64457ed4aa qm: cleanup: detect and handle reboot trigger
if the reboot trigger file was set, start the vm again
also cleanup the reboot trigger on vm startup, to prevent
leftover files to trigger a reboot at the next shutdown

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-09-11 14:13:35 +02:00
Dominik Csapak
dae98db96e add create and remove reboot trigger subs
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-09-11 14:13:35 +02:00
Dominik Csapak
58f9db6ada api: add missing index child links
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-09-10 14:55:28 +02:00
Thomas Lamprecht
6cb7b041ce test: compare also with our qemu cfgs for pci addr conflicts
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-10 10:32:52 +02:00
Thomas Lamprecht
d38155071c test: pci addr checker: add slurp_qemu_config skeleton
it works™, but yet unused, add nonetheless to make it easier to pick
up and complete this testing work.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-09 16:24:22 +02:00
Thomas Lamprecht
05a427dfbc cfg2cmd test: hostpci, also specify exact PCIe devices
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-09 08:40:07 +02:00
Thomas Lamprecht
f66bff004c cfg2cmd test: fix hostpci tests, specify exact PCI device
as a hack to avoid that we hit a code path where the current ones
from the hosts are checked, and the command line option is added
depending if it exists or not.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-09 08:26:47 +02:00
Thomas Lamprecht
d192bd4d5b cfg2cmd tests: improve hostpci test by marking some as PCIe
and add a linux based one, which acts a bit different

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-06 19:45:40 +02:00
Thomas Lamprecht
dae0c8e5fa config_to_command: refactor/cleanup try for hostpci part
try to increase variable declaration to use locality, reduce
duplication of same variable names used, and try to cleanup a bit in
general..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-06 19:27:30 +02:00
Thomas Lamprecht
5bac82fd9e cfg2cmd tests: config with PC i440fx, pci passthrough, NUMA, EFI
identical with the Q35 one, solely the machine type is different

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-06 19:27:30 +02:00
Thomas Lamprecht
d1d22dcc38 cfg2cmd tests: config with q35, pci passthrough, NUMA, EFI
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-06 19:27:30 +02:00
Thomas Lamprecht
e2b0d85dda PCIe passthrough: fixup: avoid addr conflict and cleanup a bit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-06 19:27:30 +02:00
Thomas Lamprecht
d7d698f60c pci: add conflict tests
best viewed with: git show -w

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-06 19:27:30 +02:00
Aaron Lauterer
c4e1638148 Add support for up to 16 PCI(e) devices
For non pci express passthrough additional addresses are reserved.
For pcie passthrough pcie root ports are needed (unless guest is like
windows 7).

The first 4 pcie root ports are defined by default in the pve-q35*.cfg
files. If more than 4 pcie devices are passed through the needed root
ports are created on demand. This helps to keep live migration possible
without adding a new pve-q35*.cfg file.

For the windows 7 like guests additional addresses are reserved as well.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-09-06 19:27:30 +02:00
Christian Ebner
de0119f57f Newline cleanup
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-09-04 16:28:31 +02:00
Thomas Lamprecht
d282a24d1b spice enhancements: document default values
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-04 14:44:04 +02:00
Thomas Lamprecht
caab114a56 followup: code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-04 13:26:11 +02:00
Aaron Lauterer
c4df18db91 fix #2041, #2272: Add Spice enhancements
This adds a new config option called `spice_enhancements` with two
optional settings:

* videostreaming
* foldersharing

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-09-04 13:06:49 +02:00
Mira Limbeck
9860fe4ef9 close #2263: die on live migration with local cloudinit disk
Live migration with a local cloudinit disk was never intended to work. It did
however work to an extent that the migration completed but the disk on the
source node could not be deleted. Now die if a live migration is started with
a local cloudinit disk.

With the GUI changes live migration is already disabled as it recognizes the
cloudinit disk as a local resource.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
2019-08-26 12:13:07 +02:00
Peter Keresztes Schmidt
cd98c4675b CPU flags: Add aes flag
Signed-off-by: Peter Keresztes Schmidt <peterke@sos.ethz.ch>
2019-08-23 10:37:22 +02:00
Dominik Csapak
ccab68c22c fix remote viewer live migration
for some reason not setting port results in a port of '65535' which
triggers an execption in http-server anyevent, so we set the port to 0

also, we have to read the ticket from stdin even for 'unix' type secure
migration

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-08-20 11:49:24 +02:00
Dominik Csapak
8071149be8 qemu_machine_pxe: remove unused parameter
no caller used that parameter, ever

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-08-13 15:35:01 +02:00
Dominik Csapak
1476b99fe9 rework kvm_user_version cache mechanism
we now also save the mtime of the binary and cache per binary (for each
arch; this is done so we have it already when we sometime decide
that we want to split the qemu package for each arch)
so that we get the real version if only pve-qemu-kvm was updated

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-08-13 15:35:01 +02:00
Alwin Antreich
22ea69ca65 fix: qemu: uninitialized value in multiplication
A generated VM with default values does not set the memory key in the
configuration. Hence the size of the state file for a suspend had only
the default size of the state itself and not in addition twice the
configured memory.

The patch uses the static defaults from the JSON schema if the memory
key is not set.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2019-07-24 18:41:03 +02:00
Aaron Lauterer
6af313f6e4 Add a FIXME to the Q35 config to rm audio0 dev
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-07-24 16:02:26 +02:00
Thomas Lamprecht
2402157925 bump version to 6.0-7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-24 15:13:44 +02:00
Thomas Lamprecht
b0f96836db q35 already has an 'audio0' device, rename our to "audiodev$id"
The latest changes to our audio device implemenation [0] changed the
naming of the device id to "audio<id>" which in practice resulted in
"audio0".

This conflicts with the predefined audio device in the Q35 configs
that is also using "audio0". The result is that a VM with a
configured audio device and Q35 type will not start.

While we just would had removed the audio0 device if we had detected
this earlier in the new 4.0 q35 config, we cannot do so anymore due
to migration compatibility.

So rename the device from "audio$id" to audiodev$id".

Co-authored-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-24 15:06:53 +02:00
Thomas Lamprecht
64c197ab6d bump version to 6.0-6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-23 18:20:49 +02:00
Stefan Reiter
3a040a0ead Make hv-tlbflush and hv-evmcs optional and merge flag list
Both flags were causing issues and have been made into optional flags to
be manually selected by the user if needed.

The supported flags have been merged into a single list for convenience.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-07-23 18:15:05 +02:00
Thomas Lamprecht
d5535a00c4 audio follouwp: pull out parsing into a conf_has_audio
now that we finally now what the ID from the audiodev is for let's
factor some format string parsing out making a eventual future multi
audio device support with differen backends quite easy to support
here - once QEMU itself supports that fully.[0][1]

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-July/038400.html
[1]: https://lists.nongnu.org/archive/html/qemu-devel/2019-07/msg03583.html

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-23 18:14:09 +02:00
Aaron Lauterer
1448547f44 audio dev: specify qemu audio backend
QEMU 4 adds the `-audiodev` parameter to explicitly specify the audio
backend. Setting it avoids occasional error messages when starting a
virtual machine with an audio device and qemu wants to connect it to the
physical audio device.

For now only SPICE is supported as it's also the biggest use case.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-07-22 09:51:03 +02:00
Dominik Csapak
c30e80aba9 remove unused variable
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-07-18 18:48:30 +02:00
Dominik Csapak
d30820d6c3 fix #2275: die on invalid sendkey
sendkey does not return anything if it is succesful and the error otherwise

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-07-18 18:48:30 +02:00