• CentOS bridge br0 kvm libvirt-xml


    1,kvm bridge br0配置文件内容实例:

    ifcfg-em1配置文件内容Example:

    DEVICE=em1
    Bridge=br0
    TYPE=Ethernet
    onboot=yes
    NM_CONTROLLED=no
    BOOTPROTO=none

    ifcfg-br0配置文件内容Example:

    DEVICE=br0
    TYPE=Bridge
    ONBOOT=yes
    BOOTPROTO=static
    IPADDR=
    NETMASK=
    GATEWAY=

    2,libvirt 运行虚拟机xml配置文件Example

    <domain type='kvm' id='3'>
      <name>eucalyptus-windows</name>
      <uuid>7ab022c3-c3bf-ea6f-f59a-238a05c023eb</uuid>
      <memory unit='KiB'>7524352</memory>
      <currentMemory unit='KiB'>7524288</currentMemory>
      <vcpu placement='static'>4</vcpu>
      <os>
        <type arch='x86_64' machine='rhel6.5.0'>hvm</type>
        <boot dev='hd'/>
      </os>
      <features>
        <acpi/>
      </features>
      <clock offset='utc'/>
      <on_poweroff>destroy</on_poweroff>
      <on_reboot>restart</on_reboot>
      <on_crash>destroy</on_crash>
      <devices>
        <emulator>/usr/libexec/qemu-kvm</emulator>
        <disk type='file' device='disk'>
          <driver name='qemu' type='raw'/>
          <source file='/var/lib/libvirt/images/WindoVm01.img'/>
          <target dev='vda' bus='virtio'/>
          <alias name='virtio-disk0'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
        </disk>
        <disk type='file' device='disk'>
          <driver name='qemu' type='raw'/>
          <source file='/home/ruiynewdisks.img'/>
          <target dev='vdb' bus='virtio'/>
          <alias name='virtio-disk1'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
        </disk>
        <disk type='file' device='disk'>
          <driver name='qemu' type='qcow2' cache='none'/>
          <source file='/home/ruiydata/ruiyvdc.qcow2'/>
          <target dev='vdc' bus='virtio'/>
          <alias name='virtio-disk2'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
        </disk>
    <controller type='usb' index='0'>
          <alias name='usb0'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
        </controller>
        <interface type='bridge'>
          <mac address='52:54:00:c4:80:6a'/>
          <source bridge='br0'/>
          <target dev='vnet0'/>
          <model type='virtio'/>
          <alias name='net0'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
        </interface>
        <input type='mouse' bus='ps2'/>
        <graphics type='vnc' port='5923' autoport='no' listen='0.0.0.0'>
          <listen type='address' address='0.0.0.0'/>
        </graphics>
        <video>
          <model type='cirrus' vram='9216' heads='1'/>
          <alias name='video0'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
        </video>
        <memballoon model='virtio'>
          <alias name='balloon0'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
        </memballoon>
      </devices>
      <seclabel type='none'/>
    </domain>
  • 相关阅读:
    边缘检测算法——Canny和LoG边缘检测算法
    Java读书笔记03 输入输出
    CMake入门
    二叉树及二叉树的遍历
    Java读书笔记11 图形程序——颜色 字体 图像
    XNA实现骨骼动画 归纳总结
    Java读书笔记09 内部类
    Java读书笔记02 基础知识
    Java用户界面 模型视图控制器(MVC)模式
    简单理解传值和传引用
  • 原文地址:https://www.cnblogs.com/ruiy/p/4441771.html
Copyright © 2020-2023  润新知