mirror of
				https://git.proxmox.com/git/qemu-server
				synced 2025-11-04 00:52:11 +00:00 
			
		
		
		
	fix undefined value when starting a q35 machine VM
As there the signleton function "kvm_user_version" may not have been called and with the machine alias q35 the regex from the qemu_machine_feature_enabled method does not match and thus we need a valid kvm version here
This commit is contained in:
		
							parent
							
								
									e03d994e98
								
							
						
					
					
						commit
						74cc511fda
					
				@ -6647,11 +6647,12 @@ sub qemu_use_old_bios_files {
 | 
			
		||||
        $machine_type = $1;
 | 
			
		||||
        $use_old_bios_files = 1;
 | 
			
		||||
    } else {
 | 
			
		||||
	my $kvmver = kvm_user_version();
 | 
			
		||||
        # Note: kvm version < 2.4 use non-efi pxe files, and have problems when we
 | 
			
		||||
        # load new efi bios files on migration. So this hack is required to allow
 | 
			
		||||
        # live migration from qemu-2.2 to qemu-2.4, which is sometimes used when
 | 
			
		||||
        # updrading from proxmox-ve-3.X to proxmox-ve 4.0
 | 
			
		||||
        $use_old_bios_files = !qemu_machine_feature_enabled ($machine_type, undef, 2, 4);
 | 
			
		||||
	$use_old_bios_files = !qemu_machine_feature_enabled ($machine_type, $kvmver, 2, 4);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return ($use_old_bios_files, $machine_type);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user