On Wednesday, 21.10.2015 at 01:50, Antti Kantee wrote: > So I've been playing around with the idea I mentioned in the > "rumpbake-rumprun axis" thread for having a mostly transparent launch tool > (wrt. to the virtualization backend), but hiding details on how the config > is passed to the guest. It's actually pretty simple. I've been using it > for a few days instead of the old rumprun, it seems to work just fine, and I > don't have to keep remembering how the obfuscation filter maps the rumprun > command line params to qemu params. > > The usage is simply: > > rumprun-launch qemu|xl [-c cfg1 -c cfg2 ...] backend params > > So for example: > > rumprun-launch qemu -c app.json -c common.json qemu-system-x86_64 > -enable-kvm -s -kernel rr.bin
Tried to get this working with a more substantial example (unikernel with the old WOPR demo). So, rumprun-launch qemu -c wopr.json qemu-system-x86_64 -enable-kvm -kernel ./wopr.bin -nographic -vga none -net nic,model=virtio -net bridge,br=rrbr0 Translates to: qemu-system-x86_64 -enable-kvm -kernel ./wopr.bin -nographic -vga none -net nic,model=virtio -net bridge,br=rrbr0 -append "$(cat wopr.json | sed -e s/,/,,/)" The sed nonsense is there because qemu does some kind of (unknown, undocumented AFAICT) parsing on the content of -append options?! > The intent is that "qemu" or "xl" controls how the config is passed to the > backend, and only that. I've just spent an hour trying to make this work with xl. The closest I got was: xl create /dev/null -c kernel=\"wopr.bin\" name=\"wopr\" extra=\"$(cat wopr.json|sed -e s/\"/\\\\\"/g | tr '\n' ' ')\" The above doesn't actually work due to some mismatch in the amount of '\'s required. In any case, passing the JSON via the command line as opposed to writing it to Xenstore is total madness. Unfortunately, with the proposed scope of the tool, we can't write to Xenstore, since this requires the create-domain-as-paused-then-write-to-xenstore dance. > I pushed the script (all ~10 lines of it) to the pooka-rumprunlaunch branch, > in case someone wants to give it a whirl. (supports only qemu for now) > > Thoughts? If we're going to remove the launch tool, then lets remove *all* of it. I have an idea on how to do that that doesn't involve manually munging JSON, need to try some things and will get back to you. Martin
