Just wondering if it's possible to have virtual networking interfaces that are accessible through the host's interface and IP?

Then I'd like to assign a subdomain to it and have the host direct to the correct guest based on that.

  • Are you running KVM manually, or are you using libvirt (e.g. virt-manager or virsh?) – sciurus Jun 30 '11 at 14:51

there are two ways - you can either use libvirt's own iptables implementation, so the VMs are behind a NAT, or you can set up a bridge and use it instead. The bridge will ct as a virtual hub, into which the host and the VMs are plugged. in the first scenario, the VMs will be "behind" the host, since it will be acting as a router to the hosts' virtual network in the second, the VMs will be in the same network as the host (you can add VLANs in of course, to separate them)


You want a network bridge, then:


  • Are the IPs assigned to the virtual machines will be internal private addresses and I can reach them through the one physical interface? – kobrien Jun 29 '11 at 15:29
  • If you scroll up, that scenario is documented as well. – Rilindo Jun 29 '11 at 15:57
  • They asked that the virtual machines be accessible through the hosts IP. That is not what a bridge would do. – sciurus Jun 30 '11 at 14:50
  • If you look at the second part of the submitter's request, he also wants to point a subdomain to the VM. You can do that using NATing rules, but it would just be easier to put the VM with its own IP, setup a network bridge (assuming that he has a free IP to use). In either case, both options are documented on the KVM site. – Rilindo Jun 30 '11 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.