I try to create a docker-machine with docker for Windows 10
using next command:
docker-machine create --driver hyperv default
But I get the next error
Error with pre-create check: "Hyper-v commands have to be run as an Administrator"
Anyone knows how to fix this issue? Thanks
Simply start cmd (terminal) as admin.
Otherwise, if this does not work: there is a known issue #2989 in docker machine: the creation of a Docker machine fails with the error message "Hyper-v commands have to be run as an Administrator", even if your user is member of the Hyper-V Administrator group and the Hyper-V Administrators have full access to the folder containing the VM:
λ Get-Acl E:\docker\ | Format-List
...
Access : BUILTIN\Hyper-V Administrators Allow FullControl
jtnord has found a workaround by creating a VM with fixed-size disk. He has tested this for users that are group members of Hyper-V Administrators and he has given FullControl for the base Folder for Hyper-V Administrators, as I understand it.
Just Add your current user to "Local Group": 'Hyper-V Administrators'.
Check your <current username> by:
> whoami
Start cmd.exe
by Administrator:
> net localgroup
> net localgroup "Hyper-V Administrators" <current username> /add
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With