Hi,
I have a virtualized infrastructure based on KVM/QEMU with CentOS 5.5 x86_64 hosts and guests, using bridge networking. I want to set up IP based VirtualHosts in Apache (because they will use SSL) and I have ordered an IP block.
Now, in order to have the IPs available on some guests, I'm wondering whether I should: 1 - add additional virtual interfaces or 2 - set up IP aliases (eth0:1, etc.) in the guests
I imagine that (1) would be faster and more efficient (but that's a guts feeling), and it feels cleaner. But with (2), I just need to restart the network in order to add new IPs (there won't be that many: like around 10 in the next few months), insteead of restarting the whole guest.
Are there any best practices for adding IP-addresses to virtualized guests?
Thanks in advance for your insights!
Mathieu
On 08/10/2010 02:01 AM, Mathieu Baudier wrote:
n order to have the IPs available on some guests, I'm wondering whether I should: 1 - add additional virtual interfaces or 2 - set up IP aliases (eth0:1, etc.) in the guests
I imagine that (1) would be faster and more efficient (but that's a guts feeling), and it feels cleaner. But with (2), I just need to restart the network in order to add new IPs (there won't be that many: like around 10 in the next few months), insteead of restarting the whole guest.
You don't have to restart the guest to add or remove aliases:
ifup eth0:1
ifdown eth0:1
work fine for starting and stopping them.
You don't have to restart the guest to add or remove aliases:
yes I am aware of that, and that's why I'm wondering whether it is better to use aliases rather than to add virtual interfaces (which does require to restart guests with our KVM version, no hot-plug I think).
But is there any drawback with using aliases? Or does using virtual interfaces provide additional performance/stability/... ?
On 08/10/2010 07:12 AM, Mathieu Baudier wrote:
You don't have to restart the guest to add or remove aliases:
yes I am aware of that, and that's why I'm wondering whether it is better to use aliases rather than to add virtual interfaces (which does require to restart guests with our KVM version, no hot-plug I think).
You said it backwards originally. You said that aliases required restarts. ;)
But is there any drawback with using aliases? Or does using virtual interfaces provide additional performance/stability/... ?
I've never had issues with aliases. They 'just work'. I use hundreds of them.