mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Add --ignore-msrs-always argument
This commit is contained in:
		
							parent
							
								
									e493112688
								
							
						
					
					
						commit
						acf6ef32fa
					
				
					 1 changed files with 15 additions and 11 deletions
				
			
		
							
								
								
									
										26
									
								
								quickemu
									
										
									
									
									
								
							
							
						
						
									
										26
									
								
								quickemu
									
										
									
									
									
								
							|  | @ -1,17 +1,17 @@ | ||||||
| #!/usr/bin/env bash | #!/usr/bin/env bash | ||||||
| export LC_ALL=C | export LC_ALL=C | ||||||
| 
 | 
 | ||||||
| function ask_option_msrs() { | function ignore_msrs_always() { | ||||||
|   ignore_msrs=$(cat /sys/module/kvm/parameters/ignore_msrs) |   # Make sure the host has /etc/modprobe.d | ||||||
|   if [ ${ignore_msrs} = "N" ]; then |   if [ -d /etc/modprobe.d ]; then | ||||||
|     while true ; do |     # Skip if already ignore_msrs is already enabled, assumes initramfs has been rebuilt | ||||||
|     read -p "Do you wish to set ignore_msrs now? (y/N)" msrs_response |     if grep -lq 'ignore_msrs=Y' /etc/modprobe.d/kvm-quickemu.conf >/dev/null 2>&1; then | ||||||
|           case $msrs_response:0:1 in |       echo "options kvm ignore_msrs=Y" | sudo tee /etc/modprobe.d/kvm-quickemu.conf | ||||||
|           [yY]* ) echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs; break;; |       sudo update-initramfs -k all -u | ||||||
|           * ) break ;; |     fi | ||||||
| 
 |   else | ||||||
|       esac |     echo "ERROR! /etc/modprobe.d was not found, I don't know how to configure this system." | ||||||
|     done |     exit 1 | ||||||
|   fi |   fi | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -873,6 +873,7 @@ function usage() { | ||||||
|   echo "You can also pass optional parameters" |   echo "You can also pass optional parameters" | ||||||
|   echo "  --delete                : Delete the disk image." |   echo "  --delete                : Delete the disk image." | ||||||
|   echo "  --display               : Select display backend. 'sdl' (default), 'gtk' or 'spice'" |   echo "  --display               : Select display backend. 'sdl' (default), 'gtk' or 'spice'" | ||||||
|  |   echo "  --ignore-msrs-always    : Configure KVM to always ignore unhandle machine-specific registers" | ||||||
|   echo "  --shortcut              : Create a desktop shortcut" |   echo "  --shortcut              : Create a desktop shortcut" | ||||||
|   echo "  --snapshot apply <tag>  : Apply/restore a snapshot." |   echo "  --snapshot apply <tag>  : Apply/restore a snapshot." | ||||||
|   echo "  --snapshot create <tag> : Create a snapshot." |   echo "  --snapshot create <tag> : Create a snapshot." | ||||||
|  | @ -976,6 +977,9 @@ else | ||||||
|             fi |             fi | ||||||
|             shift |             shift | ||||||
|             shift;; |             shift;; | ||||||
|  |           -ignore-msrs-always|0-ignore-msrs-always) | ||||||
|  |             ignore_msrs_always | ||||||
|  |             exit;; | ||||||
|           -snapshot|--snapshot) |           -snapshot|--snapshot) | ||||||
|             SNAPSHOT_ACTION="${2}" |             SNAPSHOT_ACTION="${2}" | ||||||
|             if [ -z "${SNAPSHOT_ACTION}" ]; then |             if [ -z "${SNAPSHOT_ACTION}" ]; then | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue