准备工作
相关知识点
firewall-cmd --zone=public --add-port=9500/tcp --permanent #开启端口9500
--zone #作用域
--add-port=80/tcp #添加端口,格式为:端口/通讯协议
--permanent #永久生效,没有此参数重启后失效
firewall-cmd --reload #重启防火墙
systemctl restart NetworkManager # 重启网卡
echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf #内核添加ipv4转发
sysctl -p /etc/sysctl.conf #使配置生效
额外配置
<os>
<type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
<boot dev='cdrom'/>
</os>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/data/images/CentOS_6.5_Final.iso'/>
<target dev='hda' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'>
<listen type='address' address='0.0.0.0'/>
</graphics>