Vagrant halt doesn't work - virtual-machine

I am trying to shut down Vagrant with vagrant halt command, but getting this error:
(blog-venv)vagrant#precise64:/vagrant$ vagrant halt The program 'vagrant' is currently not installed. You can install it by typing: sudo apt-get install vagrant
Why?

vagrant commands must be executed from the local machine. If you look at your bash prompt, you are still sshed (secure shelled) into your virtual machine. You need to exit the ssh session and then run the vagrant commands on your local machine in the local directory where your Vagrantfile configuration file is located.
You have SSHed into the vagrant machine.
first executeexit to get back to your machine and then executevagrant halt

Related

How to pass password to scp? (without root)

I need to download a file over SSH (scp) from Ubuntu machine A to ubuntu machine B.
I don't have a root access on the machine from I am downloading the file (machine B), so I cannot install anything like sshpass etc...Just clear Ubuntu.
I need to use password authentication because the command will be called inside TeamCity plugin which does not support downloading over SSH (just uploading) or plain bash. I don't have priviledge to read SSH private keys from command line.
Finally, I found that Docker is a solution for it. I was lucky that docker is installed on this machine and I can install anything (including scp) inside docker even if I am not root on the host machine.

What is going on and how do I fix it?

https://prnt.sc/hlt4ey
I'm trying to get onto the xfce4 client from my chromebook (and it has worked before), however now this error is popping up. How do I fix this error?
My guess is you may not have the right user privileges. According to the error message you provided you are running an Ubuntu Linux environment.
If you haven't tried running the program through the terminal yet, attempt to do so.
The terminal can typically be opened by the key combination Ctrl+Alt+T on ubuntu linux.
Try using sudo command before running the program. This will run the command you enter using root privileges.
For example, if running the program on your terminal is
myName#ubuntu: xfce4
And this encounters an error, try to use sudo beforehand like so:
myName#ubuntu: sudo xfce4
Alternatively you can log in and not have to type sudo before every command.
myName#ubuntu: sudo bash
password:
If this fails you may need to update the package that contains the library. This can be done on the terminal in a fashion similar to:
myName#ubuntu: sudo apt-get install --only-upgrade xfce4

Vagrant 1.9.6 hangs on command "vagrant ssh"

I have vagrant 1.9.6 and oracle virtual box 5.1.22 installed on my system. when I ran vagrant up and tried to switch into vagrant ssh on GIT bash it hangs there and nothing get it to work on me.
screenshot:
I solved mine by adding this line export VAGRANT_PREFER_SYSTEM_BIN=1 in my .bash_profile file. You can manually create this file on windows and place it on your home directory.
Take a look at this thread

Boot2Docker start up fails in windows

I am trying to start docker from winodws7 enterprise edition.
boot2docker start
results
Waiting for VM and Docker daemon to start...
..........................................................................oooooo
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
Started.
Trying to get Docker socket one more time
Error requesting socket: exec: "ssh": executable file not found in %PATH%
Docker client does not run on Windows for now. Please use
"boot2docker" ssh
to SSH into the VM instead.
I tried this link. But All answers doesn't help me. I have re-installed the boot2docker and powered off boot2docker-vm in Virtual machine and restarted. Virtualisation is enabled in my bios. My Sys has better capabilities.
Using 1.4.1 version.
Please Some Suggestions?
As boot2docker complained, you don't have ssh in your path. Please add ssh.exe into Windows path (it might not be visible, but boot2docker installation includes msys-git installation which includes ssh.exe, so you need to add Git installation directory in path, e.g.
c:\Program Files (x86)\Git\bin

Access Virtual Machine via PuTTY Using Built-in Command "vagrant ssh"

I have installed Vagrant, PuTTY, PuTTYgen and Virtual Box and I now want to
open a SSH connection to my virtual machine with the windows command prompt.
Every time I want to open the connection with the vagrant sshcommand I get this error:
vagrant ssh
`ssh` executable not found in any directories in the %PATH% variable. Is an
SSH client installed? Try installing Cygwin, MinGW or Git, all of which
contain an SSH client. Or use the PuTTY SSH client with the following
authentication information shown below:
I already know about the possibility to install "Git" to solve this problem!
I was wondering if its possible to use PuTTY in combination with the command vagrant ssh instead of OpenSSH!
For example:
With a batch file or something to ajust the syntaxes.
There is an official thread for Vagrant here which ended in no result AFAIR. But when googling for "vagrant putty" there seem to exist many plugins for Vagrant bringing that functionality, maybe through "hacks".
For reference: vagrant-multi-putty. Worked for me too on Windows after two simple commands: vagrant plugin install vagrant-multi-putty and vagrant putty (only for Vagrant 1.1 and newer),