Hi Michael, (uvtool author here)
On Tue, Jun 02, 2015 at 09:30:15AM +0100, Michael Foord wrote: > In order to specify a MAC address for a KVM image we need to create a > libvirt domain xml template to pass as the template argument to uvt-kvm. Right. > Ideally we'd like to specify as *little as possible* in the template and > have the generated libvirt xml (i.e. the created image) be identical to what > uvt-kvm would have created for us without the template. The only change > being that the image will have a network interface with the MAC address we > specify. > > Attached are two xml files. "juju-bare-metal.xml" is the *generated* xml > (using master) for a kvm image on MAAS bare metal (functionally the same as > the xml we generate for a kvm image in a kvm image - I checked). > "template.xml" is the minimal template I found that would cause uvt-kvm to > generate the same image. What you've done here is correct the best way to do it right now - I presume you will end up generating the XML here instead of letting uvtool do it? Note that in addition to picking up the (usually default) template XML file, uvtool also does some manipulation of the XML tree in response to the other options specified (--disk, --memory, some networking options, etc) as well as some mandatory manipulations (defining the name, for example). One catch is that if things change in the future, Juju (by hardcoding the XML default) will be stuck in the past. For example, I think there are some changes in the pipeline where supporting different architectures such as ppc64el and arm64 require slightly different optimal XML definitions. How about I add an option to allow you to set the MAC address from the command line? This would only apply to >= Wily, but older releases aren't set to change anyway. For future releases, if you used that option, then you'd get what you need but also be able to stick to default XML handling. The catch is that you'll need to implement it both ways - but the implementation to add the command line option would presumably be pretty small. How does that sound? Robie
signature.asc
Description: Digital signature
-- Juju-dev mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
