Setting up Vagrant Windows - command-line

I am new to vagrant and I keep getting this error.
How can I properly run vagrant up so that I can continue with the setup process?

so once you have Vagrant and VirtualBox installed, the next steps are to create a Vagrantfile which basically is the configuration file for the VM you will build. It contains box information as well as network, sync folder and any provisioning you'll do on the VM.
for example, if you want to create an ubuntu VM:
$ vagrant init <ubuntu/wily64>
$ vagrant up
The first command (vagrant init) might take some time as it will download a VM from internet but you only run it once. then vagrant up will boot the VM

Related

Accessing host Python Virtual Environment from a Singularity container

I have a Singularity container with many tools along with Python and Jupyter installed in it. But I want to access the external virtual environments I have created for python while using the other tools in Singularity. The reason being I am experimenting with different python packages which cannot be installed into Singularity container without 'sudo' privileges. And I cannot install the other tools on my host machine due to sudo privileges.
I am able to activate the virtual environment but not able to use it: Get this error when I run pip command or Jupyter lab.
bash: /home/username/virtual-env/bin/pip: /home/username/virtual-env/bin/python: bad interpreter: No such file or directory
I want to run Jupyter lab from the virtual environment which is run from the Singularity container.

unable to run virtual machine through vagrant up

I tried to run a virtual machine through vagrant over VirtualBox. I installed VirtualBox and then Vagrant. Then, I cloned a repository from github using git clone http://github.com/<username>/fullstack-nanodegree-vm fullstack. Then, I changed directory to fullstack . In the git shell, I then run vagrant init and then tried to add box using vagrant box add hashicorp/precise64 but I got error as shown in the screenshot.
Then, I tried adding box using vagrant box add hashicorp/precise64 --insecure and I got this result.
Then, I ran vagrant up and then vagrant ssh. But, Still git shell is suggesting to run vagrant up again.
Please suggest something.
EDIT: After moving my project to C:\Nanodegree, I ran vagrant up and vagrant ssh but still getting problems.
The issue is due to ruby bug with directory with spaces.
Move your project out of the $USER_HOME directory or choose to have your username without any space (it will save you some issues if you have to work with some Linux tools)
Your Vagrantfile does not contain any information about the box to be used.
make sure to edit your Vagrantfile and have the following line in the file
config.vm.box = 'hashicorp/precise64'
NB: Its better to copy/paste the text of your terminal rather than having screenshot.

How can I ensure HGFS in CentOS via Vagrant?

I am using Vagrant (1.7.4) with the VMware Fusion provider.
I have created a new VM from the centos/7 box, and configured shared folders in my Vagrantfile.
On startup, I get the message
HGFS was never found on the running virtual machine. This must be
installed either through VMware tools or Open VM Tools. HGFS is
required for shared folders to work properly. Please install either
the VMware tools or Open VM Tools and try again.
after a while, and the system starts up, but without the mounted shared volume.
I have tried installing Open VM tools, with a
sudo yum -y install open-vm-tools
in my Vagrant provisioner inline shell script
config.vm.provision "shell", inline: <<-SHELL
sudo yum -y update
sudo yum -y install open-vm-tools
SHELL
However, I still get the message at startup, and I do not see the mounted share.
I have an almost identical Ubuntu box (precise/64) that seems to work just fine.
I looked up the box https://atlas.hashicorp.com/centos/boxes/7 and from the release notes they clearly mention that virtual box guest are not installed
The VirtualBox Guest Additions are not preinstalled; if you need them for shared folders, please install the vagrant-vbguest plugin. We recommend using NFS instead of VirtualBox shared folders if possible.
I think what they should mention is that they did not install the VMWare tools neither so default sharing folder with VMWare does not work.
How to install the VMWare tools for the VM
Make sure to mount a cd
Open VMWare Fusion and make sure the VM is down - open the VM settings, select the hard drive and add a device, select the CDRom.
boot the VM from the VM menu select Install VMWare Tools
Installing VMWare Tools
login to the VM (either from VMWare or open an ssh session with vagrant ssh)
Install pre-requisites and update kernel (at least I had to run to successfully install the VMWare tools on VMWare fusion 8.0 - see here)
sudo yum install perl gcc gcc-c++ make binutils
sudo yum update kernel
reboot and run the following again
sudo yum install kernel-headers kernel-PAE-devel
mount the VMWare tools
this is found from the VMWare doc - Make sure to run the below commands with root or add sudo
To create a mount point, run:
mkdir /mnt/cdrom
To mount the CDROM, run:
mount /dev/cdrom /mnt/cdrom
To copy the Compiler gzip tar file to a temporary local directory, run:
cp /mnt/cdrom/VMwareTools-<version>.tar.gz /tmp/
Where version is the VMware Tools package version. To determine the version of VMware tools, run:
ls /mnt/cdrom
You see output similar to:
VMwareTools-5.0.0-12124.tar.gz
To change to the tmp directory and extract the contents of the tar file into a new directory called vmware-tools-distrib, run:
cd /tmp
tar -zxvf VMwareTools-version.tar.gz
To change directory to vmware-tools-distrib and run the vmware-install.pl PERL script to install VMware Tools, run:
cd vmware-tools-distrib
./vmware-install.pl
After all this, the tools were installed and shared folder is working correctly.
as a side note I can say that its much easier building a box with packer and install the tools directly from install. There are plenty of packer templates available on github for all versions of centos.

