# Ansible script to spin up the VM in virtual box

**URL:** <https://forum.ansible.com/t/ansible-script-to-spin-up-the-vm-in-virtual-box/20821>\
**Category:** Ansible Project\
**Created:** [March 10, 2016, 6:38am UTC](https://forum.ansible.com/t/ansible-script-to-spin-up-the-vm-in-virtual-box/20821 "2016-03-10T06:38:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ram](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@Ram](https://forum.ansible.com/u/Ram)\
**Post date:** [March 10, 2016, 6:38am UTC](https://forum.ansible.com/t/ansible-script-to-spin-up-the-vm-in-virtual-box/20821/1 "2016-03-10T06:38:29Z")

</div>

Hi,

I am new to Ansible, and i am from Microsoft tech background,

i want to spin and setup an VM with redhat linux in the Virtual box, after setup the VM, i need to setup tomcat, so have installed the ansible in mac book, but from there how to setup an VM in oracle virtual box is little bit confused with vagrant.

please help the steps/article to setup VM with redhat linux in Virtual box using ansible.

Thanks  
Ram

---

<div class="post-metadata">

**Author:** ![Kevin\_Bullock](https://avatars.discourse-cdn.com/v4/letter/k/f1d935/32.png) [@Kevin\_Bullock](https://forum.ansible.com/u/Kevin_Bullock)\
**Post date:** [March 11, 2016, 3:30am UTC](https://forum.ansible.com/t/ansible-script-to-spin-up-the-vm-in-virtual-box/20821/2 "2016-03-11T03:30:29Z")

</div>

Have you looked into Vagrant \<[https://www.vagrantup.com](https://www.vagrantup.com)\>? You can create a Vagrantfile that sets up the virtual machine and then invokes Ansible to provision it with the playbook you specify. Their docs are pretty good on how to do this.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和

Kevin R. Bullock

---

<div class="post-metadata">

**Author:** ![Vijay\_Gongle](https://avatars.discourse-cdn.com/v4/letter/v/dc4da7/32.png) [@Vijay\_Gongle](https://forum.ansible.com/u/Vijay_Gongle)\
**Post date:** [March 22, 2018, 1:51pm UTC](https://forum.ansible.com/t/ansible-script-to-spin-up-the-vm-in-virtual-box/20821/3 "2018-03-22T13:51:55Z")

</div>

Hello Ram,

I’m working on the same requirement.

Do you have solution for it now?

Can you help me in spinning up a VM in virtual bix using ansible, that would be great.

Thanks in advance.

Thanks,  
Vijay
