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>
时间: 2024-08-29 18:18:35

CentOS bridge br0 kvm libvirt-xml的相关文章

Centos 6.4 KVM安装和配置

Centos 6.4 KVM安装和配置 测试使用环境: 服务器:Dell R710  CPU型号物理CPU颗数内存大小和数量 [[email protected] ~]# cat /proc/cpuinfo | grep name | cut -d: -f2 | uniq -c 16  Intel(R) Xeon(R) CPU           L5520  @ 2.27GHz [[email protected] ~]# cat /proc/cpuinfo | grep physical |

Centos 6 的kvm 安装和配置

kvm 安装和配置 宿主机环境:Centos 6.6 最近在玩kvm,小小总结一下. 1.检查CPU是否支持 KVM 需要有 CPU 的支持(Intel VT 或 AMD SVM),在安装 KVM 之前检查一下 CPU 是否提供了虚拟技术的支持: # egrep 'vmx|svm' /proc/cpuinfo # modprobe -ls | grep kvm   #查看内核是否开启 kernel/arch/x86/kvm/kvm.ko kernel/arch/x86/kvm/kvm-intel

Centos 6.4 KVM安装

第一步:修改网卡配置文件并重启网络服务: cd /etc/sysconfig/network-scripts/ [[email protected] network-scripts]# cat ifcfg-br0 DEVICE="br0"ONBOOT="yes"TYPE=BridgeBOOTPROTO=static#HWADDR=F0:1F:AF:DA:7A:55#IPADDR=0.0.0.0#NETMASK=255.255.255.0[[email protect

centos 7.2 kvm虚拟化配置以及常用操作

1. 开始安装kvma. 检查你的系统是否支持虚拟化grep -Ei 'vmx|svm' /proc/cpuinfo如果有输出内容,则支持,其中intelcpu支持会有vmx,amd cpu支持会有svm b. 通过yum安装虚拟化的软件包yum install -y kvmvirt-*  libvirt  bridge-utils qemu-img说明:kvm:软件包中含有KVM内核模块,它在默认linux内核中提供kvm管理程序libvirts:安装虚拟机管理工具,使用virsh等命令来管理

[转载]kvm libvirt 虚拟机管理

http://www.2cto.com/os/201203/123128.html kvm虚拟机管理 一.环境 role         hostname    ip                  OS kvm_server   target      192.168.32.40/24    rhel6.0_x64 vir_guest1   node4       192.168.32.34/24    rhel5.5_i386 vir_guest2   node5       192.16

Centos 6.5_64 KVM虚拟化

KVM的软件很好安装,只是想顺利正常的使用估计要费一点事,我在创建虚拟机的时候,出现这样那样的错误,开始是创建虚拟机一直不成功,看了网上的别人的资料,好像网上的资料都一样似得,大同小异.最后还是自己琢磨着解决了问题,后来就是创建成功了安装虚拟机出错,反正是费了一点事,最后问题都解决了,安装的虚拟机配上IP地址也测试成功了.至于遇到的问题,要亲自操作一下,分析下报出的错,对今后工作中就会有很大的帮助,对了查看日志也会对排除错误有很大的帮助. 准备工作: 1.关闭防火墙或者开启防火墙 2.关闭sel

kvm guest xml 文件详解

完整的xml文件 <domain type='kvm'> <name>centoskvm3</name> <uuid>bdbb89fb-57d1-4d01-b3b7-ff33a9346ae6</uuid> <memory>2048000</memory> <currentMemory>1024000</currentMemory> <vcpu>2</vcpu> <os&

kvm libvirt 虚拟机管理

http://www.2cto.com/os/201203/123128.html kvm虚拟机管理一.环境role         hostname    ip                  OSkvm_server   target      192.168.32.40/24    rhel6.0_x64vir_guest1   node4       192.168.32.34/24    rhel5.5_i386vir_guest2   node5       192.168.32.

QEMU KVM libvirt 手册(1)

安装 对虚拟化的支持通常在BIOS中是禁掉的,必须开启才可以. 对于Intel CPU,我们可以通过下面的命令查看是否支持虚拟化. # grep "vmx" /proc/cpuinfo flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdp