### 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.
## host system is vivid, trusty would also do
host $ rel=trusty ; serial=20150417 cloud-images. ubuntu. com/releases/ $rel/release- $serial/ ubuntu- 14.04-server- cloudimg- amd64-disk1. img "$rel-$ serial- amd64.img. dist" dist%.dist}
host $ url=http://
host $ img_dist=
host $ img=${img_
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 net-pci, netdev= net00 \ net00,hostfwd= tcp::2222- :22 \ net-pci, netdev= net01 \ file=disk. img,if= virtio \ file=seed. img,if= virtio \
## 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-
-netdev user,id=
-device virtio-
-netdev user,id=net01 \
-drive if=virtio,
-drive if=virtio,
-m 768 -curses
## have 2 windows / shells in system. bazaar. launchpad. net/~smoser/ +junk/lp1444428 /download/ head:/nicgocraz y-2015042119375 6-8xtcmllz0qf4e fb4-2/nic- go-crazy bazaar. launchpad. net/~smoser/ +junk/lp1444428 /download/ head:/ifuploop- 20150421193756- 8xtcmllz0qf4efb 4-1/ifup- loop
### setup system
guest $ crazy_url=http://
guest $ $ loop_url=http://
guest $ wget "$crazy_url" -O nic-go-crazy interfaces
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/
### recreate failure #### /www.isc. org/software/ dhcp/
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:/
Error getting interface address for 'nic074725'; No such device
Error getting interface information.
Failed to bring up eth1.
### enable proposed and get update ### archive. ubuntu. com/ubuntu ${rel}-proposed main" | sources. list.d/ proposed. list 2.4-7ubuntu12. 2 0 archive. ubuntu. com/ubuntu/ trusty- proposed/ main amd64 Packages archive. ubuntu. com/ubuntu/ trusty-updates/main amd64 Packages dpkg/status 2.4-7ubuntu12 0 archive. ubuntu. com/ubuntu/ trusty/main amd64 Packages
guest $ rel=$(lsb_release -sc)
guest $ echo "deb http://
sudo tee -a /etc/apt/
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.
500 http://
*** 4.2.4-7ubuntu12.1 0
500 http://
100 /var/lib/
4.
500 http://
guest $ sudo apt-get install isc-dhcp-client -qy
## retry the 'recreate failure' test above. It should run indefinintely.