3

I have a web application which requires quite a lot of dependencies. I'm currently evaluating the use of kvm images to help our users installing this application on their servers.

However we have some concerns with the possibility to customize these images, mainly with network and storage.

Potential network problems:

Many sites have several networks (for example one network for the public web interface and one private network for data), and virtual guests sometime need to access both of them. This should be easy to deal with using two (or more) virtual network interfaces. However:

  • some sites use DHCP while other need static IP
  • MAC Address restriction are present on some networks
  • If we change MAC address on command line, the virtual guest will probably assign a new interface (ie eth2/eth3 instead of eth0/eth1). This happens with our debian guests because of udev rules.
  • When such network problem occures, usually the guest takes ages at boot time while trying to load some network services (like MTA for instance).

I have to precise that guests currently access the networks via bridging.

What techniques are you employing for such problems ? Is there a way to configure once a virtual guest and run it everywhere with minimal configuration ? Can libvirt provide some assistance for this process ?

Thanks !

Edit:

Thanks for the first answers. Now I realize that I should be a little more precise:

First, our application can of course be installed in any kind of virtual machine (XEN, VMWare, etc) and we give the choice to our users. I'm just focusing on KVM because some sites made the request of a pre-configured KVM image and are not as comfortable with virtualization techniques as those currently using Xen.

Second, the problem they can face with network issues described previously is more or less the same problem that I face at work: I usually create a virtual machine on my desktop computer before moving the archive into our cluster for production. However the environment is quite different between my desktop computer and the cluster. Linux version are different, we use different private networks, etc. So let's say that I only want to simplify the process of moving a virtual KVM machine from my computer to the cluster.

I was in fact looking for some robust solution to give the virtual guests some hints about their environment. For example adding some information in libvirt XML files like the mac adresses for eth0 and eth1 and the IP of these interfaces, and other stuff like that (NFS, etc). Since we use network bridging I don't think that a local DHCP server on the host could be a good solution, and would only solve one part of the problem. So what would be really cool is a way to communicate configuration information from the host to the guests. Maybe this already exists, or can be implemented by some way.

So my reformulated question is: is there a good (robust, standard, elegant, whatever) way to communicate those information from host to guests (ideally directly using libvirt XML), can this be implemented if it does not exists already or is this idea completely stupid (then please give arguments for why this is a stupid idea).

Thanks (again) !

1
  • 2
    On a different subject: if you distribute disk images, don't forget to zerofill the disk before compressing the image (within the guest: dd if=/dev/zero of=bignullfile; rm bignullfile). Otherwise you'll be sending out unneeded blocks where files used to reside.
    – Joris
    Sep 21, 2010 at 11:17

3 Answers 3

1

You might well be better off creating it as a full-stack install including the OS and all dependencies, on an OS that you know it works well under. Then let the end user decide if they want to install it standalone or as a VM guest on KVM, VMWare, Xen, or whatever. The only thing you'd gain over this with a KVM image is some amount of hardware-agnosticity, but there are still potential pitfalls there as you've pointed out, and the site would have to be willing and able to maintain a KVM host in addition to your application and its OS.

EDIT: To respond to your reformulated question, I think you've still go to leave this stuff to the sites -- VM guests, by design, cannot control how networking is set up on the host. You can certainly provide documentation and instructions for doing this in the simplest or most effective way, but that may vary from site to site. No matter what you do, if you distribute this as a VM image or appliance, the site will have to effectively set up and maintain a VM host that is specifically configured to work on their network.

3
  • thanks for your answer, I updated my question to be more precise. If I correctly understand your answer you suggest to modify a linux distribution with the application already installed (like a customized debian installation iso) ? I like this idea :)
    – ixio
    Sep 21, 2010 at 8:51
  • Yes, that's the idea -- just for example, OSSIM and MailCleaner are two Debian-based products that come as modified distros this way.
    – nedm
    Sep 21, 2010 at 18:13
  • Sure VM guests cannot modify host parameters, and that is a good thing. But maybe host can give hints to guests, and gusts could do some autoconfiguration based on these informations. By this way a VM guest could run unmodified on say my desktop computer and the lab cluster.
    – ixio
    Sep 22, 2010 at 9:26
1

Not that anybody's really done implementing it yet, but this is exactly what the Open Virtualization Format from the DMTF is supposed to address. Sorry that I don't have a better suggestion.

-1

You're considering simple technical details without looking at the big picture. The problem with an image is that it won't integrate well into a site's infrastructure. It may be a different OS. It may not follow the site's configuration/security standards. It may not integrate with a site's patching and configuration management system, their backup system, their HA/load balancing system, or their DR system. Basically it will be a sore thumb that will give grief to the sysadmins.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .