When I run vagrant up from the command line, it is a crap shoot at best as to whether vagrant will boot up or not. It stops at this line:
SSH auth method: private key
And then may or may not include this line:
Warning: Remote connection disconnect. Retrying...
As I said, sometimes it works and sometimes it does not. Why is this problem happening? For the record it would happen (less often) on my production MacBook at work.
Can I maybe change the auth method if there is no good answer for this? Trust me I have been looking and not found any answer on this yet.
whats happening is the following :
vagrant up will spin a new VM, basically it contacts virtualbox (or the specific provider) and run command to start a VM
the VM will start on the virtualbox side
note: if you run form a command line terminal in macos, you can see the title switching from 'Ruby' to 'VBoxManage'
the VM takes some time to start
because the VM does not send a specific signal when its done, vagrant will check at regular interval if the VM is fully booted and available to ssh-in
once the VM is available, vagrant can run the ssh command and complete the config (network, shared folder, etc...)
so in your case, the VM takes a bit longer to boot (this can be due to high activity on your mac, specific setup of the VM that runs on boot ...)
Basically this is harmless and is not necessarily a bad sign.
Please look at my accepted answer on this. It turns out that this was a memory allocation issue, and I only discovered it when watching the terminal for the VM provider (VirtualBox). Once I closed some programs I was (generally) able to boot up just fine.
There seems to be an incompatibility problem with Vagrant/VirtualBox & the Windows Hypervisor Platform feature in Windows 10
I had this problem and this is how I got get Vagrant & WSL2 working side by side
I have the following environment:
Hardware Virtualization enabled in BIOS
Windows 10 (Insider Program with Release Preview Channel)
-- Windows 10 with WSL 2 Version 10.0.19041 Build 19041
VirtualBox 6.1.12
-- Extension Pack Installed
Vagrant 2.2.9
These are the settings that worked for me:
Windows Hypervisor Platform: Off
Virtual Machine Platform: On
Windows Subsystem for Linux: On
Related
We are using Trellis and Vagrant to provision developer WordPress instances on windows machine (within the Windows Subsystem for Linux.) On one machine we are having a lot of issues, and have managed to figure out that the Vagrant::Util::Platform.platform variable is set to mingw32 on the machines that work well, but it is set to linux-gnu on the problematic machine.
Tracing back a bit further to https://github.com/hashicorp/vagrant/blob/master/lib/vagrant/util/platform.rb it appears that Vagrant uses RbConfig::CONFIG["host_os"] to determine the platform.
Not sure where to proceed from there - what would cause Ruby to report Linux in the WSL of one machine, but Windows on the WSL of another machine?
I've Windows 10 Pro system, and use Hyper-V on that system. Due to the needs of device redirection doesn't works well with Hyper-V, I've installed VMWare Workstation 14.
I have to disable Hyper-V to make VMWare Workstation work, at beginning. It worked until last weekend , seems because of the QFE update. I just verified, it was not QFE but Feature update to Windows 10, version 1803 that triggered the problem with VMWare Workstation again.
After Windows update completed (after reboot), I tried to start a VM in VMWare. I get the error dialog complaining about Device/Credential Guard.
Following the instruction in this link: https://kb.vmware.com/s/article/2146361, and after the reboot, I get another complaint about incompatibility with Hyper-V.
After reset the Hyper-V selection in Windows Feature or confirm that HyperV is not already removed, and reboot, the first error came back.
It gets in a loop of error complaining about Device Guard and complaining about Hyper-V for VMWare.
Ok, thanks to the answer from communities of VMWare: https://communities.vmware.com/thread/588526
The issue is now gone, by applying the following change:
Disable credential guard by using readiness tool from Microsoft: https://www.microsoft.com/en-us/download/details.aspx?id=53337, with this command: DG_Readiness_Tool_v3.2.ps1 -disable
Disable Hyper-V by using PowerShell command: Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
Reboot and accept to boot without CG/DG.
Although I don't like that VMWare cannot work together with device guard from system, I get my VM working for the moment.
1- run cmd as admin
2- run : bcdedit /set hypervisorlaunchtype off
3- reboot
let me knew if it works please
good luck
here are the few steps for you to solve this issue:
Disable the HvHost service (and any other services with prefix Hyper-V if needed) from windows TaskManager(Ctrl+Alt+Del)
use the tool from the official website
Uncompress the downloaded zip file to your own directory, take C:\DG_Readiness_Tool_v3.5 here for instance.
Run Windows PowerShell as admin, type the following two commands:
cd C:\DG_Readiness_Tool_v3.5
.\DG_Readiness_Tool_v3.5.ps1 -Disable
Reboot
Adrian at https://answers.microsoft.com/en-us/windows/forum/windows_10-security/cannot-disable-memory-integrity-core-isolation-in/29ac5ce4-30d2-47d1-ab17-734980fd287b
says "I think it's a bug that this cannot be disabled via UI but fortunately it's possible through the registry by setting the following key to 0:"
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity\Enabled
This worked for me as well [Windows 10 Pro Version 1803(OS Build 17134.112, VMWare Workstation 14 Pro Version 14.1.2]
I'm running docker for mac and want to start up a windows container. From what I see this should work via a virtual machine. But I'm unclear where to find out how to get it to work? Or does it only work for linux containers? Thanks in advance!
docker build nanoserver/
Sending build context to Docker daemon 2.56kB
Step 1/6 : FROM microsoft/nanoserver:10.0.14393.1480
10.0.14393.1480: Pulling from microsoft/nanoserver
bce2fbc256ea: Pulling fs layer
baa0507b781f: Pulling fs layer
image operating system "windows" cannot be used on this platform
I know I am late to the party but as of 2021, this is the easiest setup to get a windows container running on macOS:
https://github.com/StefanScherer/windows-docker-machine
Install vagrant and virtual box
Clone the repository above and change directory into it
vagrant up --provider virtualbox 2019-box
docker context use 2019-box
I followed this setup and I could use the following windows image
mcr.microsoft.com/windows/servercore:ltsc2019
Please note that the windows version of your host must match the container image. This is mentioned here: https://hub.docker.com/_/microsoft-windows
Windows requires the host OS version to match the container OS
version. If you want to run a container based on a newer Windows
build, make sure you have an equivalent host build.
See this link:
https://forums.docker.com/t/how-do-i-start-a-windows-docker-container-on-my-mac-os-x/12953/2
Text if you can't follow the link:
On OS X, get VirtualBox.
Get Windows Server 2016 Tech Preview 5 ISO167 (free download from Microsoft)
Create WS 2016 TP5 VM in virtualbox
Run this206 in the new VM
Now you can run Windows Containers in the VM. To make the setup a little easier to use, see this: https://forums.docker.com/t/windows-server-2016-tp5-docker-server-remote-management/10315/5317
You could also install Bootcamp on your machine which allows you to dual boot your computer between OS X and Windows 10. You could then use the full power of your hardware dedicated to Windows and docker instead of virtualization.
Additionally, you can make the use of VMWare Fusion for Mac OS or Parallels, which allow you to ALSO access the dual boot windows partition from within the Mac OS for maximum flexibility. During installation make sure you do not create a Virtual Machine drive, but instead access the bootcamp partition directly.
The VM I was trying to run was running perfectly on a Windows 7 machine.
I had upgraded to Windows 10 and tried out the same machine (with all the same configs and vagrant boxes), uninstalled and reinstalled virtualbox several times, but it still doesn't work.
Tried making a brand new VM - that didn't work too.
Here's the error
Some people who had similar 'hostonly' errors have suggested to restart the VirtualBox service from terminal, but I don't know the Windows equivalent of that command.
Anybody had this error before? How do I solve this?
A test build is available at https://www.virtualbox.org/download/testcase/VirtualBox-5.0.1-101902-Win.exe . This should fix the host-only interface creation problem by introducing a 5-second timeout when querying the registry key. We would appreciate feedback (i.e. does it fix the host-only interface creation errors or not, is the timeout long enough).
https://www.virtualbox.org/download/testcase/VirtualBox-5.0.1-101902-Win.exe
See https://www.virtualbox.org/ticket/14040#trac-change-55
Uninstalling the current VirtualBox and installing the testbuild worked for me
I have the same error and it seems to be a problem with changed network security in Windows and still no updated for it in Virtualbox.
Not pretty but a working solution (tested under Win10 build10130). This is what I did to get homestead up and working
Uninstall Vagrant and VirtualBox (restart if necessary)
Install notepad+ or other notepad replacement that handles linux line-endings
Download Vagrant v1.7.2, VirtualBox 5.0RC1, VirtualBox v4.3.6
Enable built-in administrator account.
net user administrator /active:yes
switch to Administrator account
Install Vagrant v1.7.2 (restart if necessary, log back into Administrator)
Install VirtualBox v5.0RC1
Install VirtualBox v4.3.6
Update VBox Host-Only adaptor driver (device manager,Search Automatically)
Edit VagrantFile file (where ever you vagrant up from) and change all ~/ to C:/Users/username/
Edit Homestead.yaml (Where ever you had it, likely C:\Users\username\.homestead) and change all ~/ to C:/Users/username/
Open VirtualBox
Run vagrant up
switch back to your usual user (do not sign out of Adminstrator)
hey presto, you have a working homestead
Each time after to manage vagrant (start, halt, whatever) switch to Administrator, manage, and switch back to your usual user. Do not sign out of the Administrator account when switching if you have a box up
I have recently started using VirtualBox to get my Linux environment rather than fully using Ubuntu. For me this works well. But recently i have realized that in the Ubuntu vm the only thing I use a lot is the terminal, mostly just because I need the Linux environment and not the full desktop.
So I tried installing Ubuntu server into a VM, which worked. But as soon as I reboot the machine, it fails after the system boot logo. After BIOS and where I would log on from the command line I simply get a black screen with a non blinking cursor. So I am never fully able to boot into the vbox.
I read up on the command line version, trying to run it headless and then connecting to it from demote desktop. after starting the vbox I am able to connect to the desktop and see the grub screen but after selecting Ubuntu I get that same non-blinking cursor.
So is this really possible? I tried cygwin but it never really felt adequate to me. I like and am very comfortable with the Ubuntu/Debian command line. How could I (if possible) accomplish this? I want to be bale to start up the VBox and get the full command line for that vbox session. Any ideas?
Ubuntu version: 10.10, VirtualBox v. 4.0.4 r70112 and I am on Windows 7 Ultimate.
You didn't mention the versions of Ubuntu and Virtualbox.
I failed twice to install full Ubuntu 10.10 over the latest VirtualBox 4.0.4 over Ubuntu (problems like those you describe), so I switched to Debian 6.0.
All you require to install Ubuntu headless is to install the server version, which you already did. If you get blank screens, tweak the ioapic settings in both VB and Ubuntu. Another tweak is to switch between IDE and SATA drivers for the main disk (the Grub in my non-virtualized Ubuntu hangs if there's USB media attached at boot time).
If you can run full Ubuntu on a VM, you can try downgrading it by removing the xserver-xorg package, or changing the default runlevel.
If all you want is a Linux consule, you can install Debian 6 without any GUI components.