ASA 8.42 for Qemu 0.11.0 on Linux
2011-12-20网络模拟器撒加124052°c
A+ A-1、需要准备的软件包
qemu 0.11.0 :https://download.savannah.gnu.org/releases/qemu/qemu-0.11.0.tar.gz
qemu-olive-patch:https://downloads.sourceforge.net ... live.patch?download
2、对于使用RHEL、CentOS的用户,系统安装参看https://www.netemu.cn/bbs/thread-15079-1-1.html
yum -y install syslinux
wget https://download.savannah.gnu.org/releases/qemu/qemu-0.11.0.tar.gz
tar zxf qemu-0.11.0.tar.gz -C /mnt
cd /mnt
wget https://downloads.sourceforge.net ... live.patch?download
patch -p1 -i qemu-0.11.0-olive.patch
./configure --prefix=/opt/qemu-0.11 --disable-aio --disable-kvm --disable-kqemu --target-list=i386-softmmu
make && make install
3、解压ASA 8.42
上传asa842-k8.bin repack到服务器
chmod +x repack
./repack ./asa842-k8.bin
稍等片刻就可以看到下面3个文件了
4、启动ASAecho "/opt/qemu-0.11/bin" >> /etc/profile
. /etc/profile
mkdiskimage flash 980 16 32
qemu -m 1024 \
-hda ./FLASH \
-localtime \
-kernel asa842-vmlinuz \
-initrd asa842-initrd.gz \
-hdachs 980,16,32 \
-append "ide_generic.probe_mask=0x01 ide_core.chs=0.0:980,16,32 auto nousb console=ttyS0,9600 bigphysarea=65536 root_dev=0x6802"\
-net "nic,vlan=0,macaddr=00:00:ab:cd:ef:01,model=pcnet" -net "user,vlan=0,net=172.16.3.0/24" \
-net "nic,vlan=1,macaddr=00:00:ab:cd:ef:02,model=pcnet" -net "user,vlan=1,net=172.16.1.0/24" \
-net "nic,vlan=2,macaddr=00:00:ab:cd:ef:03,model=pcnet" -net "user,vlan=2,net=172.16.2.0/24" \
-net "nic,vlan=3,macaddr=00:00:ab:cd:ef:04,model=pcnet" -net "user,vlan=3,net=172.16.3.0/24" \
-serial telnet:192.168.10.112:20000,server,nowait
#!/bin/bash IMAGE=$1 CWD=`pwd` [ -z "$IMAGE" ] && IMAGE=$CWD/asa842-k8.bin if [ ! -f "$IMAGE" ]; then echo "USAGE: repack.sh /path/to/asa/image" exit 1; fi BASE_NAME=`basename "$IMAGE"` case "$BASE_NAME" in 'asa842-k8.bin') # ASA 8.4(2) dd skip=102400 if="$IMAGE" of="$CWD/asa842-vmlinuz" bs=1 count=1359344 dd skip=1461744 if="$IMAGE" of="$CWD/asa842-initrd-original.gz" bs=1 TMP_DIR=`mktemp -d` pushd $TMP_DIR gunzip -c "$CWD/asa842-initrd-original.gz" | cpio -i --no-absolute-filenames --make-directories sed -i -e "s/\(VERBOSE=\).*/\1yes/" etc/init.d/rcS sed -i -e "s#/sbin/ifup -a#for int in \`ifconfig -a | grep -o '^eth.'\`; do ifconfig \$int up; done\n\tifconfig -a | awk '/^eth./{a=a\"-e \"\$1\" \"}END{print a}' >/tmp/lina_eth#" etc/init.d/S40network sed -i -e "s#lina_monitor -l\"#lina -t \`cat /tmp/lina_eth\`\"#" asa/scripts/rcS xxd -r - asa/bin/lina <<END 0c42a60: e8bb 3f00 0085 c00f 84b0 fbff ff8d 7600 0c42a70: e8ab 3f00 0085 c089 85e8 feff ff0f 849a 0c42b80: 5424 0889 4424 04c7 0424 0000 0000 e925 0c42b90: 0200 00e9 0bff ffff e813 9aff ff8d 7600 0c42db0: feff ff90 8d74 2600 8d46 02c7 45c0 0000 0c42dc0: 0000 8945 c4c7 45c8 0000 0000 e89f f5ff 0c42dd0: ff90 9090 e9ca fcff ff8d b426 0000 0000 0c4a670: 3bff 8db6 0000 0000 8b45 e4c7 45c0 0100 END find . | cpio -o -H newc | gzip -9 > "$CWD/asa842-initrd.gz" popd rm -rf $TMP_DIR ;; *) # Default case echo "Version <$BASE_NAME> is not supported!" exit 1; ;; esac
PS:目前暂时不能运行在WIN上面,0.11 0.12 0.13 0.14 0.15 for win都不可以运行