Moved the check to the beginning of the function.
VMs configured to use KVM won't start if KVM is not available.
VMs not configured to use KVM will start regardless.
my $winversion = windows_version($ostype);
my $kvm = $conf->{kvm} // 1;
+ die "KVM virtualisation configured, but not available. Either disable in VM configuration or enable in BIOS.\n" if (!$cpuinfo->{hvm} && $kvm);
+
if ($kvmver =~ m/^(\d+)\.(\d+)$/) {
$vernum = $1*1000000+$2*1000;
} elsif ($kvmver =~ m/^(\d+)\.(\d+)\.(\d+)$/) {
if (!$kvm) {
push @$machineFlags, 'accel=tcg';
- } else {
- die "No accelerator found!\n" if !$cpuinfo->{hvm};
}
if ($machine_type) {