Antti,

in commit 6435210 [1] you remove use of blkid for fs image type detection.
Is it a general policy that the rumprun launcher not depend on any
Linux/GNU/otherwise-not-available-everywhere tool?

The reason I ask is because I was just about to commit the following change
to generate random MAC addresses for qemu/kvm:

--- a/app-tools/rumprun
+++ b/app-tools/rumprun
@@ -159,8 +159,10 @@ createif_qemu ()
        scratch="${1#*,}"
        ifbasename="${scratch%%,*}"
        qemuargs="${scratch#*,}"
+       # 52:54:00 is QEMU registered OUI
+       ifmac="52:54:00:$(dd if=/dev/urandom bs=512 count=1 2>/dev/null | 
md5sum | sed 's/^\(..\)\(..\)\(..\).*$/\1:\2:\3/')"
 
-       opt_netif="${opt_netif} -net nic,model=virtio ${qemuargs}"
+       opt_netif="${opt_netif} -net nic,model=virtio,mac=${ifmac} ${qemuargs}"
        eval ${iftag}2ifname=${ifbasename}${nindex}
        eval ${iftag}2cloner=false
        nindex=$(expr $nindex + 1)

The above does depend on md5sum, and I seem to recall discussing that
md5sum is not universally available?

Motivation for the change is that without it each qemu/kvm unikernel gets
the exact same MAC and is thus unusable in bridged configurations. Also,
it's consistent with the behaviour of "rumprun xen".

-mato

[1] 
https://github.com/rumpkernel/rumprun/commit/643521096e872d0af74ed7bcf3f4de578e0698f7

Reply via email to