]> git.proxmox.com Git - qemu-server.git/commit
cleanup windows version handling and hyperv enlightments
authorAlexandre Derumier <aderumier@odiso.com>
Tue, 8 Nov 2016 01:56:01 +0000 (02:56 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 11 Nov 2016 05:06:28 +0000 (06:06 +0100)
commit4317f69fc53f015495bda69165a07bb0285a92c5
tree5fb36e1924f135277fd42aded09045543ea5a4dd
parent36e54bd7f1aa6b36f8d18adda6ee6cc114537cd7
cleanup windows version handling and hyperv enlightments

This cleanup windows guest os version handling,
with normalizing ostype with numbers in a new windows_version sub.

if($ostype eq 'wxp' || $ostype eq 'w2k3' || $ostype eq 'w2k') {
      $winversion = 5;
} elsif($ostype eq 'w2k8' || $ostype eq 'wvista') {
      $winversion = 6;
} elsif ($ostype =~ m/^win(\d+)$/) {
      $winversion = $1;
}

so we can simply do test on windows version with lower or upper version

Hyperv enlightments configuration is centralized
in a new add_hyperv_enlighments sub.

Also disable hyperv with win < 8 + ovmf.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/QemuServer.pm