首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ovirt虚拟机启动时没有ipaddr和dns

问Ovirt虚拟机启动时没有ipaddr和dns
EN

Stack Overflow用户
提问于 2018-05-30 18:49:06
回答 1查看 535关注 0票数 1

我在centos (7.4)上运行自托管ovirt引擎(4.2)。

我正在尝试部署带有ipaddr和dns的普通测试vm,以检查ssh连接。然而,ansible playbook (下面的代码片段)运行时没有错误,但当我尝试查看vm状态时,我没有看到ipaddr,因此无法ping或ssh到新vm。

代码语言:javascript
复制
- name: Add vanilla vm
  ovirt_vms:
     auth: "{{ ovirt_auth }}"
     name: test01
     cluster: Default
     state: running
     memory: 2GiB
     cpu_cores: 8
     operating_system: rhel_7x64
     high_availability: true
     high_availability_priority: 50 # Available from Ansible 2.5
     cloud_init:
        nic_boot_protocol: static
        nic_ip_address: 10.34.60.86
        nic_netmask: 255.255.252.0
        nic_gateway: 10.34.63.254
        nic_name: eth1
        nic_on_boot: true
        host_name: test01.ovirt.dw
        custom_script: |
            write_files:
            - content: |
               Hello, world!
               path: /tmp/greeting.txt
               permissions: '0644'
               user_name: root
               root_password: super_password
      nics:
         - name: vnet0
      network: ovirtmgmt
      profile: ovirtmgmt
      interface: virtio

是不是遗漏了什么,或者需要在这些上面传递一些东西?

EN

回答 1

Stack Overflow用户

发布于 2018-08-07 16:42:52

根据您的脚本,您没有使用任何模板,所以默认情况下,它是从没有安装任何操作系统的Blank模板创建的。您必须首先创建一些安装了操作系统的模板,并从该模板创建虚拟机。

还请注意,只有在虚拟机上安装了来宾代理时,才会报告虚拟机的IP地址,因此最好将其预先安装在模板中。下面介绍如何安装来宾代理:

https://www.ovirt.org/documentation/how-to/guest-agent/install-the-guest-agent-in-centos/

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50602752

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档