10.2.


  1. $ mkdir cloudinitiso
    $ cd cloudinitiso
    Copy to Clipboard Toggle word wrap
  2. instance-id: citest
    local-hostname: vmname
    Copy to Clipboard Toggle word wrap
  3. #cloud-config
    user: admin
    password: password
    chpasswd: {expire: False}
    ssh_pwauth: True
    ssh_authorized_keys:
      - ssh-rsa AAA...fhHQ== your.email@example.com
    Copy to Clipboard Toggle word wrap

  4. # genisoimage -output cloud-init.iso -volid cidata -joliet -rock user-data meta-data
    
    I: -input-charset not specified, using utf-8 (detected in locale settings)
    Total translation table size: 0
    Total rockridge attributes bytes: 331
    Total directory bytes: 0
    Path table size(bytes): 10
    Max brk space used 0
    183 extents written (0 MB)
    Copy to Clipboard Toggle word wrap
  5. # virt-install \
        --memory 4096 \
        --vcpus 4 \
        --name myvm \
        --disk rhel-8-x86_64-kvm.qcow2,device=disk,bus=virtio,format=qcow2 \
        --disk cloud-init.iso,device=cdrom \
        --os-variant rhel 8 \
        --virt-type kvm \
        --graphics none \
        --import
    Copy to Clipboard Toggle word wrap
  6. Starting install...
    Connected to domain mytestcivm
    ...
    [  OK  ] Started Execute cloud user/final scripts.
    [  OK  ] Reached target Cloud-init target.
    
    Red Hat Enterprise Linux 8 (Ootpa)
    Kernel 4.18.0-221.el8.x86_64 on an x86_64
    Copy to Clipboard Toggle word wrap

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat