cloud-localds 创建镜像

 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 verbosity

   Note, --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 datasource
  • ec2metadata - query and display AWS EC2 metadata
  • growpart - rewrite partition table so that partition takes up all the space it can
  • mount-image-callback - mount a file to a temporary mount point and then invoke the provided cmd with args
  • resize-part-image - resize a partition image and contained filesystem to a new size
  • ubuntu-cloudimage-query - get the latest Ubuntu AWS AMI meeting certain criteria
  • vcs-run - obtain a repository and execute a command with arguments
  • write-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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值