mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Allow persist MAC addresses for bridged interfaces. Fixes #287
This commit is contained in:
		
							parent
							
								
									8bb24f69c0
								
							
						
					
					
						commit
						2e15b1219f
					
				
					 3 changed files with 30 additions and 4 deletions
				
			
		
							
								
								
									
										10
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
										
									
									
									
								
							|  | @ -631,10 +631,18 @@ additional line to your virtual machine configuration: | |||
| # Bridged networking | ||||
| 
 | ||||
| Connect your virtual machine to a preconfigured network bridge. Add an | ||||
| additional line to your virtual machine configuration | ||||
| additional line to your virtual machine configuration: | ||||
| 
 | ||||
| -   `network="br0"` | ||||
| 
 | ||||
| If you want to have a persistent MAC address for your bridged network interface | ||||
| in the gust VM you can add `macaddr` to the virtual machine configuration. QEMU | ||||
| requires that the MAC address is in the range: **52:54:00:AB:00:00 - 52:54:00:AB:FF:FF** | ||||
| 
 | ||||
| So you can generate your own MAC addresses with: | ||||
| 
 | ||||
| -   `macaddr="52:54:00:AB:51:AE"` | ||||
| 
 | ||||
| # USB redirection | ||||
| 
 | ||||
| Quickemu supports USB redirection via SPICE pass-through and host | ||||
|  |  | |||
|  | @ -26,7 +26,6 @@ These are the options and defaults for the \<vm\>.conf file | |||
| ``` bash | ||||
| # Lowercase variables are used in the VM config file only | ||||
| boot="efi" | ||||
| bridge="" | ||||
| cpu_cores="" | ||||
| disk_img="" | ||||
| disk_size="" | ||||
|  | @ -35,7 +34,9 @@ floppy="" | |||
| guest_os="linux" | ||||
| img="" | ||||
| iso="" | ||||
| macaddr="" | ||||
| macos_release="" | ||||
| network="" | ||||
| port_forwards=() | ||||
| preallocation="off" | ||||
| ram="" | ||||
|  | @ -77,6 +78,7 @@ disk_img="windows-11/disk.qcow2" | |||
| iso="windows-11/Win11_EnglishInternational_x64.iso" | ||||
| fixed_iso="windows-11/virtio-win.iso" | ||||
| tpm="on" | ||||
| secureboot="on" | ||||
| ``` | ||||
| 
 | ||||
| -   `guest_os="windows"` instructs `quickemu` to optimise for Windows. | ||||
|  | @ -202,10 +204,18 @@ additional line to your virtual machine configuration: | |||
| # Bridged networking | ||||
| 
 | ||||
| Connect your virtual machine to a preconfigured network bridge. Add an | ||||
| additional line to your virtual machine configuration | ||||
| additional line to your virtual machine configuration: | ||||
| 
 | ||||
| -   `network="br0"` | ||||
| 
 | ||||
| If you want to have a persistent MAC address for your bridged network interface | ||||
| in the gust VM you can add `macaddr` to the virtual machine configuration. QEMU | ||||
| requires that the MAC address is in the range: **52:54:00:AB:00:00 - 52:54:00:AB:FF:FF** | ||||
| 
 | ||||
| So you can generate your own MAC addresses with: | ||||
| 
 | ||||
| -   `macaddr="52:54:00:AB:51:AE"` | ||||
| 
 | ||||
| # USB redirection | ||||
| 
 | ||||
| Quickemu supports USB redirection via SPICE pass-through and host | ||||
|  |  | |||
							
								
								
									
										10
									
								
								quickemu
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								quickemu
									
										
									
									
									
								
							|  | @ -1008,8 +1008,15 @@ function vm_boot() { | |||
|   elif [ -n "${network}" ]; then | ||||
|     # Enable bridge mode networking | ||||
|     echo " - Network:  Bridged (${network})" | ||||
| 
 | ||||
|     # If a persistent MAC address is provided, use it. | ||||
|     local MAC="" | ||||
|     if [ -n "${macaddr}" ]; then | ||||
|       MAC=",mac=${macaddr}" | ||||
|     fi | ||||
| 
 | ||||
|     # shellcheck disable=SC2054,SC2206 | ||||
|     args+=(-nic bridge,br=${network},model=virtio-net-pci) | ||||
|     args+=(-nic bridge,br=${network},model=virtio-net-pci${MAC}) | ||||
|   else | ||||
|     echo " - Network:  User (${NET_DEVICE})" | ||||
|     # shellcheck disable=SC2054,SC2206 | ||||
|  | @ -1418,6 +1425,7 @@ floppy="" | |||
| guest_os="linux" | ||||
| img="" | ||||
| iso="" | ||||
| macaddr="" | ||||
| macos_release="" | ||||
| network="" | ||||
| port_forwards=() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue