5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-25 06:03:52 +03:00

962 Commits

Author SHA1 Message Date
Stoiko Ivanov
9759415454 add 'clone' to lock schema definition/confdesc.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-12-11 10:03:00 +01:00
Dominik Csapak
7c954c426d 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>
2018-12-11 09:56:50 +01:00
Dominik Csapak
7635067063 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>
2018-12-11 09:56:50 +01:00
Alexandre Derumier
8fa6a851ee 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
2018-12-11 09:43:04 +01:00
Dominik Csapak
2fd247882d 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>
2018-11-22 07:02:19 +01:00
Dominik Csapak
6ab45bd7ff 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>
2018-11-22 07:02:19 +01:00
Thomas Lamprecht
81b2db7d28 QemuServer: remove now unused $pcisysfs
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-19 14:07:54 +01:00
Dominik Csapak
b71351a7ed 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>
2018-11-19 14:06:11 +01:00
Dominik Csapak
b4496b9ed5 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>
2018-11-14 15:29:59 +01:00
Wolfgang Bumiller
869ad4a78d arm: use virtio gpu by default
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-11-13 14:44:28 +01:00
Wolfgang Bumiller
1ea63c15bf don't use amd64-specific cpu options on arm
FIXME: This function needs proper reorganisation...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-11-13 14:44:28 +01:00
Wolfgang Bumiller
d559309fcf 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>
2018-11-13 14:44:28 +01:00
Wolfgang Bumiller
91b01bbbaa arm: use UART for serial0 instead of a separate device
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-11-13 14:44:28 +01:00
Wolfgang Bumiller
6f0cb67588 only use vhost-net for native kvm machines
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-11-13 14:44:28 +01:00
Wolfgang Bumiller
0f27a91d3d use cortex-a57 as cpu for arm emulation for now...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-11-13 14:44:28 +01:00
Wolfgang Bumiller
4fc262bd50 move cpu option creation into separate sub
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-11-13 14:44:28 +01:00
Wolfgang Bumiller
6908fd9bf4 use qemu-system-aarch64 for arm machines
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-11-13 14:44:28 +01:00
Wolfgang Bumiller
96ed3574d4 use AAVMF for arm
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-11-13 14:44:28 +01:00
Wolfgang Bumiller
d731ecbefe add 'arch' vm configuration
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-11-13 14:44:28 +01:00
Wolfgang Bumiller
646f2df43c 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>
2018-11-13 14:44:28 +01:00
Dominik Csapak
8490283721 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>
2018-11-12 09:27:21 +01:00
David Limbeck
c9db224015 fix #1969: increase max unused disks
increase to 256, same as containers

Signed-off-by: David Limbeck <d.limbeck@proxmox.com>
2018-11-09 16:23:07 +01:00
Thomas Lamprecht
9c152e87f5 move nbd_stop up, it's not a completion helper
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-09 16:11:18 +01:00
Thomas Lamprecht
daadd5a4e7 followup for VGA memory: improve q35 comment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-09 14:01:45 +01:00
Dominik Csapak
55655ebc32 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>
2018-11-09 13:45:07 +01:00
Nick Chevsky
6c875f9f31 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>
2018-10-30 09:22:20 +01:00
Dominik Csapak
71bd73b534 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>
2018-10-18 12:23:48 +02:00
Wolfgang Bumiller
df648a6a7a lower hv_synic, hv_stimer requirement to qemu 2.12
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-10-16 14:52:28 +02:00
Alexandre Derumier
29004a20ca qemu_img_convert : use "-l snapshot.name" instead -s for internal snapshot
qemu-img convert -s has been removed in qemu 3.0
https://git.qemu.org/?p=qemu.git;a=commit;h=46e8d272baa0608adcfdbd8bc1d2312bea06da40

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

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

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

also move the comment to where it actually belongs

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

see:

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

for details on how it works and when it should change

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

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Acked-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-18 09:37:32 +02:00
Dominik Csapak
c6737ef18b ensure correct machine type gets saved on snapshot
instead of overwriting the 'machine' config in the snapshot,
use its own 'runningmachine' config only for the snapshot

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

we also have to adapt the tests for this

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-09-17 15:48:05 +02:00
Alexandre Derumier
ebb346d6fa qemu 3.0 : add hv_synic && hv_stimer hyperv enlightment
This fix cpu bug on last win10 updates
2018-09-17 13:40:28 +02:00
Alexandre Derumier
eabc189ee8 add ibpb, ssbd, virt-ssbd, amd-ssbd, amd-no-ssb, pdpe1gb cpu flags
> The following are important CPU features that should be used on
> Intel x86 hosts, when available in the host CPU. Some of them
> require explicit configuration to enable, as they are not included
> by default in some, or all, of the named CPU models listed above.
> In general all of these features are included if using “Host
> passthrough” or “Host model”.
>
> pcid: Recommended to mitigate the cost of the Meltdown
> (CVE-2017-5754) fix. Included by default in Haswell, Broadwell &
> Skylake Intel CPU models. Should be explicitly turned on for
> Westmere, SandyBridge, and IvyBridge Intel CPU models. Note that
> some desktop/mobile Westmere CPUs cannot support this feature.
>
> spec-ctrl: Required to enable the Spectre (CVE-2017-5753 and
> CVE-2017-5715) fix, in cases where retpolines are not sufficient.
> Included by default in Intel CPU models with -IBRS suffix. Must be
> explicitly turned on for Intel CPU models without -IBRS suffix.
> Requires the host CPU microcode to support this feature before it
> can be used for guest CPUs.
>
> ssbd: Required to enable the CVE-2018-3639 fix. Not included by
> default in any Intel CPU model. Must be explicitly turned on for
> all Intel CPU models. Requires the host CPU microcode to support
> this feature before it can be used for guest CPUs.
>
> pdpe1gbr: Recommended to allow guest OS to use 1GB size pages.Not
> included by default in any Intel CPU model. Should be explicitly
> turned on for all Intel CPU models. Note that not all CPU hardware
> will support this feature.
-- https://www.berrange.com/posts/2018/06/29/cpu-model-configuration-for-qemu-kvm-on-x86-hosts/
2018-08-28 11:19:10 +02:00
Stoiko Ivanov
9d66b39769 Make agent a property string, add fstrim_cloned_disks
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-08-02 11:35:50 +02:00
Dietmar Maurer
b1a70cab3d vmstatus: define return propertries
We can use the same properties in vmlist and vmstatus.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2018-08-01 12:58:21 +02:00
Alexandre Derumier
a2f1554b6e Fix #1717: delete snapshot when vm running and drive not attached
changelog v2:
 - remove hash
 - remove check if cdrom

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

example:

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

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

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

If drive is not attached, we need to use the storage snapshot delete command
2018-07-19 10:42:03 +02:00
Dzmitry Kotsikau
a489dd9c81 Fix SPICE multi-monitor mode on q35
Signed-off-by: Dzmitry Kotsikau <dkotsikau@gmail.com>
2018-07-13 09:51:36 +02:00
Thomas Lamprecht
9224dceefe 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>
2018-07-11 09:35:45 +02:00
Thomas Lamprecht
53b81297c4 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>
2018-07-11 09:35:43 +02:00
Thomas Lamprecht
b9a1a3aba5 rescan: comment that this is a temporarily workaround
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-05 08:46:11 +02:00
Alwin Antreich
4771526af1 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>
2018-07-05 08:35:06 +02:00
Wolfgang Bumiller
d04d6af1f2 use the new PVE::SystemD package
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-15 11:50:23 +02:00
Dominik Csapak
c2786bedc6 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>
2018-06-13 12:46:01 +02:00
Thomas Lamprecht
a4938c7217 add nowarn to qga_check_running
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-05-30 09:01:11 +02:00