Add networking for local testing (dirrrty!)
This commit is contained in:
parent
ea6f59d06f
commit
c6fb4a94ac
2 changed files with 19 additions and 3 deletions
|
|
@ -38,8 +38,12 @@ mke2fs -F -t ext4 ${disk}1
|
|||
mkdir -p /tmp_root
|
||||
mount ${disk}1 /tmp_root
|
||||
|
||||
/usr/bin/lftp --help
|
||||
ls /usr/bin
|
||||
ip a
|
||||
|
||||
ip addr add 10.2.2.2/24 dev ens3
|
||||
ip link set ens3 up
|
||||
#ping 10.2.2.1
|
||||
|
||||
|
||||
sleep 3600
|
||||
|
||||
|
|
|
|||
14
qemu.sh
14
qemu.sh
|
|
@ -1,10 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
ifname_tap=taptstsync
|
||||
ifname_br=brtstsync
|
||||
|
||||
[ -e pladde.img ] || qemu-img create pladde.img 4G
|
||||
|
||||
sudo ip tuntap add dev $ifname_tap mode tap user $USER
|
||||
sudo brctl addbr $ifname_br
|
||||
sudo brctl addif $ifname_br $ifname_tap
|
||||
sudo ip addr add 10.2.2.1/24 dev brtstsync
|
||||
sudo ip link set taptstsync up
|
||||
sudo ip link set brtstsync up
|
||||
|
||||
qemu-system-x86_64 \
|
||||
-kernel vmlinuz \
|
||||
-initrd initrd.gz \
|
||||
-drive format=raw,if=scsi,file=pladde.img \
|
||||
-append root=/dev/sda1 \
|
||||
-m 1G
|
||||
-m 1G \
|
||||
-net nic \
|
||||
-net tap,ifname=$ifname_tap,script=no,downscript=no
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue