On Wed, May 27, 2015 at 3:41 PM, Ludovic Courtès <l...@gnu.org> wrote: > David Thompson <dthomps...@worcester.edu> skribis: > >> Ludovic Courtès <l...@gnu.org> writes: >> >>> Perhaps one addition eventually would be to allow IPs to be >>> automatically allocated and have host name lookup DTRT in each VM. >> >> Do you have any idea how we could do that for local VMs? There's no >> daemon managing the provision of these resources, so I don't know what >> strategy can be used to automatically allocate static IPs. > > QEMU allows you to specify the guest’s IP, I think, and apparently it > can create VLANs and connect several unprivileged QEMU instances > together via -net socket (info "(qemu-doc) sec_invocation"). > > Things like libvirt probably provide a higher-level interface to that. > (I don’t know if it justifies the extra dependency.)
If libvirt's API was really useful, perhaps it could be an optional dependency for users that want to deploy QEMU VMs? >> The automagic hostname lookup part is particularly interesting to me. A >> more complete deployment configuration would have the web server >> dependent on the db server. I originally intended to handle this by >> delaying the creation of the web server until after the db server was >> made, and invoking a procedure that accepted the db server's state as >> input and output the correct configuration for the web server. > > I’ve seen that Docker can do that. ;-) IIRC it populates /etc/hosts in > each container. That’s something we could do. Another possibility > would be to rely on mDNS. If Docker can do it, so can we! :) >> Thinking out loud here: Maybe 'guix deploy' can kick off the >> provisioning for all machines first, and afterwards the OS configs can >> be altered to include the correct /etc/hosts file. > > The transform procedure could force the right /etc/hosts in each OS, I > suppose? Yes. Perhaps the extensibility I had in mind could be better achieved by allowing additional, user specified transformations in the machine declaration. Thanks for your input! - Dave