Install Virtualbox Guest Additions on the guest OS.įrom Host computer, copy to VBoxGuestAdditions.iso ~/vagrant/centos7. Vagrant ssh Step 5: Install VirtualBox Guest Additions Now start vagrant box cd ~/vagrant/centos7 cp ~/VirtualBox VMs/centos-asterisk/centos-asterisk-disk1.vmdk ~/VirtualBox VMs/centos7/box-disk1.vmdk Make sure the Virtual Machine is off, if not turn it off. Next thing to do is copy centos-asterisk-disk1.vmdk to box-disk1.vmdk. To rename go to Virtual Machine > General > Basic > Name Before you can rename you have to turn it off. Now rename your added VM on Virtualbox Gui. We need to copy this file to the directory containing vagrant VM we added “ centos7“. With the name of vmdk as centos-asterisk-disk1.vmdk. Step 4: Copy VM Virtual DiskĬhange directory to VirtualBox VMs directory and find the name of Virtualbox VM that we want to make newly added box use. Retrying…”, try press CTL+C and use vagrant ssh to login. If you get error message “default: Warning: Connection timeout. If successful in spinning up, you should be logged in by default. cd ~/vagrant/centos7Ĭreate a file called Vagrantfile and paste below data. adduser.sh Step 3: Create Base vagrant boxĬhange to directory containing CentOS vagrant box you downloaded. Wget -no-check-certificate '' -O /home/vagrant/.ssh/authorized_keysĬhmod 0600 /home/vagrant/.ssh/authorized_keysĮcho 'Welcome to your Vagrant-built virtual machine.' > /etc/motd usr/sbin/useradd vagrant -g vagrant -G wheelĮcho "vagrant ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/vagrant # Add vagrant user /usr/sbin/groupadd vagrant If missing, create a username called “ vagrant” with password “ vagrant“. You current VM which you need to convert to Vagrant box need to have vagrant user created. Mkdir centos7 Step 2: Create vagrant user on existing VM
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |