I have a problem with simultaneously running KVM instances whose nature I can really only describe as interference. When I run one virtual machine alone I have no difficulty interacting with it, either through the sdl console presented or via ssh. However, once I run two virtual machines I am unable to:
- login at the sdl console; the correct username/password being declared invalid on the first attempt and further attmepts echoing text I have not typed, such as "r^]o^]o^]t^]"
- finalize the ssh connection into an affected instance
My client machines are Debian Squeeze and my host machine is Arch Linux 2.6.39-ARCH with qemu-kvm 0.14.1. Here's how I'm running the two interfering virtual machines:
#!/bin/sh
for f in puppet loadbalance # app0 db_master0 db_slave0 jenkins
do
qemu-kvm -drive file=$f.qcow2,if=virtio -boot c -netdev type=vde,id=tiny \
-device virtio-net-pci,netdev=tiny -name $f &
done
If I run the machines with the -nographic
flag I am able to complete an ssh login, but eventually (within 5 minutes) all but one ssh console experiences very high latency. Once "focused" that virtual machine responds immediately, while the others become high-latency. Pings around the virtual network fail, between the "focused" machine and all others and from my host. What's going on here?
Check that instances all have unique MAC addresses. Sounds as though there is a MAC address collision issue.
-netdev tap,fd=21,id=hostnet0,vhost=on,vhostfd=23 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:87:ec:d3,bus=pci.0,addr=0x3
this is what I use for networking. Can't see why you'd want to use vde, when bridging works so well. Especially, since it's not recommended for QEMU anyway:
prooflink: http://wiki.qemu.org/Documentation/Networking#VDE