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

1675 Commits

Author SHA1 Message Date
Dietmar Maurer
ce9b0a3807 qm: add more return schema definitions
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-11 10:19:49 +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
Thomas Lamprecht
51179fe3e9 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>
2018-06-27 13:58:42 +02:00
Thomas Lamprecht
6982113858 qm: PVE::PTY is not used anymore 2018-06-27 13:58:42 +02:00
Dominik Csapak
3dba118c89 use get_standard_mapping for cipassword_map
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-06-27 13:39:53 +02:00
Thomas Lamprecht
dbf34697d0 bump version to 5.0-29 2018-06-15 12:13:34 +02:00
Thomas Lamprecht
9ab79e6b1a 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>
2018-06-15 12:11:05 +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
Wolfgang Bumiller
5bf9618308 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>
2018-06-12 10:53:56 +02:00
Thomas Lamprecht
e33f774d00 api create: allow auto vm start after create finished
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-12 09:44:39 +02:00
Thomas Lamprecht
4fedc13b45 reserve config with create lock early
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-12 09:44:39 +02:00
Thomas Lamprecht
8ba8418ca1 API/create: move locking inside worker
Move the locking inside worker, so that the process doing the actual
work (create or restore) holds the lock, and can call functions which
do locking without deadlocking.

This mirrors the behaviour we use for containers, and allows to add
an 'autostart' parameter which starts the VM after successful
creation. vm_start needs the lock and as not the worker but it's
parents held it, it couldn't know that it was actually save to
continue...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-12 09:44:39 +02:00
Thomas Lamprecht
b8ff6fb2a6 bump version to 5.0-28 2018-06-11 12:55:33 +02:00
Dominik Csapak
e1c88a4ee2 refactor Makefile for PVE/QemuServer/ directory
this makes it easier to add new files there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-06-11 10:18:51 +02:00
Wolfgang Bumiller
c3cedb3d9c cloud-init: nocloud v1: use lower case mac address
because cloud-init...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-06-07 12:03:52 +02:00
Wolfgang Bumiller
862807898c cloud-init: nocloud v1: set ip and netmask instead of cidr
because of centos7's broken cloud-init version

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-06-07 12:03:52 +02:00
Thomas Lamprecht
616aecc100 bump version to 5.0-27 2018-06-05 15:25:03 +02:00
René Jochum
0ca64ec34e Add .gitignore
Signed-off-by: René Jochum <rene@jochums.at>
2018-05-30 13:55:39 +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
Alexandre Derumier
87f5df81a7 qm agent : check if qga service is running 2018-05-30 07:23:39 +02:00
Wolfgang Bumiller
f0f30448f9 fix #1779: vzdump: ensure guest-fsfreeze-thaw is called on error
as QMPClient's queue_execute can throw an error

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-05-23 11:18:28 +02:00
Dominik Csapak
f889aa0fbb fix #1780: change datacenter.conf to datacenter.cfg
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-05-23 10:28:40 +02:00
Dominik Csapak
51153f86ce cleanup balloon after start call
the not definedness check is unecessary here, since it does not
do anything then, and to check balloon twice is also not necessary

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-05-22 13:23:29 +02:00
Dominik Csapak
75b51053cc fix logic of deleting balloon
Deleting the balloon config entry means resetting it to its
default. This means having a balloon device but not actually
doing any ballooning with it (iow. resetting the VM's
'balloon' value to its specified memory.).
Hotplugging a balloon device (coming from explicit '0' to
any other value (including deleting it)) is not possible.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-05-22 13:20:16 +02:00
Dominik Csapak
82329cd55b note that auto-ballooning is done by pvestatd
so that one is not confused when seeing that the shares
parameter does nothing in qemu-server

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-05-22 13:20:11 +02:00
Dominik Csapak
9be87f4eea activate volume for cloudinit disk
because it does not have to be activated (e.g. in case of lvm)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-05-22 10:11:39 +02:00
Wolfgang Bumiller
be15435a12 bump version to 5.0-26
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-05-14 14:08:39 +02:00
Dietmar Maurer
7ee990cd30 implement permission checks for cloud-init related options
Most cloud-init options are network related, so we simply check
for VM.Config.Network priviledge.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2018-05-14 11:16:40 +02:00
Wolfgang Bumiller
503308ed91 start: fork before entering scope
To avoid potential cleanup & post-start actions to cause
unwanted processes (such as gpg-agent) to be started as part
of the scope, as the enter_systemd_scope() function causes
the current process to enter the scope.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-05-08 08:40:24 +02:00
Dominik Csapak
68e46b8452 fix #1749: do not copy pending changes when cloning a vm
cloning a vm means copying the current state, not the
state of 'some time in the future, when the vm is started again'
we should not copy the pending changes, which also fixes the
issue that we got a wrong pending change on the disks,net,smbios,etc.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-05-04 08:26:26 +02:00
Kamil Trzciński
d705271e3a Add pci.3 to pve-q35.cfg required by virtio-scsi-single
(commit message reworked from original[1])
As a temporary workaround add always a pci.3 bridge so that if
virtio-scsi-single is used, either directly or indirectly if SCSI and
iothread is selected, the respective bridge is available:

> The case where we do miss the pci.3 bridge is when using
> virtio-scsi-single, regardless of whether io threads are enabled,
> because we always put those controllers on pci bus 3 (see
> QemuServer/PCI.pm)
-- [2]

A long term solution would be to always add those bridges dynamically
and just filter out the ones which are already inside the pve-q35.cfg
file .

[1]: https://pve.proxmox.com/pipermail/pve-devel/2018-April/031768.html
[2]: https://pve.proxmox.com/pipermail/pve-devel/2018-April/031787.html

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-05-02 09:14:22 +02:00
Wolfgang Bumiller
f716664010 bump version to 5.0-25
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-04-13 15:12:09 +02:00
Dominik Csapak
f721624b8e collect device list for nested pci-bridges
when using q35 as machine type, there are nested pci-bridges,
but we only checked the first layer

this resulted in not being able to hotplug scsi devices,
because scsihw0 was deeper in the pci-bridge construct, we did not see
it and tried to add it (which fails of course)

this patch checks all bridges, regardless how deeply nested they are

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-13 14:44:22 +02:00
Dominik Csapak
3807f3e4ee fix #1697: only check machine type for pxe
it is not necessary to check the romfile of the running vm
for .pxe machine types, since the machine type itself is not
hot-pluggable

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-13 14:41:10 +02:00
Dominik Csapak
fd950b2385 readd nbd_stop
we accidentally moved nbd_stop to CloudInit.pm in
commit 0c9a7596f6b686ead232927851200554c997fa44

and removed it in
commit 3db6e4ab708b29e9e59572efd8e44558c84bad6d

without realizing that live local storage migration still depends on it

readd it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-13 14:39:06 +02:00
Thomas Lamprecht
a70e7e6caf disk: serial no must now be passed to device not drive
With QEMU 2.10 the serial parameter of the -drive command line option
was deprecated [1], so move the logic which adds this parameter now
to the -drive analogue -device CLI option.

Features marked deprecated will continue to work for two releases[2],
so we need to switch over before 2.12, AFAICT.

[1]: https://wiki.qemu.org/ChangeLog/2.10#Deprecated_options
[2]: https://qemu.weilnetz.de/doc/qemu-doc.html#Deprecated-features

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-04-09 11:03:02 +02:00
Fabian Grünbichler
d494009179 qemu-img convert: use cache=none for ZFS only
since this requires O_DIRECT support by the underlying storage, which
might not be available.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-03-26 11:38:40 +02:00
Fabian Grünbichler
2715f95970 qemu-img convert: use cache=none
this fixes an issue with zvols, which require cache=none and eat up all
free memory as buffered pages otherwise

https://github.com/zfsonlinux/zfs/issues/7235

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-23 14:57:49 +01:00
Thomas Lamprecht
cf7b2c9e36 bump version to 5.0-24
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-22 09:29:30 +01:00
Wolfgang Bumiller
00bc302caa deps: cloud-init now needs qemu >= 2.11.1-4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-22 08:20:30 +01:00
Thomas Lamprecht
102cf9d81e use pve-edk2-firmware for supporting OVMF
depend on new pve-edk2-firmware package and adapt the OVMF CODE/VARS
path accordingly

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-22 08:19:46 +01:00
Alexandre Derumier
f0a762f7ba commit_cloudinit_disk : add -n option to qemu-img dd 2018-03-21 15:35:05 +01:00
Thomas Lamprecht
eb84566b49 sync bwlimit description with the container one 2018-03-21 11:15:35 +01:00
Thomas Lamprecht
9444c6e42c fixup: remove unneeded if branch
$readfrom equals $archive here, and we're already in the branch with
the condition that both are not equal to '-'
2018-03-21 11:15:35 +01:00
Wolfgang Bumiller
7c536e11c4 restore: implement rate limiting
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-21 11:15:35 +01:00
Thomas Lamprecht
b20df606a1 stop passing default '-k' QEMU option from datacenter.cfg
Modern noVNC does not needs this anymore, actually things may get
worse if it's used. E.g., when one sets 'de' and the VM locale is
'de' you may get a 'ĸ' (unicode kra) if you want to send an ampersand
character through pressing SHIFT + 6.

Qemus manual pages confirms that this is most times not needed
anymore:

 > -k language
 >    Use keyboard layout language (for example "fr" for
 >    French). This option is only needed where it is not
 >    easy to get raw PC keycodes (e.g. on Macs, with some
 >    X11 servers or with a VNC or curses display). You don't
 >    normally need to use it on PC/Linux or PC/Windows
 >    hosts.
 -- man kvm

An user can always set it per VM, wew simply remove the implict
default derived from the cluster wide datacenter.cfg

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-21 10:48:07 +01:00