• ovirt 虚拟机使用nat上网


    前提条件ovirt引擎装好了,下面的环境vdsm和engine是装在同一台服务器上

    1.创建NAT网络配置文件/etc/libvirt/qemu/networks/nat.xml,内容如下

    cd   /etc/libvirt/qemu/networks

    cp default.xml nat.xml

    vim nat.xml

     2.通过libvirt/virsh创建NAT网络

    [root@engine networks]# virsh
    Welcome to virsh, the virtualization interactive terminal.

    Type: 'help' for help with commands
    'quit' to quit

    virsh # connect qemu:///system
    Please enter your authentication name: vdsm@ovirt
    Please enter your password:shibboleth

    virsh # net-list
    Name State Autostart Persistent
    ----------------------------------------------------------
    ;vdsmdummy; active no no
    nat active no no

    virsh # net-define /etc/libvirt/qemu/networks/nat.xml

    virsh # net-autostart nat1
    Network nat1 marked as autostarted

    virsh # net-start nat1
    Network nat1 started

    virsh # net-list --all
    Name State Autostart Persistent
    ----------------------------------------------------------
    ;vdsmdummy; active no no
    default inactive no yes
    nat active no no
    nat1 active yes yes

    yum install -y vdsm-hook-extnet

    [root@engine packages]# engine-config -s CustomDeviceProperties='{type=interfac e;prop={extnet=^[a-zA-Z0-9_ ---]+$}}'
    Please select a version:
    1. 4.1
    2. 4.2
    3. 4.3
    3

     engine-config  -g  CustomDeviceProperties

    systemctl restart ovirt-engine

    点击vnic配置集,然后新建

     编辑虚拟机,重新选择vnic,选择刚刚新建的

    开机测试,实验完成

  • 相关阅读:
    内置函数的补充
    python3 集合中的常用方法
    Salesforce: ISCHANGED在workflow中的使用
    Salesforce: setTreatTargetObjectAsRecipient的使用
    python实现用户登录次数太多账号"锁定"
    docker命令
    scrapy框架的安装
    分布式爬虫
    scrapy框架mongodb正规存储
    redis
  • 原文地址:https://www.cnblogs.com/bnsdmmL/p/13601026.html
Copyright © 2020-2023  润新知