mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Use new style -netdev
This commit is contained in:
		
							parent
							
								
									cbe9125730
								
							
						
					
					
						commit
						8e214447e8
					
				
					 1 changed files with 7 additions and 5 deletions
				
			
		
							
								
								
									
										12
									
								
								quickemu
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								quickemu
									
										
									
									
									
								
							|  | @ -192,13 +192,15 @@ function vm_boot() { | ||||||
|   fi |   fi | ||||||
|   echo " - Display:  ${xres}x${yres}" |   echo " - Display:  ${xres}x${yres}" | ||||||
| 
 | 
 | ||||||
|   local NET="" |   # Set the hostname of the VM | ||||||
|  |   local NET="user,hostname=${VMNAME}" | ||||||
|  | 
 | ||||||
|   # If smbd is available, export $HOME to the guest via samba |   # If smbd is available, export $HOME to the guest via samba | ||||||
|   if [ -e /snap/qemu-virgil/current/usr/sbin/smbd ]; then |   if [ -e /snap/qemu-virgil/current/usr/sbin/smbd ]; then | ||||||
|       NET=",smb=${HOME}" |       NET="${NET},smb=${HOME}" | ||||||
|   fi |   fi | ||||||
| 
 | 
 | ||||||
|   if [ -n "${NET}" ]; then |   if [[ ${NET} == *"smb"* ]]; then | ||||||
|     echo " - smbd:     ${HOME} will be exported to the guest via smb://10.0.2.4/qemu" |     echo " - smbd:     ${HOME} will be exported to the guest via smb://10.0.2.4/qemu" | ||||||
|   else |   else | ||||||
|     echo " - smbd:     ${HOME} will not be exported to the guest. 'smbd' not found." |     echo " - smbd:     ${HOME} will not be exported to the guest. 'smbd' not found." | ||||||
|  | @ -223,8 +225,8 @@ function vm_boot() { | ||||||
|     -cpu host,kvm=on \ |     -cpu host,kvm=on \ | ||||||
|     -m ${ram} \ |     -m ${ram} \ | ||||||
|     -smp ${cores} \ |     -smp ${cores} \ | ||||||
|     -net nic,model=virtio \ |     -netdev ${NET},id=nic \ | ||||||
|     -net user"${NET}" \ |     -device virtio-net,netdev=nic \ | ||||||
|     -rtc base=localtime,clock=host \ |     -rtc base=localtime,clock=host \ | ||||||
|     -serial mon:stdio \ |     -serial mon:stdio \ | ||||||
|     -audiodev pa,id=pa,server=unix:$XDG_RUNTIME_DIR/pulse/native,out.stream-name=${LAUNCHER}-${VMNAME},in.stream-name=${LAUNCHER}-${VMNAME} \ |     -audiodev pa,id=pa,server=unix:$XDG_RUNTIME_DIR/pulse/native,out.stream-name=${LAUNCHER}-${VMNAME},in.stream-name=${LAUNCHER}-${VMNAME} \ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue