In this tutorial, I have written The commands when creating a virtual machine in VirtualBox using Vagrant.
- VirtualBox Installed
- Vagrant Installed
The first, command at the time of creating
The box is searched from Vagrant Cloud.
Create a directory for the virtual machine you want to create and change to it.
mkdir vagrant_test cd vagrant_test
Initialize the directory and create a Vagrantfile.
vagrant init ubuntu/trusty64
The contents should be as follows. If the box name is different, rewrite it.
cat Vagrantfile Vagrant.configure("2") do |config| config.vm.box = "ubuntu/trusty64" end
Start the virtual machine. A box has been added at this time.
Other used commands Vagrant
vagrant box add your-box-name
Added box list
vagrant box list
vagrant box remove your-box-name
Virtual machine shutdown
Delete virtual machine
Check virtual machine status
You have to use Command creating a virtual machine in vagrant. I hope will this your helpful. Thank you for reading the DevopsRoles page!
1 thought on “Command creating a virtual machine in vagrant”