Real talk, why isn't there a Dockerfile-like format for generating VM images

@aurynn libvirt has xml files you can use for configuration. It's not docker-compose but it's good for duplicating exact setups. Virt-manager has a little window in the gui for it

Obligatory RHEL docs

@aurynn i RHELly like RHEL though because they have RHELly good docs

@beegrrl learning XML and XSLT for this may be a bridge too far, heh

@aurynn hot tip: each vm you set up with a gui produces an xml file. A little bit of sed and cat goes a long ways

@beegrrl Manipulating XML(or HTML) with regex is a task that has burned me many, many times

@aurynn use $EDITOR maybe then? Idk. I'm still insane enough to recursively sed entire directories

@beegrrl I'd use XSLT for this, since it's meant for manipulating XML

but also

I'd probably end up writing a tool that took YAML and output XML

@aurynn this is another "Avery is stuck in the boomer rut. She cannot get over editing xml in vi. She loves vi and archaic languages"

@beegrrl in this case, xslt is a programming language (I think?) meant to make working with XML more easily

nothing wrong with using Vi/m, either

@aurynn i like to keep my dependencies as minimal as the coreutils

Maybe someday I'll compile to XML

@beegrrl I like all the dependencies! As long as I can pin them.

@aurynn my mindset has always been "don't depend on something (ie obscure transpilers) if you can't get it easily on the most obscure UNIXes

I should apply this to graphics drivers and go shell only illumos 🤔

@beegrrl It's difficult to even get hardware to run obscure UNIXes on nowadays

@beegrrl @aurynn I'm with aurynn on this one. We've come a long way in the last 30 years

@aurynn @beegrrl good news: most of the libvirt XML is boilerplate.

@aurynn @beegrrl of course, that XML only defines the hardware in the virtual machine. It doesn't actually do anything about the contents of the disk image.

@aurynn that's the reason I have a job at the moment
I'm very aware it could go away at any time

@aurynn oh wait i misspoke.
I am the human equivalent of the dockerfile for VM's

@aurynn yeah vagrant is okay.
I'm working with ansible and packer at the moment.
What are you configuring for?

@pearofdoom I want to be able to build up layers of VM like I do Docker images. I think this is reasonable.

@bamfic yeah I hadn't considered Vagrant, I haven't used it in a loooooooooong time, it might be the right tool for this

@aurynn Right? But also, this is a Hard Problem. I was looking at a (potentially poorly written) Packer script the other day and the imperative/procedural way it started a VM and send *keypresses* to it before it managed to set up SSH access made my soul hurt.

@aurynn I had kinda hoped that Expect-like approaches were long dead and gone.

@aurynn I am resisting the urge to compose a Toot predominantly comprised of words that rhyme with 'expect."

Sign in to participate in the conversation
Cloud Island

A paid, early access, strongly moderated Mastodon instance hosted entirely in New Zealand.