Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
arch-boxes
Commits
10f185b7
Commit
10f185b7
authored
Feb 25, 2020
by
Christian Rebischke
Browse files
add troubleshooting for cloud-init
parent
b9f0c26c
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
10f185b7
...
...
@@ -75,3 +75,29 @@ one.
Start
`packer`
with
`-parallel=false`
:
`packer build -parallel=false vagrant.json`
### Checking cloud-init support in our qcow2 images:
```
bash
$
packer build cloud.json
$
cp
release/Arch-Linux-cloudimg-amd64-2020-02-24.img disk.img
# Copied from (with minor changes): https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html
$
{
echo
instance-id: iid-local01
;
echo
local-hostname: cloudimg
;
}
>
meta-data
$
printf
"#cloud-config
\n
password: passw0rd
\n
chpasswd: { expire: False }
\n
ssh_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
```
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment