Commit 10f185b7 authored by Christian Rebischke's avatar Christian Rebischke
Browse files

add troubleshooting for cloud-init

parent b9f0c26c
......@@ -75,3 +75,29 @@ one.
Start `packer` with `-parallel=false`:
`packer build -parallel=false vagrant.json`
### Checking cloud-init support in our qcow2 images:
$ packer build cloud.json
$ cp release/Arch-Linux-cloudimg-amd64-2020-02-24.img disk.img
# Copied from (with minor changes):
$ { echo instance-id: iid-local01; echo local-hostname: cloudimg; } > meta-data
$ printf "#cloud-config\npassword: passw0rd\nchpasswd: { expire: False }\nssh_pwauth: True\n" > user-data
## create a disk to attach with some user-data and meta-data (require cdrkit)
$ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data
## create a new qcow image to boot, backed by your original image
$ qemu-img create -f qcow2 -b disk.img boot-disk.img
## boot the image and login as 'arch' with password 'passw0rd'
## note, passw0rd was set as password through the user-data above,
## there is no password set on these images.
$ qemu-system-x86_64 -m 256 \
-net nic -net user,hostfwd=tcp::2222-:22 \
-drive file=boot-disk.img,if=virtio \
-drive file=seed.iso,if=virtio
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment