Validated yakkety and zesty: $ raw=yakkety-server-cloudimg-amd64.raw $ yakkety-server-cloudimg-amd64.raw yakkety-server-cloudimg-amd64.raw: command not found $ sfdisk --part-uuid $raw 1 F9E1FDF2-234A-4732-AEF8-A75B86313FAD $ ptuuid=$(sfdisk --part-uuid $raw 1) $ ptuuid=$(echo "$ptuuid" | tr '[a-z]' '[A-Z]') $ echo $ptuuid F9E1FDF2-234A-4732-AEF8-A75B86313FAD $ printf "%s\n%s\n%s\n%s\n" "#cloud-config" "password: passw0rd" \ > "chpasswd: {expire: False}" "ssh_pwauth: True" > my-user-data $ echo "instance-id: $(uuidgen || echo i-abcdefg)" > my-meta-datacsmith@fringe:~$ cloud-localds my-seed.img my-user-data my-meta-data $ sudo mount-image-callback $raw -- mchroot sh -xc 'cat /boot/vmlinu?-*' > kernel [sudo] password for csmith: + cat /boot/vmlinuz-4.8.0-51-generic $ qemu-img create -f qcow2 -b $raw disk.img 10G Formatting 'disk.img', fmt=qcow2 size=10737418240 backing_file=yakkety-server-cloudimg-amd64.raw encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
$ df -h / Filesystem Size Used Avail Use% Mounted on /dev/root 2.0G 1011M 984M 51% /
$ dpkg -l cloud-init Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= ii cloud-init 0.7.9-90-g61 all Init scripts for cloud instances ubuntu@ubuntu:~$ grep VERSION= /etc/os-release VERSION="16.10 (Yakkety Yak)"
$ raw=zesty-server-cloudimg-amd64.raw $ sfdisk --part-uuid $raw 149750BCB-3B61-4F13-92D4-D3153E9C28C6 $ ptuuid=$(sfdisk --part-uuid $raw 1)csmith@fringe:~$ ptuuid=$(echo "$ptuuid" | tr '[a-z]' '[A-Z]') $ printf "%s\n%s\n%s\n%s\n" "#cloud-config" "password: passw0rd" \ > "chpasswd: {expire: False}" "ssh_pwauth: True" > my-user-data $ echo "instance-id: $(uuidgen || echo i-abcdefg)" > my-meta-datacsmith@fringe:~$ cloud-localds my-seed.img my-user-data my-meta-data $ sudo mount-image-callback $raw -- mchroot sh -xc 'cat /boot/vmlinu?-*' > kernel [sudo] password for csmith: + cat /boot/vmlinuz-4.10.0-20-generic $ qemu-img create -f qcow2 -b $raw disk.img 10G Formatting 'disk.img', fmt=qcow2 size=10737418240 backing_file=zesty-server-cloudimg-amd64.raw encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 $ qemu-system-x86_64 -enable-kvm \ > -drive file=disk.img,if=ide,index=0 -drive file=my-seed.img,if=ide \ > -net nic -net user,hostfwd=tcp::2222-:22 \ > -snapshot -m 768 -nographic -echr 0x05 \ > -kernel kernel \ > -append "root=PARTUUID=${ptuuid} ro console=tty1 console=ttyS0" # login ubuntu/passw0rd
ubuntu@ubuntu:~$ df -h / Filesystem Size Used Avail Use% Mounted on /dev/root 2.0G 988M 1007M 50% /
Validated yakkety and zesty: server- cloudimg- amd64.raw server- cloudimg- amd64.raw server- cloudimg- amd64.raw: command not found 234A-4732- AEF8-A75B86313F AD 234A-4732- AEF8-A75B86313F AD datacsmith@ fringe: ~$ cloud-localds my-seed.img my-user-data my-meta-data callback $raw -- mchroot sh -xc 'cat /boot/vmlinu?-*' > kernel 4.8.0-51- generic file=yakkety- server- cloudimg- amd64.raw encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
$ raw=yakkety-
$ yakkety-
yakkety-
$ sfdisk --part-uuid $raw 1
F9E1FDF2-
$ ptuuid=$(sfdisk --part-uuid $raw 1)
$ ptuuid=$(echo "$ptuuid" | tr '[a-z]' '[A-Z]')
$ echo $ptuuid
F9E1FDF2-
$ printf "%s\n%s\n%s\n%s\n" "#cloud-config" "password: passw0rd" \
> "chpasswd: {expire: False}" "ssh_pwauth: True" > my-user-data
$ echo "instance-id: $(uuidgen || echo i-abcdefg)" > my-meta-
$ sudo mount-image-
[sudo] password for csmith:
+ cat /boot/vmlinuz-
$ qemu-img create -f qcow2 -b $raw disk.img 10G
Formatting 'disk.img', fmt=qcow2 size=10737418240 backing_
$ df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/root 2.0G 1011M 984M 51% /
$ dpkg -l cloud-init Unknown/ Install/ Remove/ Purge/Hold Not/Inst/ Conf-files/ Unpacked/ halF-conf/ Half-inst/ trig-aWait/ Trig-pend /Reinst- required (Status,Err: uppercase=bad) ======= ====-== ======= ===-=== ======= ==-==== ======= ======= ======= ======= =
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii cloud-init 0.7.9-90-g61 all Init scripts for cloud instances
ubuntu@ubuntu:~$ grep VERSION= /etc/os-release
VERSION="16.10 (Yakkety Yak)"
$ raw=zesty- server- cloudimg- amd64.raw 3B61-4F13- 92D4-D3153E9C28 C6 datacsmith@ fringe: ~$ cloud-localds my-seed.img my-user-data my-meta-data callback $raw -- mchroot sh -xc 'cat /boot/vmlinu?-*' > kernel 4.10.0- 20-generic file=zesty- server- cloudimg- amd64.raw encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 img,if= ide,index= 0 -drive file=my- seed.img, if=ide \ tcp::2222- :22 \ ${ptuuid} ro console=tty1 console=ttyS0"
$ sfdisk --part-uuid $raw 149750BCB-
$ ptuuid=$(sfdisk --part-uuid $raw 1)csmith@fringe:~$ ptuuid=$(echo "$ptuuid" | tr '[a-z]' '[A-Z]')
$ printf "%s\n%s\n%s\n%s\n" "#cloud-config" "password: passw0rd" \
> "chpasswd: {expire: False}" "ssh_pwauth: True" > my-user-data
$ echo "instance-id: $(uuidgen || echo i-abcdefg)" > my-meta-
$ sudo mount-image-
[sudo] password for csmith:
+ cat /boot/vmlinuz-
$ qemu-img create -f qcow2 -b $raw disk.img 10G
Formatting 'disk.img', fmt=qcow2 size=10737418240 backing_
$ qemu-system-x86_64 -enable-kvm \
> -drive file=disk.
> -net nic -net user,hostfwd=
> -snapshot -m 768 -nographic -echr 0x05 \
> -kernel kernel \
> -append "root=PARTUUID=
# login ubuntu/passw0rd
ubuntu@ubuntu:~$ df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/root 2.0G 988M 1007M 50% /