Multiple configs via NFS

Dan Egli ddavidegli at gmail.com
Mon Oct 14 02:27:54 MDT 2013


Hey folks. I've been thinking about something that was mentioned on the
list a day or two ago, and wanted to explore it a bit more.



If you've been paying attention to my questions over the last couple days,
you know I've got a project going on with a large number of computers (last
count was around 60) with virtual machines on them. That project is
basically done. However, it also inspired me to do a much smaller
experiment on my home setup. I'm still in the paper design stage right now,
and I was wondering if there's a way to do it via NFS though. Let me
explain what I'm thinking, and you guys can tell me if there's a better way
to do it.



Imagine three computers that would be hosts for four guest boxes each. Each
has an identical hard disk drive to start, but then makes a few changes
over time, eventually reaching as much as a 10% delta between each other.
I'd like to store the virtual disk images on an NFS server and have the
actual hosts be diskless PXE boot machines. But the issue, of course, is
the config file and disk image files for each machine that would need to be
different (even though they're stored on the same NFS share).



The only way I can think of to do something like this would be to have
multiple levels of symlinks. Set it so that, for example, virtual HDD #1 is
configured as vbox1_sda.img, which is a symlink that points to
/tmp/vbox1_sda.img. /tmp/vbox1_sda.img is in turn another symlink that
points to a common image file that would contain the HDD before any changes
occurred (say to /opt/virtualbox/base/sda.img). Then, for the COW file and
the system's XML config file, I do the same thing but have it point to a
specific files for that box and virtual box (i.e.
/opt/virtualbox/box1/vbox1/sda.cow and
/opt/virtualbox/box1/vbox1/config.xml). However, this just seems really
ugly to me, and I am thinking that there's got to be a better way than
reforming symlinks in /tmp (where one host's writes won't touch another
host's files) during each boot.



I'm open to suggestions on how this could be done, if anyone can think of a
better way. If not, then perhaps this is the best way to do something like
that. If so, it would be an interesting experiment.



Thanks folks!
--- Dan


More information about the PLUG mailing list