Re: KVM networking.
Arno Schuring <email@example.com> wrote:
> I don't think qemu gives you NAT for free...
If you use "-net user" you get a NAT-based solution (you then need to
punch "inbound" holes using the hostfwd parameter, as necessary). This
solution also requires no root priviledge, so it's an easy win.
Personally, I'd rather run up a bridge and use the libvirt tools to run
my VM for me (avoids giving root rights to a user, but allows the guest
to run with the necessary root network privs).
iface eth0 inet static
dns-nameservers 192.168.1.200 192.168.1.201
pre-up ip link set eth0 name peth0
post-down ip link set peth0 name eth0
This little lot brings up eth0 with a static address (change the "static"
for "dhcp" if you prefer, and drop the address, netmask, network,
broadcast, gateway, dns-* entries). In the process of doing so, it
renames eth0 to peth0 ("physical-eth0") and creates a bridge called eth0.
Net effect is that you can still think about "eth0", but actually it's
a bridge, to which your VMs can also connect.