## host system is vivid, trusty would also do host $ rel=trusty ; serial=20150417 host $ url=http://cloud-images.ubuntu.com/releases/$rel/release-$serial/ubuntu-14.04-server-cloudimg-amd64-disk1.img host $ img_dist="$rel-$serial-amd64.img.dist" host $ img=${img_dist%.dist}
host $ pkgs="qemu-utils qemu-system-x86 cloud-image-utils" host $ sudo apt-get --assume-yes install $pkgs ## get images and convert qcow to raw host $ [ -f "$img_dist" ] || { wget "$url" -O "$img_dist.tmp" && mv "$img_dist.tmp" "$img_dist"; } host $ [ -f "$img" ] || { qemu-img convert -O raw "$img_dist" "$img.tmp" && mv "$img.tmp" "$img"; } ## create a user-data to let you log in host $ cat > user-data <<EOF #cloud-config password: passw0rd chpasswd: { expire: False } ssh_pwauth: True EOF host $ cloud-localds seed.img user-data ## launch a guest with 2 nics, one stable/ssh in, one for testing ## you can ssh in with 'ubuntu/passw0rd' with 'ssh -p 2222 ubuntu@localhost' host $ qemu-img create -f qcow2 -b $img disk.img host $ qemu-system-x86_64 -enable-kvm \ -device virtio-net-pci,netdev=net00 \ -netdev user,id=net00,hostfwd=tcp::2222-:22 \ -device virtio-net-pci,netdev=net01 \ -netdev user,id=net01 \ -drive if=virtio,file=disk.img,if=virtio \ -drive if=virtio,file=seed.img,if=virtio \ -m 768 -curses ## have 2 windows / shells in system. ### setup system guest $ crazy_url=http://bazaar.launchpad.net/~smoser/+junk/lp1444428/download/head:/nicgocrazy-20150421193756-8xtcmllz0qf4efb4-2/nic-go-crazy guest $ $ loop_url=http://bazaar.launchpad.net/~smoser/+junk/lp1444428/download/head:/ifuploop-20150421193756-8xtcmllz0qf4efb4-1/ifup-loop guest $ wget "$crazy_url" -O nic-go-crazy guest $ wget "$loop_url" -O loop-ifup guest $ chmod 755 nic-go-crazy loop-ifup guest $ echo "iface eth1 inet dhcp" | sudo tee -a /etc/network/interfaces ### recreate failure #### guest-w1 % sudo ./nic-go-crazy 20 nicfoo guest-w2 % sudo ./loop-ifup Internet Systems Consortium DHCP Client 4.2.4 Copyright 2004-2012 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Error getting interface address for 'nic074725'; No such device Error getting interface information. Failed to bring up eth1. ### enable proposed and get update ### guest $ rel=$(lsb_release -sc) guest $ echo "deb http://archive.ubuntu.com/ubuntu ${rel}-proposed main" | sudo tee -a /etc/apt/sources.list.d/proposed.list guest $ sudo apt-get update --quiet guest $ sudo apt-cache policy guest $ sudo apt-cache policy isc-dhcp-client isc-dhcp-client: Installed: 4.2.4-7ubuntu12.1 Candidate: 4.2.4-7ubuntu12.2 Version table: 4.2.4-7ubuntu12.2 0 500 http://archive.ubuntu.com/ubuntu/ trusty-proposed/main amd64 Packages *** 4.2.4-7ubuntu12.1 0 500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages 100 /var/lib/dpkg/status 4.2.4-7ubuntu12 0 500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages guest $ sudo apt-get install isc-dhcp-client -qy ## retry the 'recreate failure' test above. It should run indefinintely. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1446767 Title: dhclient can fail if other nics are renamed To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1446767/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs