Vagrant init command not found


hello
I am trying to create a vagrant file using the vagrant init centos/7 command. However, i see the message

vagrant:command not found.

How do i rectify this?

Hi @kineret14,

Simply download the vagrant binary first.

Regards,

hi @Tej-Singh-Rana i downloaded but it still doesn’t work

Why are you trying to run Vagrant from inside osboxes?

The osboxes is a virtual machine, so presumably you already ran Vagrant on your laptop to actually get an osboxes to run.

You can’t create VMs inside VMs.

hi @Alistair_KodeKloud thank you for the comment, but I don’t understand what I should do. Where should I write this command? Can i use in Git Bash?

How did you get osboxes to run in the first place?

Your screenshot shows you SSH connected to an oxboxes VM. Did you start that with Vagrant, or from the Virtual Box UI?

Vagrant is used to automate the process of creating a VM using Virtualbox.

@Alistair_KodeKloud I started that with Virtual Box UI

So basically it’s this

  • You cannot run vagrant inside your osboxes VM - even if you did get it installed. Vagrant is for creating VMs, and you’re already inside a VM. I very much doubt VirtualBox supports nested virtualization (VM inside VM), and your CPU would also have to support it.
  • You could run Vagrant on your laptop to tell VirtualBox to launch a VM (e.g. the osboxes one), so you don’t have to do the config in the UI - that’s what it’s for.