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

1603 Commits

Author SHA1 Message Date
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
Wolfgang Bumiller
345d263f6c cleanup: remove duplicate mac address assignment
The git history of this is not immediately obvious due to
the date of the cloud init patches, but the removal of this
line was basically reverted by them later at merge-time.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-21 10:33:39 +01:00
Dietmar Maurer
1ae43f8c11 clone: add command line completion for newid
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2018-03-20 11:09:45 +01:00
Dietmar Maurer
fd13b1d0e1 clone: use better default for parameter 'full'
template => linked clone
normal VM => full clone

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2018-03-20 11:09:45 +01:00
Dominik Csapak
2254ffcf87 cloudinit: hide password on the api
since password is easily decrypted, hide it on the api
if someone needs it, they can get it directly from the
config

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-16 10:03:57 +01:00
Thomas Lamprecht
6de521e984 remove legacy vm_monitor_command
We introduced our QMP socket with commit
c971c4f2213524f27125f558978a428b53628f34 (29.05.2012)

Already tried to remove this with commit
7b7c6d1b5dcee25e1194d4b8a0219bd5c31a5639 (13.07.2012)

But reverted that to allow migration of VMs still using the old
montior to ones which already switched over to the new QMP one,
in commit dab36e1ee924be0efab3f85937c23910b456f4b9 (17.08.2012)
see bug #242 for reference

This was all done  and released in PVE 2.2, as no migration through
nodes differing more than one major version is possible we can
finally remove this code for good.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-14 11:18:56 +01:00
Dominik Csapak
4a85391549 cloud-init: make parameter order consistent
we have '$conf, $vmid' elsewhere for cloudinit, this was the only
function which had them in reverse

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-14 11:13:27 +01:00
Dominik Csapak
8de34458ea cloud-init: add manage_etc_hosts to cloud init config
so that we get the hostname there
(e.g. sudo complains that it cannot resolve the hostname)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-14 11:13:25 +01:00
Dominik Csapak
9a6ccb12ef cloud-init: use default hostname when none is set
use "VM$vmid" like we do in a container

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-14 11:13:18 +01:00
Wolfgang Bumiller
29d1f14708 cloud-init: make cipassword interactive on the CLI
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-13 11:32:52 +01:00
Herman van Rink
e4d4cda113 Move name argument to improve visibility in a process list
Signed-off-by: Herman van Rink <rink@initfour.nl>
2018-03-12 14:26:10 +01:00
Wolfgang Bumiller
cefb41fa76 cloud-init: replace password parameter in log messages
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-12 12:43:44 +01:00
Wolfgang Bumiller
3c23aa808c start: always stop an existing $vmid.scope
Checking for the cgroup directory is a kind of time-of-check
time-of-use race condition stop-mode backups seem to
occasionally run into on some systems.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-12 09:14:17 +01:00
Wolfgang Bumiller
230406dc52 cloud-init: pre-hash passwords
We don't leave this up to cloud-init as we don't want
un-hashed values at all in our configs.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-08 14:59:27 +01:00
Wolfgang Bumiller
231f824b1a whitespace fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-08 14:58:34 +01:00
Wolfgang Bumiller
67864d1940 cloud-init: fall back to host's resolv.conf
As with containers, if no dns settings are configured, use
the ones from the host.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-07 15:03:39 +01:00
Dietmar Maurer
1d1c4e1c1c cleanup cloud-init option descriptions 2018-03-07 10:53:41 +01:00
Dietmar Maurer
498cdc36dc document defaults for citype 2018-03-07 09:31:44 +01:00
Dietmar Maurer
d41121fdc4 new helper cloudinit_config_properties()
Only used to generate documentation.
2018-03-07 09:26:33 +01:00
Wolfgang Bumiller
f62c36cffa cloud-init: don't use /tmp for config files
Leaving files in /tmp was mostly useful for debugging
purposes initially. Also /tmp is a rather insecure option
for this for a final version, so use
/run/pve/cloudinit/$vmid, and move the file writing into
commit_cloudinit_disk() which now takes a hash mapping file
paths to contents, to not duplicate the temp-file logic for
the different citypes.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-07 09:15:50 +01:00
Wolfgang Bumiller
e8ac21381e cloud-init: remove separate hostname config entry
Use the vm name and set hostname and fqdn in user data
again.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-07 09:15:42 +01:00
Wolfgang Bumiller
7b42f95142 cloud-init: add ciuser and cipassword config options
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-07 09:11:32 +01:00
Wolfgang Bumiller
41cd94a01e cloud-init: nocloud image support
With configdrives we end up with the /etc/network/interfaces
file containing the interface names we use on the disk, ie.
eth0/eth1/..., which doesn't work on systems which do not
use this name.

With the 'nocloud' image type we can provide a
network-config in yaml which matches mac addresses. Ideally
we'd use version 2, but debian stretch ships with a too old
cloud-init for this, so for now we're writing version 1.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-07 09:11:31 +01:00