How to uninstall eclipse che completely on mac osx?

How to uninstall eclipse che completely on mac osx?
Used mac osx installer to install binary. Seems che is always running on 8080 even killed the process and stopped docker.
https://eclipse.org/che/
I couldn't find the better way for uninstall on Mac but you can stop the Tomcat embedded in Eclipse Che.
The path is /Applications/EclipseChe3.12.5.2.app/Contents/Resources/eclipse-che/tomcat/bin
Next step is stop the Tomcat instance and finally delete the folder EclipseChe3.12.5.2.app because that's my Eclipse Che version.
So, I hope this is helpfully for you
If you are using Docker the process is different.
Get the list of active instance in Docker by running the following command in Terminal: docker ps
Then you can stop the running instance by running in docker stop XXX where XXX is the name of the running container instance. You may have more than one container instance to stop.
Then you can remove it by running docker rm XXX and then you can list images that are present on your system by running docker images
If you want to completely remove Che, then pickup for the images list the ones that are related to che and remove them by running the following command: docker mi image_name
Last command to stop docker on your mac will be docker-machin stop environment_name. If you do not know the name of the running environment you can figure it out by running docker-machine ls

Launcher service doesn't auto start on Ubuntu 14.04

For Linux installer, we have added a custom launcher for auto start of service (see pic below).
We are using install4j v5.1.6. It creates a link in /etc/init.d/myService.sh which points to the /bin/myService.sh .
It works properly in Ubuntu 13. On system restart, service auto starts properly.
On Ubuntu 14 this doesn't work. Service starts first time after installation. But on system restart, service doesn't auto start.
On further investigation, running these commands on Ubuntu 14 enabled auto start.
after installation
cd /etc/init.d
sudo update-rc.d myService.sh defaults
Under installer, install a service, auto start is set to true.
Is this a limitation of install4j that it doesn't register with update-rc.d ?
Do we know on which Linux systems copying to /etc/init.d/ is sufficient ?
Our script is similar to : www.shayanderson.com/linux/add-startup-script-or-service-with-linux-on-bootup.htm . What we don't have is update-rc.d and chkconfig. And install4j does the task of copying it to /etc/init.d/
Thanks !
http://s27.postimg.org/o5bih55kz/Launcher_Configuration.png
http://s3.postimg.org/icitxy96b/Launcher_Setup.png
As of 5.1.x, install4j does not integrate services into runlevels, it only creates the symlink to the start script in /etc/init.d.
Integrating it into runlevels has to be done manually, such as by calling update-rc.d or whatever other tool the particular distribution provides.