F5: Difference between revisions
→Deploy F5 in KVM
(→iRule) |
|||
Line 109:
sudo mv BIGIP-16.1.3-0.0.12.qcow2 /var/lib/libvirt/images/
<pre>
virt-install --name ubuntu-trusty --ram 256 --disk path=/var/kvm/images/trusty.img,size=3 --vcpus 1 --os-type linux --os-variant ubuntutrusty --graphics none --console pty,target_type=serial --location 'http://fr.archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/' --extra-args 'console=ttyS0,115200n8 serial'
Line 139:
--os-variant=rhel6 \
--import --autostart --noautoconsole
sudo virsh shutdown bigip
sudo virsh destroy bigip
Line 169 ⟶ 168:
nano /etc/libvirt/hooks/qemu
#!/bin/bash
# Hook to insert NEW rule to allow connection for VMs
Line 186 ⟶ 184:
# avoid duplicate as this hook get called for each VM
[ $v -le 2 ] && /sbin/iptables -I FORWARD 1 -o virbr0 -m state -s 10.170.131.0/24 -d 192.168.122.109/32 --state NEW,RELATED,ESTABLISHED -j ACCEPT
chmod -v +x /etc/libvirt/hooks/qemu
Line 222 ⟶ 219:
save /sys config
=== Install CentOS ===
Line 234 ⟶ 227:
Now able to login to new guest as root / DDYrTXJZTJldOqimb68ZK5KCmRpbdBOe
sudo virt-install \
--name=CentOS \
Line 247 ⟶ 241:
--os-variant=rhel6 \
--import --autostart --noautoconsole
sudo iptables -t nat -I PREROUTING -p tcp -d 10.170.131.132 --dport 443 -j DNAT --to-destination 192.168.122.98:443
sudo iptables -t nat -I PREROUTING -p tcp -d 10.170.131.132 --dport 80 -j DNAT --to-destination 192.168.122.98:80
sudo iptables -I FORWARD -m state -d 192.168.122.0/24 --state NEW,RELATED,ESTABLISHED -j ACCEPT
</pre>
|