-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vagrant up times out on 'default: SSH auth method: private key' when 'VirtualMachinePlatform' Windows Feature is enabled #11987
Comments
Hi, |
I have the same issue. I am using many ubuntu boxes. After installing WSL2 suddenly all boxes stopped working - hang during VM boot at tthe step 'default: SSH auth method: private key'. Very annoying, as I definitely want to use WSL side by side with vagrant. In fact, when the vagrant hangs (and timeouts after that), the machine boots up fine - I can log in to it from VB, but it is not configured for vagrant - SSH auth not setup, so |
Can also confirm this issue happened after enabling WSL2 (Ubuntu) and Hyper-V on Windows 10 Home. Only sort-of solution: which only sometimes works is to keep trying Also looks like someone filed a issue in the Microsoft/WSL repo regarding this here microsoft/WSL#4599 Looks like right now you can only have either-or running. I've tried shutting down WSL and/or the distro running and it does not work. Workaround for now for me was to disable the
When I need to use Docker, I'll re-enable the feature:
Depending on your setup/Windows version, you may need to use DSIM. |
Same issue here. My current workaround is to open VirtualBox Manager and select the virtual maschine, my vagrant is boooting up. It seems wiered but having the vm just in focus in VirtualBox GUI during |
This is also a problem when using vagrant running on VMWare Workstation Pro 15. Which is annoying, since VMWare Workstation supports Hyper-V just fine, it's just vagrant that hangs. Curiously, rebooting my host usually fixes it, until the next time I do a vagrant reload. |
I was able to fix this by changing the Paravirtualization Interface for the VirtualBox machine from "Legacy" to either "Default" or "KVM". This can also be configured in the Vagrantfile with Disabling I/O APIC also solved the issue but I believe this prevents use of multiple CPUs. |
After a couple of days of trying to solve the problem with "SSH auth method: private key", it was found that windows 10 has a conflict with vagrant. As a tool to validate the status of virtualization, the program was used: "https://www.intel.com/content/www/us/en/download/12136/28539/intel-processor-identification-utility-windows-version .html " I show you the capture of the initial state: https://i.imgur.com/hidKDRN.png Fix it by disabling the following windows features: https://i.imgur.com/ZzjryTA.png Once the aforementioned features were deactivated and the computer was restarted, I share the new state of the processor where it is evident that virtualization is already working: https://i.imgur.com/IVzh4YR.png PS: On saying that you already activate virtualization on the board (bios) With this solution already vagrant works perfectly for me. |
I managed to solve this (I have Windows Hypervisor Platform disabled) by removing It should be recreated again next time you run Credit goes to this stackoverflow Answer. By the way: Next thing I was going to try is the VirtualboxWSL2 plugin. |
I installed Docker Desktop on my Ubuntu yesterday, and today I can't ssh private key to any virtualbox vagrant machine. |
I had a similar issue. Can you run this in PS to disable it:
Disable-WindowsOptionalFeature -Online -FeatureName "VirtualMachinePlatform"
When I need to use Docker, I'll re-enable the feature:
Enable-WindowsOptionalFeature -Online -FeatureName "VirtualMachinePlatform"
…On Tue, Apr 12, 2022 at 10:53 AM maltewhiite ***@***.***> wrote:
I installed Docker Desktop on my Ubuntu yesterday, and today I can't ssh
private key to any virtualbox vagrant machine.
—
Reply to this email directly, view it on GitHub
<#11987 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC3GJMEYKRXBTBZIOF27YLLVEWE57ANCNFSM4S2WNC7A>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I'm having the same issue, but it works with VirtualBox as a provider. It's when I use docker as a provider that it hangs at 'ssh auth method'. If I remove VirtualMachinePlatform, then docker won't start. I can see the docker screen for a few seconds in the VirtualBox preview. The guest activity shows CPU at almost 100%. No idea what it's doing. Eventually it times out; I've never been able to figure out how to get in. |
@jtrod - Oh sorry, I didn't see your message. What is PS? I am on Linux, so I don't think disabling windows features would do anything. |
You are right. My comment was for Windows users only, sorry.
PS stands for PowerShell
|
I had the same issue and trying your solution works fine. In my case I have two different Vagrant with Homestead/Laravel boxes and only the second had this problem. I have Docker Desktop installed on my Windows 10, too. I will test if it works fine disabing this feature. |
I have this issue, the solution is to disable WSL/Hyper-V yet a workaround to getting the box to boot is to open VirtualBox and click on the box your booting up and then run Very quirkily but it's a workaround if you want to have Docker, WSL and Vagrant running at the same time on a Windows 10+ machine. |
@NestorLV this is not an answer he specifically said
did you really read the question? |
Are you restarting your PC each time you change this? |
Yes. A reboot is needed
|
If you guys have |
In Fedora 38 you can solve this issue by putting your private key in private_key file under location .vagrant/machines/default/virtualbox This has solved my issue. |
Vagrant version
Vagrant 2.2.10
Host operating system
Windows 10 Home - Version 20H2 (19042.572)
Guest operating system
laravel/homestead
Vagrantfile
I haven't specified a provider. I have the Virtualbox
Version 6.1.16 r140961 (Qt5.6.2)
Debug output
https://gist.github.com/lwpamihiranga/ec3b306a5fa8e400964096d7b476191f
Expected behavior
vagrant up
should successfully spin up the box even when the WindowsFeatureVirtualMachinePlatform
is enabledActual behavior
vagrant up
times out ondefault: SSH auth method: private key
when the WindowsFeatureVirtualMachinePlatform
is enabled but it does not timeout(works fine) if I runvagrant up
when WindowsFeatureVirtualMachinePlatform
is disabledSteps to reproduce
VirtualMachinePlatform
should be enabled. If not enable it by running the following command on PowerShell as Administrator:dism.exe /online /Enable-Feature /FeatureName:VirtualMachinePlatform /all /NoRestart
. Thenrestart
the machinevagrant up
References
Note: I have enabled WSL 2 in my machine. The WindowsFeature
VirtualMachinePlatform
is necessary for WSL 2The text was updated successfully, but these errors were encountered: