在KVM里装个pfSense

第一步:安装配置

virsh destroy router-wan1-1
virsh undefine router-wan1-1
qemu-img create -f qcow2 -o size=8G /home/qemu/qcow2/sys/router-wan1-1.qcow2
virt-install --name=router-wan1-1 --ram=1024 --vcpus=4 --boot=cdrom \
--disk path=/home/qemu/qcow2/sys/router-wan1-1.qcow2,device=disk,format=qcow2 \
--cdrom=/dev/null \
--network network:default,model=virtio \
--vnc --vncport=59111 --vnclisten=0.0.0.0

第二步:网卡修改、VNC密码设置

virsh destroy router-wan1-1
virsh edit router-wan1-1

1:把

    <interface type='network'>
      <mac address='52:54:00:8e:a6:c5'/>
      <source network='default'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

替换成

    <interface type='bridge'>
      <source bridge='brf0'/>
      <virtualport type='openvswitch'>
      </virtualport>
      <model type='virtio'/>
    </interface>
    <interface type='bridge'>
      <source bridge='brf1'/>
      <virtualport type='openvswitch'>
      </virtualport>
      <model type='virtio'/>
    </interface>
    <interface type='bridge'>
      <source bridge='brf2'/>
      <virtualport type='openvswitch'>
      </virtualport>
      <model type='virtio'/>
    </interface>
    <interface type='bridge'>
      <source bridge='brf3'/>
      <virtualport type='openvswitch'>
      </virtualport>
      <model type='virtio'/>
    </interface>

2:然后把

listen='0.0.0.0'>

替换成

listen='0.0.0.0' passwd='密码'>

第三步:启动开始安装

virsh start router-wan1-1
virsh attach-disk router-wan1-1 /home/qemu/iso/pfSense-CE-2.4.3-RELEASE-amd64.iso hdb --type cdrom

猜你喜欢

转载自www.cnblogs.com/xiangxisheng/p/9357834.html
KvM