On Mon, Oct 17, 2016 at 12:20:43PM +0200, Alexandre Derumier wrote:
> return current running qemu process version
> 
> Signed-off-by: Alexandre Derumier <aderum...@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

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to