zoukankan      html  css  js  c++  java
  • 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,选择刚刚新建的

    开机测试,实验完成

  • 相关阅读:
    方法的参数传递机制
    策略模式
    Factory(简单的工厂模式)
    java 跨域问题解决
    Map 转成Json字符串
    FastDFS 上传,删除文件
    MD5 密码加盐
    Java-图片压缩
    调用支付宝人脸采集查询图片Base64解码
    HttpClient工具类
  • 原文地址:https://www.cnblogs.com/bnsdmmL/p/13601026.html
Copyright © 2011-2022 走看看