cloud-localds --help
Usage: cloud-localds [ options ] output user-data [meta-data]Create a disk for cloud-init to utilize nocloud
options:
-h | --help show usage
-d | --disk-format D disk format to output. default: raw
can be anything supported by qemu-img or
tar, tar-seed-local, tar-seed-net
-H | --hostname H set hostname in metadata to H
-f | --filesystem F filesystem format (vfat or iso), default: iso9660-i | --interfaces F write network interfaces file into metadata
-N | --network-config F write network config file to local datasource
-m | --dsmode M add 'dsmode' ('local' or 'net') to the metadata
default in cloud-init is 'net', meaning network is
required.
-V | --vendor-data F vendor-data file
-v | --verbose increase verbosityNote, --dsmode, --hostname, and --interfaces are incompatible
with metadata.Example:
* cat my-user-data
#cloud-config
password: passw0rd
chpasswd: { expire: False }
ssh_pwauth: True
* echo "instance-id: $(uuidgen || echo i-abcdefg)" > my-meta-data
* cloud-localds my-seed.img my-user-data my-meta-data
* kvm -net nic -net user,hostfwd=tcp::2222-:22 \
-drive file=disk1.img,if=virtio -drive file=my-seed.img,if=virtio
* ssh -p 2222 ubuntu@localhost
cloud-utils
A useful set of utilities for interacting with a cloud.
Install
cloud-utils is available in Ubuntu and Debian via the cloud-utils
metapackage:
sudo apt update
sudo apt install cloud-utils
Red Hat based distributions offer the cloud-utils
package with a subset of binaries and cloud-utils-growpart
for growpart.
The package is also available in Alpine and Arch as cloud-utils
.
Usage
cloud-localds
- create a disk for cloud-init to utilize the nocloud datasourceec2metadata
- query and display AWS EC2 metadatagrowpart
- rewrite partition table so that partition takes up all the space it canmount-image-callback
- mount a file to a temporary mount point and then invoke the provided cmd with argsresize-part-image
- resize a partition image and contained filesystem to a new sizeubuntu-cloudimage-query
- get the latest Ubuntu AWS AMI meeting certain criteriavcs-run
- obtain a repository and execute a command with argumentswrite-mime-multipart
- utilty for creating mime-multipart files, likely for use via user data and cloud-init
Getting help
If you find a bug or issue please report it on the upstream Launchpad project.
License
Distributed under the GPLv3 License. See LICENSE for more information.