mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Add support for guest_os hinting
Adds an optional `$guest_so` variable to the config files. Supported options are `linux` and `windows` which defaults to `linux` if not provided. Allows for OS specific tuning in `quickemu`.
This commit is contained in:
		
							parent
							
								
									373a83f9a4
								
							
						
					
					
						commit
						ce523fecdf
					
				
					 2 changed files with 33 additions and 2 deletions
				
			
		
							
								
								
									
										27
									
								
								quickemu
									
										
									
									
									
								
							
							
						
						
									
										27
									
								
								quickemu
									
										
									
									
									
								
							|  | @ -113,6 +113,33 @@ function vm_boot() { | |||
|     echo " - BIOS:     Legacy" | ||||
|   fi | ||||
| 
 | ||||
|   # If guest_os is unset, default to "linux" | ||||
|   if [ -z "${guest_os}" ]; then | ||||
|     guest_os="linux" | ||||
|   else | ||||
|     # Force to lowercase. | ||||
|     guest_os=$(echo ${guest_os,,}) | ||||
|   fi | ||||
| 
 | ||||
|   # Make any OS specific adjustments | ||||
|   case ${guest_os} in | ||||
|     linux) | ||||
|       VIDEO_DRV="virtio-vga" | ||||
|       ;; | ||||
|     windows) | ||||
|       VIDEO_DRV="qxl" | ||||
|       ;; | ||||
|     *) | ||||
|       echo "ERROR! Unrecognised guest OS: ${guest_os}" | ||||
|       exit | ||||
|       ;; | ||||
|   esac | ||||
|   echo " - Guest:    ${guest_os^} optimised." | ||||
| 
 | ||||
|   if [ -z "${disk}" ]; then | ||||
|     disk="64G" | ||||
|   fi | ||||
| 
 | ||||
|   echo " - Disk:     ${disk_img} (${disk})" | ||||
|   if [ ! -f "${disk_img}" ]; then | ||||
|       # If there is no disk image, create a new image. | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue