Proxmox 3.X No Ctrl-Alt-R release ‘Spice’

A while back, I started using Proxmox as my default vm platform. It’s actually a really nice setup. Powerful web ui. KVM and/or OpenVZ. Free/Community version. Overall, not bad.

In the 3.x branch, they began integrating Spice to act as an option for Console access. Quite a nice feature, and works with OSX and Linux (I have used it on both, so I know that it works on the *nix OSes). Windows, meh, you install and find out.

One downside however, is that the proxy file that is opened with virt viewer may not have the necessary configuration parameters to allow you to get your cursor back, which can be a huge huge hindrance.

While investigating the issue, I came across a posting that covers the problem, as well as provides a solution: It was from the mailing list, but worked quite well.

To summarize, you need to fix /usr/share/perl5/PVE/API2/Qemu.pm

Change:

    my $cacert = PVE::Tools::file_get_contents("/etc/pve/pve-root-ca.pem", 8192);
    $cacert =~ s/\n/\\n/g;

    return {
        type => 'spice',
        title => "VM $vmid",
        host => $proxyticket, # this break tls hostname verification, so we need to use 'host-subject'
        proxy => "http://$proxy:3128",
        'tls-port' => $port,
        'host-subject' => $subject,
        ca => $cacert,
        password => $ticket,
        'delete-this-file' => 1,
    };
}});

To:

    my $cacert = PVE::Tools::file_get_contents("/etc/pve/pve-root-ca.pem", 8192);
    $cacert =~ s/\n/\\n/g;

    my $conf = PVE::QemuServer::load_config($vmid, $node);
    return {
        'secure-attention' => "Ctrl+Alt+Ins",
        'toggle-fullscreen' => "Shift+F11",
        'release-cursor' => "Ctrl+Alt+R",
        type => 'spice',
        title => "VM $vmid - $conf->{'name'}",
        # title => "VM $vmid",
        host => $proxyticket, # this break tls hostname verification, so we need to use 'host-subject'
        proxy => "http://$proxy:3128",
        'tls-port' => $port,
        'host-subject' => $subject,
        ca => $cacert,
        password => $ticket,
        'delete-this-file' => 1,
    };
}});

Once you have made these changes, restart pvedaemon and you will be good.

service pvedaemon restart

All fixed!

-Villain

Comments

Comments powered by Disqus