Score:0

How to connect QEMU directly to the outside network using command line?

ke flag

My host has 1 Ethernet controller with the IP address 192.168.1.2/24, and I want the virtual machine to be on the same subnet with the address 192.168.1.3/24.

Basically it is making a bridge interface on the host with the old IP address, and a tap interface as a member of that bridge, and use that tap interface as the backend of the virtual machine network interface. All tutorial I found always instruct me to use libvirt or virt-manager. I don't want any layer of abstration, and want to manually create the bridge on the host and use pure qemu-system-x86_64 syntax.

How can I do it? Command line syntax is fine, but I am also interested in netplan syntax because it is persistent between Ubuntu reboots. I can create the bridge using netplan configuration file already, but do not know how to add a tap device to it.

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.