Score:0

Weird Network slowness on qemu vms

in flag

I've created two qemu VMs using below command. Both VMs are on virbr0 bridge.

qemu-system-x86_64 \
  -drive "file=bionic-server-cloudimg-amd64.img,format=qcow2" \
  -drive "file=${user_data},format=raw" \
  -device rtl8139,netdev=net0 \
  -enable-kvm \
  -m 2G \
  -netdev bridge,br=virbr0,id=net0 \
  -serial mon:stdio \
  -smp 2 \
  -vga virtio;

IP of first vm is 192.168.122.76 and for second one is 192.168.122.77

Wierd network issue is, if I do an ssh to vm-1 it will be fast and instantly I will be asked for password. Then I try ssh to vm-2 and it takes about 20 seconds for the password prompt to appear. Then I again try ssh to vm-2 and it instantly asks for password. Next I do ssh to vm-1 and I notice about 20 seconds before it shows password prompt.

In short, whichever IP I used last connects instantly and the other one responds after a long delay.

The I ran same hello world application on both VMs exposed on same port, port 8080. Then I see the same behaviour with the curl as well I get instant response when I curl the same IP again. And if I move from one IP to other, it again gives a delayed response.

I am using bionic-server-cloudimg-amd64 image for VM and Ubuntu 21.10 is my host machine which is running as a VMWare Fusion VM on a Mac.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.