-
Notifications
You must be signed in to change notification settings - Fork 2
VM Setup
husainnk edited this page Jun 22, 2023
·
14 revisions
This page explains the procedure to setup virtual machines for scaled-out execution across two x86-VMs
Replace wlx6c5ab0385cfb with your WLAN interface
sudo ip tuntap add mode tap tap0
sudo ip addr add 10.2.0.1/24 dev tap0
sudo ip link set tap0 up
sudo ip tuntap add mode tap tap1
sudo ip addr add 10.2.1.1/24 dev tap1
sudo ip link set tap1 up
sudo iptables -t nat -A POSTROUTING -o wlx6c5ab0385cfb -j MASQUERADE
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
IMAGE_PATH=<Image Directory Path>
KERNEL=${IMAGE_PATH}/bzImage
IMAGE_1=${IMAGE_PATH}/buster.img
IMAGE_2=${IMAGE_PATH}/buster.img
# Launch first VM (username: root)
qemu-system-x86_64 -smp 4 -M q35 -device qemu-xhci,id=xhci -m 4G -enable-kvm -kernel $KERNEL -append "root=/dev/sda ro console=ttyS0" -hda ${IMAGE_1} -no-reboot -nographic -net nic,macaddr=00:da:bc:de:00:13 -net tap,ifname=tap0
# Open another terminal, Launch second VM (username: root)
qemu-system-x86_64 -smp 4 -M q35 -device qemu-xhci,id=xhci -m 4G -enable-kvm -kernel $KERNEL -append "root=/dev/sda ro console=ttyS0" -hda ${IMAGE_2} -no-reboot -nographic -net nic,macaddr=00:da:bc:de:02:11 -net tap,ifname=tap1
Update your .ssh/config file by adding these configurations
Host dsm_server
HostName 10.2.0.100
Port 22
user root
IdentityFile <Image Directory>/buster.id_rsa
Host dsm_client
HostName 10.2.1.100
Port 22
user root
IdentityFile <Image Directory>/buster.id_rsa