transmit_packets_to_vm: tmp variable was global