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

1708 Commits

Author SHA1 Message Date
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
Dominik Csapak
58b1a8d75d use new snapshot rollback hook to handle machine type
this was in guest-common, makes more sense to do it here - it's not
guest agnostic after all.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-09-17 15:43:37 +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
Thomas Lamprecht
3279808688 bump version to 5.0-34
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-13 11:39:04 +02:00
Dominik Csapak
c725dd5f92 improve 'pending changes' message for clone
$newconf->{pending} is a reference to an empty hash, which is not falsy,
thus we always printed the warning

so check if there are actual values there and if yes,
give the names of the properties for which pending changes are found

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-09-12 10:54:27 +02:00
Thomas Lamprecht
91bba27165 d/control: add build dependency to qemu-utils
the OVF tests use `qemu-img`, which is provided by either our
pve-qemu(-kvm) or qemu-utils (upstream).

Use qemu-utils as it's provided by ours and upstreams package and
thus makes bootstrapping easier, e.g., if our qemu package is not yet
installed this can still be build.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-04 10:22:49 +02:00
Thomas Lamprecht
5b7c5f6331 d/control: add libio-multiplex-perl as build dependency
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-04 10:14:41 +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
David Limbeck
8d54522b90 fix #1865: CloudInit doesn't add IPv6
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-08-22 12:40:26 +02:00
Thomas Lamprecht
dc02254ec9 qm rescan: fix typo in dryrun description
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-08-21 09:21:41 +02:00
Thomas Lamprecht
e27003dfc7 bump version to 5.0-33
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-08-20 14:43:37 +02:00
Stoiko Ivanov
ca6621315e Fix #1242 : clone_disk : call qga fstrim after clone
Some storage like rbd or lvm can't keep thin-provising after a qemu-mirror.

Call qga guest-fstrim if qga is available and fstrim_cloned_disks is enabled
after move_disk and migrate.

Co-Authored-By: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-08-02 11:35:50 +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
Dietmar Maurer
03f879fd85 vmlist: document 'uptime' and 'cpus' returmn value 2018-07-31 13:31:49 +02:00
Thomas Lamprecht
4e09f915bf bump version to 5.0-32
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-30 11:02:18 +02:00
Thomas Lamprecht
ccd166381b agent: import used check_agent_error method
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-30 11:01:30 +02:00
Thomas Lamprecht
50ecb1ba58 api/agent: do not dereference params hash before passing to agent_cmd
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-30 10:41:48 +02:00
Thomas Lamprecht
4c4622a880 bump version to 5.0-31
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-30 10:25:29 +02:00
Dominik Csapak
332ff39abe add missing import of 'agent_cmd'
see https://pve.proxmox.com/pipermail/pve-user/2018-July/169712.html

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-07-30 08:56:39 +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
Thomas Lamprecht
c2eb7ec274 bump version to 5.0-30
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-17 11:39:31 +02:00
Thomas Lamprecht
bf744e94f3 qm: move 'agent' command into 'guest' comand group
with a backwards compatible alias

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-17 11:01:55 +02:00
Thomas Lamprecht
34e4c0aa6c qm: rename 'ga' command group to 'guest'
https://pve.proxmox.com/pipermail/pve-devel/2018-July/033010.html

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-17 11:01:55 +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
804fffdfc3 qemu agent: fixup error message letter-case
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-11 11:26:00 +02:00
Dominik Csapak
735821a4fe implement file-write via guest-agent in the api
writes the given content to the file

the size is at the moment limited by the max post size of the
pveproxy/daemon, so we set the maxLength to 60k

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-07-11 10:29:45 +02:00
Dominik Csapak
bb14060a1c implement file-read api call via guest-agent
this api call reads a file via the guest agent,
(in 1MB chunks) but is limited to 16MiB (for now)

if the file is bigger, the output gets truncated and a
'truncated' flag is set in the return object

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-07-11 10:29:45 +02:00
Dominik Csapak
520884deca add exec(-status) to qm
on the commandline the implementation for exec is a bit different
because there we want (by default) to wait for the result,
as opposed to the api, where it is enough to return the pid and
let the client handle the polling

this behaviour is optional and can be turned off, as well as the
timeout of 30 seconds

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-07-11 10:29:45 +02:00
Dominik Csapak
8efdf41820 implement agent exec api call
this imitates the qemu-guest-agent interface
with an 'exec' api call which returns a pid
and an 'exec-status' api call which takes a pid

the command for the exec call is given as an 'alist'
which means that when using we have to give the 'command'
parameter multiple times e.g.

pvesh create <...>/exec --command ls --command '-lha' --command '/home/user'

so that we avoid having to deal with shell escaping etc.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-07-11 10:29:45 +02:00
Dominik Csapak
8593cbe41c add 'passwd' to qm
this adds a command 'qm ga passwd' so that we can reuse
'qm ga' for future guest agent calls

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-07-11 10:29:45 +02:00
Dominik Csapak
b428fb63fa implement set-user-password guest agent api call
this executes the guest agent command 'set-user-password'
with which one can change the password of an existing user in the vm

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-07-11 10:29:45 +02:00
Dominik Csapak
3824765e64 add Agent helper package
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-07-11 10:29:45 +02:00
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