Verified Commit 39102348 authored by Sven-Hendrik Haase's avatar Sven-Hendrik Haase
Browse files

Correctly name qcow2 stuff

parent c6a8f2aa
......@@ -106,7 +106,7 @@ Start `packer` with `-parallel=false`:
```bash
$ packer build cloud.json
$ cp release/Arch-Linux-cloudimg-amd64-2020-02-24.img disk.img
$ cp release/Arch-Linux-cloudimg-amd64-2020-02-24.qcow2 disk.qcow2
# 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
......@@ -117,13 +117,13 @@ $ printf "#cloud-config\npassword: passw0rd\nchpasswd: { expire: False }\nssh_pw
$ 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
$ qemu-img create -f qcow2 -b disk.qcow2 boot-disk.qcow2
## 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=boot-disk.qcow2,if=virtio \
-drive file=seed.iso,if=virtio
```
......@@ -10,7 +10,7 @@
},
"builders": [
{
"name": "Arch-Linux-x86_64-cloudimg-{{isotime \"2006-01-02\"}}.img",
"name": "Arch-Linux-x86_64-cloudimg-{{isotime \"2006-01-02\"}}.qcow2",
"type": "qemu",
"cpus": 2,
"memory": 1024,
......@@ -69,7 +69,7 @@
"name": "rename",
"type": "shell-local",
"inline": [
"mv release/packer-Arch-Linux-x86_64-cloudimg-{{isotime \"2006-01-02\"}}.img release/Arch-Linux-x86_64-cloudimg-{{isotime \"2006-01-02\"}}.img",
"mv release/packer-Arch-Linux-x86_64-cloudimg-{{isotime \"2006-01-02\"}}.qcow2 release/Arch-Linux-x86_64-cloudimg-{{isotime \"2006-01-02\"}}.qcow2",
"sed -i 's/packer-//' release/Arch-Linux-x86_64-cloudimg-{{isotime \"2006-01-02\"}}.SHA256"
]
},
......
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