mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Vars refactor: Replace cores with CORES_VM
This commit is contained in:
		
							parent
							
								
									62b6286564
								
							
						
					
					
						commit
						d5e669441b
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		
							
								
								
									
										10
									
								
								quickemu
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								quickemu
									
										
									
									
									
								
							|  | @ -190,14 +190,14 @@ function vm_boot() { | ||||||
|     echo " - Drivers:  ${driver_iso}" |     echo " - Drivers:  ${driver_iso}" | ||||||
|   fi |   fi | ||||||
| 
 | 
 | ||||||
|   local cores="1" |   local CORES_VM="1" | ||||||
|   local CORES_HOST=$(nproc --all) |   local CORES_HOST=$(nproc --all) | ||||||
|   if [ ${CORES_HOST} -ge 8 ]; then |   if [ ${CORES_HOST} -ge 8 ]; then | ||||||
|     cores="4" |     CORES_VM="4" | ||||||
|   elif [ ${CORES_HOST} -ge 4 ]; then |   elif [ ${CORES_HOST} -ge 4 ]; then | ||||||
|     cores="2" |     CORES_VM="2" | ||||||
|   fi |   fi | ||||||
|   echo " - CPU:      ${cores} Core(s)" |   echo " - CPU:      ${CORES_VM} Core(s)" | ||||||
| 
 | 
 | ||||||
|   local ram="2G" |   local ram="2G" | ||||||
|   local allram=$(free --mega -h | grep Mem | cut -d':' -f2 | cut -d'G' -f1 | sed 's/ //g') |   local allram=$(free --mega -h | grep Mem | cut -d':' -f2 | cut -d'G' -f1 | sed 's/ //g') | ||||||
|  | @ -277,7 +277,7 @@ function vm_boot() { | ||||||
|     -enable-kvm \ |     -enable-kvm \ | ||||||
|     -machine q35,accel=kvm \ |     -machine q35,accel=kvm \ | ||||||
|     -cpu host,kvm=on \ |     -cpu host,kvm=on \ | ||||||
|     -smp ${cores} \ |     -smp ${CORES_VM} \ | ||||||
|     -m ${ram} \ |     -m ${ram} \ | ||||||
|     -device virtio-balloon \ |     -device virtio-balloon \ | ||||||
|     -netdev ${NET},id=nic \ |     -netdev ${NET},id=nic \ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue