mirror of
				https://github.com/linuxkit/linuxkit.git
				synced 2025-11-04 08:07:48 +00:00 
			
		
		
		
	Merge pull request #2534 from deitch/improve-mac-qemu-message
Better error message when running qemu on macOS when --fw not supplied
This commit is contained in:
		@@ -359,6 +359,10 @@ func runQemuLocal(config QemuConfig) error {
 | 
				
			|||||||
	// Check for OVMF firmware before running
 | 
						// Check for OVMF firmware before running
 | 
				
			||||||
	if config.UEFI {
 | 
						if config.UEFI {
 | 
				
			||||||
		if config.FWPath == "" {
 | 
							if config.FWPath == "" {
 | 
				
			||||||
 | 
								// there is no default on mac
 | 
				
			||||||
 | 
								if runtime.GOOS == "darwin" {
 | 
				
			||||||
 | 
									return fmt.Errorf("To run qemu with UEFI firmware on macOS, you must specify the path to locally installed OVMF firmware as `--fw <path>`. You can download OVMF from https://sourceforge.net/projects/edk2/files/OVMF/ ")
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
			config.FWPath = defaultFWPath
 | 
								config.FWPath = defaultFWPath
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if _, err := os.Stat(config.FWPath); err != nil {
 | 
							if _, err := os.Stat(config.FWPath); err != nil {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user