本文共 4169 字,大约阅读时间需要 13 分钟。
#egrep '^flags.*(vmx|svm)' /proc/cpuinfo
# cat /etc/redhat-release
# yum install qemu-kvm libvirt libvirt-python libguestfs-tools virt-install -y
# brctl showbridge name bridge id STP enabled interfacesvirt-mgmt-br 8000.20040fe827d4 no em1
# pwd/opt/hillstone-cmd-libvirt# lltotal 2097760-rw-r--r--. 1 root root 258 Jan 11 15:55 hillstone-br0-rw-r--r--. 1 root root 135 Jan 11 14:51 hillstone-br1-rw-r--r--. 1 root root 135 Jan 11 14:52 hillstone-br2-rw-r--r--. 1 root root 135 Jan 11 14:52 hillstone-br3-rw-r--r--. 1 root root 135 Jan 11 14:52 hillstone-br4-rw-r--r--. 1 root root 135 Jan 11 14:52 hillstone-br5-rwxrwxrwx. 1 root root 762 Jan 11 16:07 install.sh-rw-r--r--. 1 root root 133 Jan 11 16:09 xyzbr-network.xml-rw-r--r--. 1 qemu qemu 2148073472 Jan 12 12:17 SG6000-CloudEdge-5.5R5-VM01-v6.qcow2```shell* VFW的镜像文件先要准备好```shell# ll | grep qcow2-rw-r--r--. 1 qemu qemu 2148073472 Jan 12 10:57 SG6000-CloudEdge-5.5R5-VM01-v6.qcow2
# cat xyzbr-network.xml# virsh net-define xyzbr-network.xml # virsh net-start xyzbr0# virsh net-autostart xyzbr0 xyzbr0
# cat hillstone-br0hillstone-br0
# cat hillstone-br1hillstone-br1
# cat install.sh virt-install \ --name hillstone \ --wait 0 \ --os-type linux \ --virt-type kvm \ --accelerate \ --vnc --vnclisten 0.0.0.0 \ --ram 2048 \ --vcpus 2 \ --boot cdrom \ --disk path=/opt/hillstone-cmd-libvirt/SG6000-CloudEdge-5.5R5-VM01-v6.qcow2,device=disk,bus=ide,format=qcow2 \ --serial tcp,host=0.0.0.0:8123,mode=bind,protocol=telnet \ --network network=xyzbr0,model=virtio,target=he0 \ --network network=xyzbr0,model=virtio,target=he1 \ --network network=xyzbr0,model=virtio,target=he2 \ --network network=xyzbr0,model=virtio,target=he3 \ --network network=xyzbr0,model=virtio,target=he4 \ --network network=xyzbr0,model=virtio,target=he5 \ --network network=xyzbr0,model=virtio,target=he6
# ./install.sh WARNING No operating system detected, VM performance may suffer. Specify an OS with --os-variant for optimal results.Starting install...Domain creation completed.#
# virsh start hillstone## virsh list Id Name State---------------------------------------------------- 4 hillstone running## virsh domiflist hillstoneInterface Type Source Model MAC-------------------------------------------------------he0 bridge xyzbr0 virtio 52:54:00:9a:51:32he1 bridge xyzbr0 virtio 52:54:00:44:e3:98he2 bridge xyzbr0 virtio 52:54:00:9c:ae:d4he3 bridge xyzbr0 virtio 52:54:00:e8:4b:b8he4 bridge xyzbr0 virtio 52:54:00:51:ee:11he5 bridge xyzbr0 virtio 52:54:00:f2:84:0ahe6 bridge xyzbr0 virtio 52:54:00:74:6d:9d
ovs-vsctl set port he2 tag=x
# telnet localhost 8123Trying ::1...telnet: connect to address ::1: Connection refusedTrying 127.0.0.1...Connected to localhost.Escape character is '^]'.login:
#VFW配置和验证
##基本配置configureinterface eth0/0no ip address dhcpip address 10.25.130.100/16 manage ssh manage ping manage snmp manage httpsexitip vrouter trust-vrip route 0.0.0.0/0 10.25.0.1exit
ha link interface ethernet0/5ha link ip 2.2.2.1 255.255.255.0ha group 0ha cluster 1 node 1
interface eth0/1zone trustno ip address dhcpip address 10.3.3.254/254 manage ping
转载地址:http://soln.baihongyu.com/