Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
you don't do it in kvm, you do it within the guest operating system. KVM doesn't care about the IP addresses you're using and clearly has no way to reach inside the VM and configure it automagically, why should it? Just configure the guest appropriately like any other operating system install on a physical machine.
There are quite alot of bridging guides, essentially what you have to do on your host system is create a bridge device and attach it to your virtual machine using the tun/tap devices.
With vdelan I do not really mean virtual device, that's about eveything on a virtual machine ;-) I mean Virtual Distributed Ethernet. In short: a virtual switch. You can connect to that if you define your net device with if=vde (you also need a "real" interface, for which I use virtio)
you then get -net vlan=0,if=virtio,macaddr=01:23:45:67:89 -net vlan=0,if=vde
For that you only need one tap device, which you can create at boot time (doesn't really hurt) on your host. Adding dnsmasq and attach it to that device and you have a dynamic solution that offers near everything in this regard.
There are no default IP numbers for the virtual machines; you define the addresses that should be assigned with dnsmasq. Then again: addresses like 10.x.x.x are good values for being safe to use internally.
You can use iptables to forward them indeed; addresses need only to be known to the host that forwards the ports.
no, you don't create a new bridge unless you want to, i.e. you have a different address space and requirements from it. I'm currently building a very bespoke kvm / qemu environment with about 14 bridges between 8 VM's, but in a simple environment you would often only have a single bridge, default, onto which all VM's would be hooked. if you're using virt-manager then there, as I understand it, a short coming in the network tpyes in that you can create routing bridges and nat bridges, but not transparent bridges, where your VM ip's would be in the same address space as the other physical machines in the environment. This can be created very easily on the machine though outside of virt-manager
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.