mirror of
				https://github.com/containers/podman.git
				synced 2025-11-01 02:42:11 +08:00 
			
		
		
		
	hyperv: error if not admin
creating vsocks in windows requires admin privileges. there could be some workarounds made in the future,but the general deal has always been, you need to be admin. lets enforce this with an error until those work-arounds can be implemented. Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
		| @ -32,6 +32,9 @@ func Get() (vmconfigs.VMProvider, error) { | ||||
| 	case define.WSLVirt: | ||||
| 		return new(wsl.WSLStubber), nil | ||||
| 	case define.HyperVVirt: | ||||
| 		if !wsl.HasAdminRights() { | ||||
| 			return nil, fmt.Errorf("hyperv machines require admin authority") | ||||
| 		} | ||||
| 		return new(hyperv.HyperVStubber), nil | ||||
| 	default: | ||||
| 		return nil, fmt.Errorf("unsupported virtualization provider: `%s`", resolvedVMType.String()) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Brent Baude
					Brent Baude