Vagrant up on Windows 10 virtualbox ignores administrative rights - vagrant

I'm trying to set Vagrant's sync_type to smb, but fail on running vagrant up after changing the configuration.
I receive the following error:
SMB shared folders require running Vagrant with administrative
privileges. This is a limitation of Windows, since creating new
network shares requires admin privileges. Please try again in a
console with proper permissions or use another synced folder type.
I launched both VirtualBox (the GUI) and Cygwin in administrator mode, but the error persisted. Using Git Bash, Powershell or CMD instead of Cygwin didn't fix it. Also re-installing VirtualBox as administrator did not change anything.
I'm running VirtualBox 5.0.24 r108355, Vagrant 1.8.4 and Windows 10 Pro, build 10586.420.
How can I get vagrant to recognize and use the administrator rights?
UPDATE
I found I am able to launch the machine from the VirtualBox GUI (started as admin), suggesting that the VirtualBox interface used by Cygwin may not be running in administrator mode. However, I'm currently unable to connect to the machine through Cygwin.
UPDATE 2
Running VirtualBox GUI as regular user also allowed me to boot the machine.

To use the SMB synced folder type, the machine running Vagrant must be a Windows machine with PowerShell version 3 or later installed. In addition to this, the command prompt executing Vagrant must have administrative privileges. Vagrant requires these privileges in order to create new network folder shares.
https://www.vagrantup.com/docs/synced-folders/smb.html#prerequisites

Related

Windows 10 Vagrant is stopping at "SSH auth method: private key"

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

Virtualbox throwing errors on Windows 10 TP on vagrant up

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

How to initialize and run Docker on windows?

I have Docker installed on Windows 7 platform. However when I try to run boot2docker start, the console gives me:
Failed to get machine 'boot2docker-vm': machine does not exist.
Ok, so I try to initialize the machine: boot2docker init. What now happens is even though I have the ISO image on the same path as docker, it tries to download a new image (and then fails to do so).
I uninstalled both OracleVM and GIT before installing them with boot2docker bundle as advised on Docker forums, but now I don't know how to proceed.
I had the same problem on a Windows 7 64 bit system when I installed the entire boot2docker package. It seems that running the solely 64-bit based boot2docker image from a 32-bit OS image (e.g. created by Virtualbox) does not work.
The solution for me was
to activate Intel Virtualisation Technolologies in my BIOS
(Lenovo X61 for me). Note that the settings can be found either
under CPU or Security.
choose a 64 bit OS version in VirtualBox and boot in with the
image obtained by boot2docker.
In case you're trying to do this now
For Windows 10 64-bit: Pro, Enterprise, or Education (Build 15063 or later), follow the instructions to install Docker Desktop here https://docs.docker.com/docker-for-windows/install/.
If you have Windows systems that do not meet the requirements of Docker Desktop for Windows(in my case Microsoft Windows 10 Home Single Language), you can install Docker Toolbox by following the instructions here https://docs.docker.com/toolbox/toolbox_install_windows/.
boot2docker does not support sharing directories on Windows IIRC. The way I run Docker on windows is:
install VirtualBox
install Vagrant
create a directory (let's say c:\vm\docker)
download this Vagrantfile and save it under c:\vm\docker\Vagrantfile
open a DOS command prompt
go to the directory cd c:\vm\docker
start the VM vagrant up and wait for it to install, start up and get provisionned
connect to the VM vagrant ssh
play with docker docker images, etc
Also you might want a real console instead of using the DOS command prompt:
install Git Bash for Windows
install Console
setup Console to use Git Bash (see this guide)
use Console to run the vagrant up and vagrant ssh commands

Accessing machine through wifi

I have one computer running ubuntu operating system. It is having a wifi router connected to it. I have other laptop which runs windows 7 operating system.
Is there a way to access the ubuntu machine from windows machine through wifi and vice versa ?
You can use TeamViewer in both windows and linux. It will give you full control of the remote machine but I'm not sure if you can do file transfering...
For file transferring, connecting from windows to linux I would use winSCP, which access files through ssh, so you would have to install an run sshd on your linux box. If you haven't sshd in your ubuntu box, install it by doing $ sudo apt-get install ssh. You can start ssh daemon in ubuntu 11.10 with the command $ sudo service ssh start. From linux (Ubuntu 11.10) to windows (w7), I have successfully got into w7 machines in my local network by exploring the Network section in the left bar of the nautilus explorer. Sometimes, for some folders it would ask me for credentials to log into the remote machine, and file transferring was as simple as doing copy and paste (Ctrl+c, Ctrl+v)
hope to be helpful! good luck!
VNC is good for remote work on both Windows and Linux. You'll need to install VNC on Windows but I believe it comes by default with Ubuntu. You need to configure one to be the server and then you can use a client from the other machine to connect to it and remotely control the server machine.
Here are some resources for VNC in Ubuntu: https://help.ubuntu.com/community/VNC
And I use TightVNC when I'm working on Windows (server and client included in the install).
Install XRDP on Ubuntu.
on windows then run msrtc -v
if over the internet , I say use
https://www.dwservice.net/en/download.html
free and lot better than teamviwer.

Accessing files outsude VMWare

I am running Oracle Enterprise Linux on VMWare. I now want to install Oracle which is is located on my C drive in Windows. Is there a way to copy this file to a folder in my virtual machine?
If its just once off, easiest way is to install winscp onto your windows host, setup a bridged or host only network on the vmware server and using winscp to copy the files in.
I think you can install vmware tools which would allow for shared folders, but last time I tried I ran into some issues and gave up.

Resources