Managing Virtualbox shared disks with Vagrant

186 views
Skip to first unread message

Jeff Sussna

unread,
Jun 19, 2015, 2:51:58 PM6/19/15
to vagra...@googlegroups.com
I'm trying to create a Vagrant configuration for Red Hat gfs. I need to set up a Virtualbox shared disk between two VM's. I can't find any information on managing that configuration via Vagrantfile instead of doing it manually in Virtualbox. Would appreciate any pointers.

Alvaro Miranda Aguilera

unread,
Jun 19, 2015, 8:09:42 PM6/19/15
to vagra...@googlegroups.com
Hello Jeff

I have that problem solved :)

Have a look at this Vagrantfile for ideas:
https://github.com/kikitux/racattack-ansible-oracle/blob/master/Vagrantfile

I will reproduce the important part here:

https://gist.github.com/kikitux/38208e1acd41f0c5de0e

basically the steps are:

if the file disk.vdi doesn't exist
create it as fixed size
change it to shareable
end

attach disk to vm


The gist have a loop, so you can define by code size, number, path

hope this helps

Alvaro.
> --
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vagrant-up+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jeff Sussna

unread,
Jun 22, 2015, 11:44:54 AM6/22/15
to vagra...@googlegroups.com
This is working very nicely for me, with a few minor modifications to the storageattach call:

set --storagectl to 'IDE Controller'
set --port to 0
set --device to 1

Thanks for your help! 
Reply all
Reply to author
Forward
0 new messages