[Bug 949956] [NEW] lxc-start-ephemeral keeps same MAC address, and so same IP address, as base instance

Gary Poster gary.poster at canonical.com
Thu Mar 8 14:09:23 UTC 2012


Public bug reported:

As smoser pointed out, lxc-start-ephemeral needs to do the same kinds of
things that lxc-clone does, such as this:

# change hwaddrs
mv ${c} ${c}.old
(
while read line; do
	if [ "${line:0:18}" = "lxc.network.hwaddr" ]; then
		echo "lxc.network.hwaddr= 00:16:3e:$(openssl rand -hex 3| sed 's/\(..\)/\1:/g; s/.$//')"
	else
		echo $line
	fi
done
) < ${c}.old > ${c}
rm -f ${c}.old

# set the hostname
cat <<EOF > $rootfs/etc/hostname
$hostname
EOF
# set minimal hosts
cat <<EOF > $rootfs/etc/hosts
127.0.0.1 localhost $hostname
EOF

We have a version that does this, and will propose it.

** Affects: lxc (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/949956

Title:
  lxc-start-ephemeral keeps same MAC address, and so same IP address, as
  base instance

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/949956/+subscriptions



More information about the Ubuntu-server-bugs mailing list