Skip to content

Fix NoCloud docs:#1423

Merged
TheRealFalcon merged 3 commits into
canonical:mainfrom
holmanb:holmanb/fix-nocloud-docs
May 3, 2022
Merged

Fix NoCloud docs:#1423
TheRealFalcon merged 3 commits into
canonical:mainfrom
holmanb:holmanb/fix-nocloud-docs

Conversation

@holmanb
Copy link
Copy Markdown
Member

@holmanb holmanb commented May 2, 2022

- fix failing example command
- augment "alternative commands" with more common utilities
- drop reference to decade old release

qemu-img correctly identifies the format of the backing file, but fails anyways:

arc/tmp qemu-img create -f qcow2 -b disk.img boot-disk.img 
qemu-img: boot-disk.img: Backing file specified without backing format
Detected format of qcow2.%                                                                                            arc/tmp echo $?
1

Fix by adding -F qcow2 to invocation.

Additionally, add some context to the mcopy command, as well as alternative option with mount/umount/cp

holmanb added 2 commits May 2, 2022 09:29
- fix failing example command
- replace "alternative command" with more common utilities
- drop reference to decade old release
Copy link
Copy Markdown
Contributor

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instructions don't work for me. See my inline comments.

Additionally, since we're here, can we also update:

## 1) create user-data and meta-data files that will be used
## to modify image on first boot
$ { 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

Seems a bit silly to write to files using echo for one and printf for the other.

Comment thread doc/rtd/topics/datasources/nocloud.rst Outdated
Comment thread doc/rtd/topics/datasources/nocloud.rst Outdated
Comment thread doc/rtd/topics/datasources/nocloud.rst Outdated
## $ mcopy -oi seed.img user-data meta-data

## 3) create a new qcow image to boot, backed by your original image
$ qemu-img create -f qcow2 -b disk.img -F qcow2 -K qcow2 boot-disk.img
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qemu-img: unrecognized option '-K'

Comment thread doc/rtd/topics/datasources/nocloud.rst Outdated
Comment thread doc/rtd/topics/datasources/nocloud.rst
@holmanb
Copy link
Copy Markdown
Member Author

holmanb commented May 3, 2022

@TheRealFalcon Thanks for the review! I think I addressed all of your comments.

Copy link
Copy Markdown
Contributor

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@TheRealFalcon TheRealFalcon merged commit ef13e3f into canonical:main May 3, 2022
aciba90 pushed a commit to aciba90/cloud-init that referenced this pull request May 10, 2022
- fix failing example command
- replace "alternative command" with more common utilities
- drop reference to decade old release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants