mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Improved support of KolibriOS:
CD-ROM (iso), Disk, Internet and Audio are working now. Also added forced LiveCD booting (because release named latest-iso, not latest-img). Did some tweaks with '-machine' and '-cpu'. Now these VMs will run with 'qemu32' processor since KolibriOS throw an MTRR error (I didnt get how to fix it by any other way).
This commit is contained in:
		
							parent
							
								
									310d2d3aa1
								
							
						
					
					
						commit
						82be8d324c
					
				
					 2 changed files with 28 additions and 4 deletions
				
			
		
							
								
								
									
										31
									
								
								quickemu
									
										
									
									
									
								
							
							
						
						
									
										31
									
								
								quickemu
									
										
									
									
									
								
							|  | @ -228,6 +228,7 @@ function vm_boot() { | |||
|   local KERNEL_NODE="" | ||||
|   local KERNEL_VER="?" | ||||
|   local LSB_DESCRIPTION="Unknown OS" | ||||
|   local MACHINETYPE="q35" | ||||
|   local MAC_BOOTLOADER="" | ||||
|   local MAC_MISSING="" | ||||
|   local MAC_DISK_DEV="ide-hd,bus=ahci.2" | ||||
|  | @ -451,7 +452,7 @@ function vm_boot() { | |||
| 
 | ||||
|   # Make any OS specific adjustments | ||||
|   case ${guest_os} in | ||||
|     freebsd|kolibrios|linux|openbsd) | ||||
|     freebsd|linux|openbsd) | ||||
|       CPU="-cpu host,kvm=on" | ||||
|       if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then | ||||
|         CPU="${CPU},topoext" | ||||
|  | @ -463,6 +464,18 @@ function vm_boot() { | |||
|         disk_size="16G" | ||||
|       fi | ||||
|       ;; | ||||
|     kolibrios) | ||||
|       CPU="-cpu qemu32,kvm=on" | ||||
|       if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then | ||||
|         CPU="${CPU},topoext" | ||||
|       fi | ||||
|       MACHINETYPE="pc" | ||||
|       NET_DEVICE="rtl8139" | ||||
|       GUEST_TWEAKS="-boot d" | ||||
|       if [ -z "${disk_size}" ]; then | ||||
|         disk_size="256M" | ||||
|       fi | ||||
|       ;; | ||||
|     macos) | ||||
|       #https://www.nicksherlock.com/2020/06/installing-macos-big-sur-on-proxmox/ | ||||
|       # A CPU with SSE4.1 support is required for >= macOS Sierra | ||||
|  | @ -591,7 +604,7 @@ function vm_boot() { | |||
|     fi | ||||
|   fi | ||||
| 
 | ||||
|   if [ "${DISK_USED}" == "yes" ]; then | ||||
|   if [ "${DISK_USED}" == "yes" ] && [ "${guest_os}" != "kolibrios" ]; then | ||||
|     # If there is a disk image that appears to be used do not boot from installation media. | ||||
|     iso="" | ||||
|     img="" | ||||
|  | @ -833,7 +846,7 @@ function vm_boot() { | |||
| 
 | ||||
|   # shellcheck disable=SC2054,SC2206,SC2140 | ||||
|   args+=(-name ${VMNAME},process=${VMNAME} -pidfile "${VMDIR}/${VMNAME}.pid" | ||||
|          -enable-kvm -machine q35,smm=${SMM},vmport=off ${GUEST_TWEAKS} | ||||
|          -enable-kvm -machine ${MACHINETYPE},smm=${SMM},vmport=off ${GUEST_TWEAKS} | ||||
|          ${CPU} ${SMP} | ||||
|          -m ${RAM_VM} ${BALLOON} | ||||
|          -smbios type=2,manufacturer="Quickemu Project",product="Quickemu",version="${VERSION}",serial="0xDEADBEEF",location="quickemu.com",asset="${VMNAME}" | ||||
|  | @ -891,6 +904,13 @@ function vm_boot() { | |||
|     args+=(-drive if=floppy,format=raw,file="${floppy}") | ||||
|   fi | ||||
| 
 | ||||
|   # Since there is bug (probably) in KolibriOS: cdrom indexes 0 or 1 make system show an extra unexisting iso, so we use index=2 | ||||
|   if [ -n "${iso}" ] && [ "${guest_os}" == "kolibrios" ]; then | ||||
|     # shellcheck disable=SC2054 | ||||
|     args+=(-drive media=cdrom,index=2,file="${iso}") | ||||
|     iso="" | ||||
|   fi | ||||
| 
 | ||||
|   if [ -n "${iso}" ]; then | ||||
|     # shellcheck disable=SC2054 | ||||
|     args+=(-drive media=cdrom,index=0,file="${iso}") | ||||
|  | @ -922,6 +942,11 @@ function vm_boot() { | |||
|     # shellcheck disable=SC2054,SC2206 | ||||
|     args+=(-device ${MAC_DISK_DEV},drive=SystemDisk | ||||
|            -drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO}) | ||||
|   elif [ "${guest_os}" == "kolibrios" ]; then | ||||
|     # shellcheck disable=SC2054,SC2206 | ||||
|     args+=(-device ahci,id=ahci | ||||
|            -device ide-hd,bus=ahci.0,drive=SystemDisk | ||||
|            -drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO}) | ||||
|   else | ||||
|     # shellcheck disable=SC2054,SC2206 | ||||
|     args+=(-device virtio-blk-pci,drive=SystemDisk | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue