[pve-devel] Applied: [PATCH 1/3] add get_running_qemu_version
Wolfgang Bumiller
w.bumiller at proxmox.com
Mon Oct 17 14:53:09 CEST 2016
On Mon, Oct 17, 2016 at 12:20:43PM +0200, Alexandre Derumier wrote:
> return current running qemu process version
>
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
> PVE/QemuServer.pm | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 46d0403..6376323 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -5961,6 +5961,13 @@ sub get_current_qemu_machine {
> return $current || $default || 'pc';
> }
>
> +sub get_running_qemu_version {
> + my ($vmid) = @_;
> + my $cmd = { execute => 'query-version', arguments => {} };
> + my $res = vm_qmp_command($vmid, $cmd);
> + return "$res->{qemu}->{major}.$res->{qemu}->{minor}";
> +}
> +
> sub qemu_machine_feature_enabled {
> my ($machine, $kvmver, $version_major, $version_minor) = @_;
>
> --
> 2.1.4
More information about the pve-devel
mailing list