Re: [CentOS-virt] Are xen and centos incompatible?
On 06/10/2014 05:44 AM, lee wrote: [...] and xen just don't go along with each other. The server is all on debian now. The problem with incompetence is its inability to recognize itself. -- Orrin Woodward https://www.goodreads.com/author/show/249881.Orrin_Woodward, /L.I.F.E. Living Intentionally For Excellence https://www.goodreads.com/work/quotes/16132299 / ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] Finally switching from Xen to KVM - question about networking
I had so much trouble putting Centos 6 guest VMs on a Centos 5 host that I finally switched to a Centos 6 host. I've not needed more that test VMs, so I've used Virtual Machine Manager on the old system, which worked pretty well, so I decided to create my first KVM guest machine. I noticed when I created it, I only had the options of NAT for my network interface, so I used that (obvious). Well, after starting the VM, I find I don't have connectivity with that interface. Reading, I find examples where I need to create bridges perhaps. Xen did most of this for me, so it's a little new to me. Can anyone throw me a clue, please? steve campbell ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Network Bridgeing
Hi again, Just to let know that I solved the issue. After some troubleshooting i could notice the following: The vnet0 (virtual network adapter for my Windows 2K03 VM) was into the virbr0 bridge so that's why when I configured the VM host with my valid IP address I could not get connectivity between hosts. So once time I deleted the vnet0 interface from virbr0 bridge, and add it to the br0 bridge Voila the connectivity start working. [root@himalaya ~]# brctl show bridge name bridge id STP enabled interfaces br0 8000.00269e825538 no eth0 virbr08000.525400edecc7 yes virbr0-nic vnet0 (delete interface vnet0 from virbr0 bridge) # brctl delif virbr0 vnet0 (add interface vnet0 from virbr0 bridge) # brctl addif br0 vnet0 Thnk you very much for patience, and you time to get reply to my thread. Best regards, RR De: centos-virt-boun...@centos.org [mailto:centos-virt-boun...@centos.org] En nombre de Zoltan Frombach Enviado el: lunes, 09 de junio de 2014 03:44 p.m. Para: Discussion about the virtualization on CentOS Asunto: Re: [CentOS-virt] Network Bridgeing I didn't know you were using a DHCP server... Can you set a static IP on your Windows guest instead? ( With the configuration I suggested. ) I believe that would solve your problem. In my host I do not have a virbr0 bridge, I only have br0 So probably you should remove virbr0 Same goes for eth0:1 which should be removed. ( Do not create an alias interface on eth0 if you make it belong to br0 ) Also, you should add (or change) NM_CONTROLLED=no in both your /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network-scripts/ifcfg-br0 files. I do have ipv6 completely disabled in my host config which you can achieve by adding IPV6INIT=no IPV6_AUTOCONF=no lines to /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network-scripts/ifcfg-br0 files As an example, here is my working /etc/sysconfig/network-scripts/ifcfg-eth0 file: DEVICE=eth0 BOOTPROTO=none ONBOOT=yes NM_CONTROLLED=no TYPE=Ethernet HWADDR=xx:xx:xx:xx:xx:xx = your physical NIC's MAC goes here BRIDGE=br0 USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no and my /etc/sysconfig/network-scripts/ifcfg-br0 file: DEVICE=br0 BOOTPROTO=static ONBOOT=yes NM_CONTROLLED=no TYPE=Bridge IPADDR=xxx.xxx.xxx.xxx = the IP you want to use for your host goes here NETMASK=255.255.255.xxx = your netmask goes here GATEWAY=xxx.xxx.xxx.xxx = your gateway goes here DNS1=8.8.8.8 DNS2=8.8.4.4 PEERDNS=yes DELAY=0 STP=off USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no And I set a static IP in Windows, for DNS I use Google Public DNS: ( https://developers.google.com/speed/public-dns/docs/using ) 8.8.8.8 8.8.4.4 In Virtual Machine Manager, my Windows guest's NIC is configured as Network Source: Specify shared device name Bridge Name: br0 Device model: virtio MAC address: Here I have an auto generated unique MAC address to be used for this VM only! In Windows, install the latest virtio drivers which you can download from here: http://www.linux-kvm.org/page/WindowsGuestDrivers/Download_Drivers Zoltan On 6/9/2014 9:38 PM, Ing. Ramon Resendiz wrote: Hi Zoltan, I did the eth0 bridge to br0. As you explain i did the assignment the ip from eth0 to the br0 interface. And is working I could ping between interface from IP eth0 (br0) to VM and from VM to IP eth0. As well I tried to configure my VM with the valid IP address and the connectivity loss until I get back to the original configuration (dhcp). Here is my ifconfig output: br0 Link encap:Ethernet HWaddr 00:26:9E:XX:XX:XX inet addr:208.66.XX.XX Bcast:208.66.XX.XX Mask:255.255.255.248 inet6 addr: fe80::226:9eff:fe82:5538/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:8096 errors:0 dropped:0 overruns:0 frame:0 TX packets:10438 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:629208 (614.4 KiB) TX bytes:6818121 (6.5 MiB) eth0 Link encap:Ethernet HWaddr 00:26:9E:XX:XX:XX inet6 addr: fe80::226:9eff:fe82:5538/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6768417 errors:0 dropped:0 overruns:0 frame:0 TX packets:1952736 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:9696354264 (9.0 GiB) TX bytes:305746274 (291.5 MiB) Memory:df6e-df70 eth0:1Link encap:Ethernet HWaddr 00:26:9E:XX:XX:XX UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:468 (468.0 b) Memory:df6e-df70 eth1 Link
Re: [CentOS-virt] Finally switching from Xen to KVM - question about networking
On 10/06/14 11:46 AM, Steve Campbell wrote: On 6/10/2014 10:46 AM, Digimer wrote: On 10/06/14 10:03 AM, Steve Campbell wrote: I had so much trouble putting Centos 6 guest VMs on a Centos 5 host that I finally switched to a Centos 6 host. I've not needed more that test VMs, so I've used Virtual Machine Manager on the old system, which worked pretty well, so I decided to create my first KVM guest machine. I noticed when I created it, I only had the options of NAT for my network interface, so I used that (obvious). Well, after starting the VM, I find I don't have connectivity with that interface. Reading, I find examples where I need to create bridges perhaps. Xen did most of this for me, so it's a little new to me. Can anyone throw me a clue, please? steve campbell Setting up a bridge is not that hard, and it will give your VMs direct access to the outside world, and host - VM access just fine as well. Here is a link showing how to setup a bridge connected to a bond device. Ignore the bond and pretend it is a straight ethX device: https://alteeve.ca/w/AN!Cluster_Tutorial_2#Configuring_our_Bridge.2C_Bonds_and_Interfaces The host has a device named virbr0 that is installed during system installation. It also has a network device vnet0. There are no files in /etc/sysconfig/network-scripts for these. Shouldn't I be able to use the virbr0 virtual bridge for this? I've tried setting up the VM's device with all of the options that is listed, but to no avail. Should I need to set up another bridge for this? And thanks for the link. steve virbr0 is created and managed by libvirtd. If you open Virtual Machine Manager, connect to localhost and then double-click on 'localhost', you will see a tab for creating/managing bridges (NAT'ed, generally). I disable 'virbr0' as NAT'ing is generally not what I want. The 'vnetX' devices are dynamically created to link a VM's interface to a bridge. Think of them as virtual network cables. They get created and destroyed as needed. -- Digimer Papers and Projects: https://alteeve.ca/w/ What if the cure for cancer is trapped in the mind of a person without access to education? ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] Preferred method of provisioning VM images
Hi all, following the discussion on about documentation, I was wondering whether we need to look at a standard way in which we recommend how to provision images for VMs. Am starting this with a Xen hat, but the discussion should not be specific to this. There are a number of options, but all have some trade-offs == #1 virt-install == Advantages: similar to KVM Disadvantages: may cause weird issues / confusion with people switching back to xl. The core issue is that with the current version of xen and libvirt, this only works with xm (when xl is used, this can create some undefined behavior). However as we have seen in some recent threads on this list, people tend to mix which can cause problems. == #2 xen-tools == Advantages: Very flexible. Many other distros use xen-tools, so we have lots of beginners docs that just need to be tweaked Disadvantages: needs porting/packaging for CentOS. Does not work for kvm. Says xen. (Maybe that's an advantage.) We know that xen-tools works with Fedora (see http://blog.xen.org/index.php/2013/01/24/using-xen-tools-on-fedora/), so the porting effort may be small Unknowns: What would be needed to make it work for CentOS == #3 virt-builder (http://libguestfs.org/virt-builder.1.html) == Advantages: supports KVM, Xen and other VM inages. Seems easy to use. - if so, it would avoid xm / xl confusion. Unknowns: Not sure at which level virt-builder integrates with Xen and other hypervisors. It seems to operate at disk image format (similar to xen-tools) . I don't know whether virt-builder is restricted to some hypervisors in RHEL7. Disadvantages: may need porting/packaging for CentOS. It appears as if it will be in RHEL7, so it may just appear with CentOS 7. If not, some porting work may need to be done. == #4 Cloud Image from Cloud Image SIG == We could rely on pre-built cloud images from the Cloud Images SIG. People could just download the cloud image once it's done and customize it, rather than installing / building their own. Advantages: seems easy Disadvantages: coordination with Cloud Images SIG. May not be flexible enough I just wanted to start a discussion about this and ask for input. This topic which has come up a number of times in SIG meetings as a facgtor influencing libvirt and other package versions. Regards Lars ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Finally switching from Xen to KVM - question about networking
On 6/10/2014 12:05 PM, Digimer wrote: On 10/06/14 11:46 AM, Steve Campbell wrote: On 6/10/2014 10:46 AM, Digimer wrote: On 10/06/14 10:03 AM, Steve Campbell wrote: I had so much trouble putting Centos 6 guest VMs on a Centos 5 host that I finally switched to a Centos 6 host. I've not needed more that test VMs, so I've used Virtual Machine Manager on the old system, which worked pretty well, so I decided to create my first KVM guest machine. I noticed when I created it, I only had the options of NAT for my network interface, so I used that (obvious). Well, after starting the VM, I find I don't have connectivity with that interface. Reading, I find examples where I need to create bridges perhaps. Xen did most of this for me, so it's a little new to me. Can anyone throw me a clue, please? steve campbell Setting up a bridge is not that hard, and it will give your VMs direct access to the outside world, and host - VM access just fine as well. Here is a link showing how to setup a bridge connected to a bond device. Ignore the bond and pretend it is a straight ethX device: https://alteeve.ca/w/AN!Cluster_Tutorial_2#Configuring_our_Bridge.2C_Bonds_and_Interfaces The host has a device named virbr0 that is installed during system installation. It also has a network device vnet0. There are no files in /etc/sysconfig/network-scripts for these. Shouldn't I be able to use the virbr0 virtual bridge for this? I've tried setting up the VM's device with all of the options that is listed, but to no avail. Should I need to set up another bridge for this? And thanks for the link. steve virbr0 is created and managed by libvirtd. If you open Virtual Machine Manager, connect to localhost and then double-click on 'localhost', you will see a tab for creating/managing bridges (NAT'ed, generally). I disable 'virbr0' as NAT'ing is generally not what I want. The 'vnetX' devices are dynamically created to link a VM's interface to a bridge. Think of them as virtual network cables. They get created and destroyed as needed. Sorry, but I'm confused: My host server has a real NIC and IP address with a real gateway to the outside: virtbr0 IP: 192.168.122.1 Host IP: 10.0.5.16 Gateway IP: 10.0.5.1 on eth0 and this works My VM server has all fake stuff currently: Host IP: 10.0.5.17 Gateway IP: 10.0.5.1 on eth0 and this is like NIC without a cable. So I need to create a bridge device on both the host and VM (lets say I name it br1). I change the eth0 config file on both host and VM to point to br1 and give the br1 config file on both host and VM the correct IP. But won't this just let the two talk to each other. How will the VM server get outside? steve ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Finally switching from Xen to KVM - question about networking
Do you have only one public IP address and do you want to share that between your host and your VM(s)? In this case you must use NAT config. If you have multiple public IPs and you want to assign one of those to your host and another of those to your guest (VM) then you must create a bridge such as br0 (or br1, it doesn't matter how you number it). On 6/10/2014 6:38 PM, Steve Campbell wrote: On 6/10/2014 12:05 PM, Digimer wrote: On 10/06/14 11:46 AM, Steve Campbell wrote: On 6/10/2014 10:46 AM, Digimer wrote: On 10/06/14 10:03 AM, Steve Campbell wrote: I had so much trouble putting Centos 6 guest VMs on a Centos 5 host that I finally switched to a Centos 6 host. I've not needed more that test VMs, so I've used Virtual Machine Manager on the old system, which worked pretty well, so I decided to create my first KVM guest machine. I noticed when I created it, I only had the options of NAT for my network interface, so I used that (obvious). Well, after starting the VM, I find I don't have connectivity with that interface. Reading, I find examples where I need to create bridges perhaps. Xen did most of this for me, so it's a little new to me. Can anyone throw me a clue, please? steve campbell Setting up a bridge is not that hard, and it will give your VMs direct access to the outside world, and host - VM access just fine as well. Here is a link showing how to setup a bridge connected to a bond device. Ignore the bond and pretend it is a straight ethX device: https://alteeve.ca/w/AN!Cluster_Tutorial_2#Configuring_our_Bridge.2C_Bonds_and_Interfaces The host has a device named virbr0 that is installed during system installation. It also has a network device vnet0. There are no files in /etc/sysconfig/network-scripts for these. Shouldn't I be able to use the virbr0 virtual bridge for this? I've tried setting up the VM's device with all of the options that is listed, but to no avail. Should I need to set up another bridge for this? And thanks for the link. steve virbr0 is created and managed by libvirtd. If you open Virtual Machine Manager, connect to localhost and then double-click on 'localhost', you will see a tab for creating/managing bridges (NAT'ed, generally). I disable 'virbr0' as NAT'ing is generally not what I want. The 'vnetX' devices are dynamically created to link a VM's interface to a bridge. Think of them as virtual network cables. They get created and destroyed as needed. Sorry, but I'm confused: My host server has a real NIC and IP address with a real gateway to the outside: virtbr0 IP: 192.168.122.1 Host IP: 10.0.5.16 Gateway IP: 10.0.5.1 on eth0 and this works My VM server has all fake stuff currently: Host IP: 10.0.5.17 Gateway IP: 10.0.5.1 on eth0 and this is like NIC without a cable. So I need to create a bridge device on both the host and VM (lets say I name it br1). I change the eth0 config file on both host and VM to point to br1 and give the br1 config file on both host and VM the correct IP. But won't this just let the two talk to each other. How will the VM server get outside? steve ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Finally switching from Xen to KVM - question about networking
On 10/06/14 12:38 PM, Steve Campbell wrote: On 6/10/2014 12:05 PM, Digimer wrote: On 10/06/14 11:46 AM, Steve Campbell wrote: On 6/10/2014 10:46 AM, Digimer wrote: On 10/06/14 10:03 AM, Steve Campbell wrote: I had so much trouble putting Centos 6 guest VMs on a Centos 5 host that I finally switched to a Centos 6 host. I've not needed more that test VMs, so I've used Virtual Machine Manager on the old system, which worked pretty well, so I decided to create my first KVM guest machine. I noticed when I created it, I only had the options of NAT for my network interface, so I used that (obvious). Well, after starting the VM, I find I don't have connectivity with that interface. Reading, I find examples where I need to create bridges perhaps. Xen did most of this for me, so it's a little new to me. Can anyone throw me a clue, please? steve campbell Setting up a bridge is not that hard, and it will give your VMs direct access to the outside world, and host - VM access just fine as well. Here is a link showing how to setup a bridge connected to a bond device. Ignore the bond and pretend it is a straight ethX device: https://alteeve.ca/w/AN!Cluster_Tutorial_2#Configuring_our_Bridge.2C_Bonds_and_Interfaces The host has a device named virbr0 that is installed during system installation. It also has a network device vnet0. There are no files in /etc/sysconfig/network-scripts for these. Shouldn't I be able to use the virbr0 virtual bridge for this? I've tried setting up the VM's device with all of the options that is listed, but to no avail. Should I need to set up another bridge for this? And thanks for the link. steve virbr0 is created and managed by libvirtd. If you open Virtual Machine Manager, connect to localhost and then double-click on 'localhost', you will see a tab for creating/managing bridges (NAT'ed, generally). I disable 'virbr0' as NAT'ing is generally not what I want. The 'vnetX' devices are dynamically created to link a VM's interface to a bridge. Think of them as virtual network cables. They get created and destroyed as needed. Sorry, but I'm confused: My host server has a real NIC and IP address with a real gateway to the outside: virtbr0 IP: 192.168.122.1 Host IP: 10.0.5.16 Gateway IP: 10.0.5.1 on eth0 and this works My VM server has all fake stuff currently: Host IP: 10.0.5.17 Gateway IP: 10.0.5.1 on eth0 and this is like NIC without a cable. So I need to create a bridge device on both the host and VM (lets say I name it br1). I change the eth0 config file on both host and VM to point to br1 and give the br1 config file on both host and VM the correct IP. But won't this just let the two talk to each other. How will the VM server get outside? steve The bridge is created only on the host. Think of the bridge as being like a virtual switch. When a VM is created, you tell it to connect to the bridge, similar to how you would plug a physical wire into a real switch. That provides the link to the network, and then you configure the virtual server's network just as if it was a real network. On the host, you don't set the IP on the ethX device, instead you tell ethX to connect to the bridge (look at 'bond2' in the link above for the 'BRIDGE=...' line). Then you move the host's IP address/config to the bridge itself (look at the 'vbr2' in the link above). If you're still stuck, tell me the IP addresses you want to set in the host and VM and I'll see if I can bang out a couple sample 'ifcfg-X' files. -- Digimer Papers and Projects: https://alteeve.ca/w/ What if the cure for cancer is trapped in the mind of a person without access to education? ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Are xen and centos incompatible?
Konrad Rzeszutek Wilk konrad.w...@oracle.com writes: On Tue, Jun 10, 2014 at 04:44:23AM +0200, lee wrote: Konrad Rzeszutek Wilk konrad.w...@oracle.com writes: The device should be visible in the dom0 - even when it is for passthrough. Why should it be visible when it's hidden? The 'hide' part is to hide it from the device drivers in the initial domain - dom0. That is so that they will not try to use it - as we plan to pass them to a guest. We need it in the dom0 to do admin type work - FLR it, etc. With Debian, it's not visible in dom0 when the passthrough works. That's how I found out that it does work to begin with, and it makes sense to me. What does FLR mean? And how do you do something with a device for which no drivers are loaded? I'd find it rather unusual to have a device without drivers and even be able to use it; such devices usually don't show up. But irrespective of that - the steps mentioned there are out of date. The correct option should be 'xen-pciback.hide=(06:00.0) xen-pciback.permissive=1' That's one of the problems: Xen is very poorly documented. Any help in improving the documentations would be appreciated. Every month we run 'Documentation days' and any work - either on Wiki, manuals, docs, etc would be quite appreciated. If I have some time, I might make a writeup about how to set up what I did. But it seems I'm using an outdated version of xen, which is what comes with Debian, so by the time I'd finish the writeup, it would be outdated and contribute to confusion more than do any good. And considering xen, I don't really know anything. I figured out that passthrough doesn't work out of the box on Debian because the module for the device was loaded from the initrd.img before the xen-pciback module and made a bug report because you're supposed to be able to use files in /etc/modprobe.d which can specify dependencies and when you do that, you can't have that just overridden or there's no point in doing that --- and there doesn't seem to be any other way to specify the order in which modules are loaded, and long ago, Debian came up with a policy that things should work out of the box whenever possible (which they might have forgotten by now ...). So maybe they'll fix this problem. Anyway, it probably goes for other distributions as well, and a hint in the xen docs probably won't hurt. Please see http://wiki.xenproject.org/wiki/Xen_Project_Document_Days I tried to make a request to become a wiki editor. There might be some places in the docs I might be able to make clearer. I don't know if that was successful, though. It seemed to want to redirect me to some google website ... -- Knowledge is volatile and fluid. Software is power. ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Finally switching from Xen to KVM - question about networking
Steve Campbell campb...@cnpapers.com writes: On 6/10/2014 10:46 AM, Digimer wrote: On 10/06/14 10:03 AM, Steve Campbell wrote: I had so much trouble putting Centos 6 guest VMs on a Centos 5 host that I finally switched to a Centos 6 host. I've not needed more that test VMs, so I've used Virtual Machine Manager on the old system, which worked pretty well, so I decided to create my first KVM guest machine. I noticed when I created it, I only had the options of NAT for my network interface, so I used that (obvious). Well, after starting the VM, I find I don't have connectivity with that interface. Reading, I find examples where I need to create bridges perhaps. Xen did most of this for me, so it's a little new to me. [...] The host has a device named virbr0 that is installed during system installation. It also has a network device vnet0. There are no files in /etc/sysconfig/network-scripts for these. Shouldn't I be able to use the virbr0 virtual bridge for this? I've tried setting up the VM's device with all of the options that is listed, but to no avail. Should I need to set up another bridge for this? This bridge is like a stick you poke through a wall into another room (domU -- dom0). At the same time, it *is* a bridge, i. e. it works like a hub in that it *does* connect *all* network(s) with each other via the devices that are added to the bridge. That is regardless of what IP addresses these devices have or what networks they belong to. To make it more confusing, the bridge itself is a network device. Suppose you have the physical eth0 on the machine, with 192.168.1.1. Add eth0 to the bridge and you don't have network access anymore (which is really confusing). Now do not give eth0 an IP address but give the bridge 192.168.1.1 and, with eth0 attached to it, you suddenly have network access again (which is also confusing). Both the VM and the host are reachable from the outside that way. The other end of the bridge shows up as a network interface (eth0) in the VM. You can give it an IP address like 192.168.100.1, and that address is reachable (from the outside of the VM) via the bridge in the host. You may have to add a route in the host for it, though, and for the VM, the host is the gateway. For your purposes, you can probably ignore the virtual interfaces. The duplication with bridges and interfaces still doesn't make sense to me ... What's the difference between a dangling bridge and a virtual interface? -- Knowledge is volatile and fluid. Software is power. ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Finally switching from Xen to KVM - question about networking
On 6/10/2014 12:43 PM, Digimer wrote: On 10/06/14 12:38 PM, Steve Campbell wrote: On 6/10/2014 12:05 PM, Digimer wrote: On 10/06/14 11:46 AM, Steve Campbell wrote: On 6/10/2014 10:46 AM, Digimer wrote: On 10/06/14 10:03 AM, Steve Campbell wrote: I had so much trouble putting Centos 6 guest VMs on a Centos 5 host that I finally switched to a Centos 6 host. I've not needed more that test VMs, so I've used Virtual Machine Manager on the old system, which worked pretty well, so I decided to create my first KVM guest machine. I noticed when I created it, I only had the options of NAT for my network interface, so I used that (obvious). Well, after starting the VM, I find I don't have connectivity with that interface. Reading, I find examples where I need to create bridges perhaps. Xen did most of this for me, so it's a little new to me. Can anyone throw me a clue, please? steve campbell Setting up a bridge is not that hard, and it will give your VMs direct access to the outside world, and host - VM access just fine as well. Here is a link showing how to setup a bridge connected to a bond device. Ignore the bond and pretend it is a straight ethX device: https://alteeve.ca/w/AN!Cluster_Tutorial_2#Configuring_our_Bridge.2C_Bonds_and_Interfaces The host has a device named virbr0 that is installed during system installation. It also has a network device vnet0. There are no files in /etc/sysconfig/network-scripts for these. Shouldn't I be able to use the virbr0 virtual bridge for this? I've tried setting up the VM's device with all of the options that is listed, but to no avail. Should I need to set up another bridge for this? And thanks for the link. steve virbr0 is created and managed by libvirtd. If you open Virtual Machine Manager, connect to localhost and then double-click on 'localhost', you will see a tab for creating/managing bridges (NAT'ed, generally). I disable 'virbr0' as NAT'ing is generally not what I want. The 'vnetX' devices are dynamically created to link a VM's interface to a bridge. Think of them as virtual network cables. They get created and destroyed as needed. Sorry, but I'm confused: My host server has a real NIC and IP address with a real gateway to the outside: virtbr0 IP: 192.168.122.1 Host IP: 10.0.5.16 Gateway IP: 10.0.5.1 on eth0 and this works My VM server has all fake stuff currently: Host IP: 10.0.5.17 Gateway IP: 10.0.5.1 on eth0 and this is like NIC without a cable. So I need to create a bridge device on both the host and VM (lets say I name it br1). I change the eth0 config file on both host and VM to point to br1 and give the br1 config file on both host and VM the correct IP. But won't this just let the two talk to each other. How will the VM server get outside? steve The bridge is created only on the host. Think of the bridge as being like a virtual switch. When a VM is created, you tell it to connect to the bridge, similar to how you would plug a physical wire into a real switch. That provides the link to the network, and then you configure the virtual server's network just as if it was a real network. On the host, you don't set the IP on the ethX device, instead you tell ethX to connect to the bridge (look at 'bond2' in the link above for the 'BRIDGE=...' line). Then you move the host's IP address/config to the bridge itself (look at the 'vbr2' in the link above). If you're still stuck, tell me the IP addresses you want to set in the host and VM and I'll see if I can bang out a couple sample 'ifcfg-X' files. I'm running into some problems with my config files where I get a message that says the network can't determine my interface names. I'll look further, but the IPs above are what I need. 10.0.5.1 is a firewall that NATs the 10.0.5.0/24 network to another outside public firewall. Thanks steve ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Finally switching from Xen to KVM - question about networking
Steve, Try the following config. On your host: /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 BOOTPROTO=none ONBOOT=yes NM_CONTROLLED=no TYPE=Ethernet HWADDR=xx:xx:xx:xx:xx:xx- put your physical NIC's MAC address here BRIDGE=br0 USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no /etc/sysconfig/network-scripts/ifcfg-br0: DEVICE=br0 BOOTPROTO=static ONBOOT=yes NM_CONTROLLED=no TYPE=Bridge IPADDR=10.0.5.16 NETMASK=255.255.255.0 - you may need to adjust this to your network GATEWAY=10.0.5.1 DNS1=8.8.8.8 DNS2=8.8.4.4 PEERDNS=yes DELAY=0 STP=off USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no Restart networking on the host. Then inside you VM: /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 BOOTPROTO=static ONBOOT=yes NM_CONTROLLED=no TYPE=Ethernet HWADDR=xx:xx:xx:xx:xx:xx- it must be a unique MAC address for your VM IPADDR=10.0.5.17 NETMASK=255.255.255.0 - you may need to adjust this to your network GATEWAY=10.0.5.1 DNS1=8.8.8.8 DNS2=8.8.4.4 PEERDNS=yes USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no Then in Virtual Machine Manager make sure that your VM's NIC is connected to the br0 bridge, like this: Network Source: Specify shared device name Bridge Name: br0 On 6/10/2014 8:16 PM, Steve Campbell wrote: On 6/10/2014 12:43 PM, Digimer wrote: On 10/06/14 12:38 PM, Steve Campbell wrote: On 6/10/2014 12:05 PM, Digimer wrote: On 10/06/14 11:46 AM, Steve Campbell wrote: On 6/10/2014 10:46 AM, Digimer wrote: On 10/06/14 10:03 AM, Steve Campbell wrote: I had so much trouble putting Centos 6 guest VMs on a Centos 5 host that I finally switched to a Centos 6 host. I've not needed more that test VMs, so I've used Virtual Machine Manager on the old system, which worked pretty well, so I decided to create my first KVM guest machine. I noticed when I created it, I only had the options of NAT for my network interface, so I used that (obvious). Well, after starting the VM, I find I don't have connectivity with that interface. Reading, I find examples where I need to create bridges perhaps. Xen did most of this for me, so it's a little new to me. Can anyone throw me a clue, please? steve campbell Setting up a bridge is not that hard, and it will give your VMs direct access to the outside world, and host - VM access just fine as well. Here is a link showing how to setup a bridge connected to a bond device. Ignore the bond and pretend it is a straight ethX device: https://alteeve.ca/w/AN!Cluster_Tutorial_2#Configuring_our_Bridge.2C_Bonds_and_Interfaces The host has a device named virbr0 that is installed during system installation. It also has a network device vnet0. There are no files in /etc/sysconfig/network-scripts for these. Shouldn't I be able to use the virbr0 virtual bridge for this? I've tried setting up the VM's device with all of the options that is listed, but to no avail. Should I need to set up another bridge for this? And thanks for the link. steve virbr0 is created and managed by libvirtd. If you open Virtual Machine Manager, connect to localhost and then double-click on 'localhost', you will see a tab for creating/managing bridges (NAT'ed, generally). I disable 'virbr0' as NAT'ing is generally not what I want. The 'vnetX' devices are dynamically created to link a VM's interface to a bridge. Think of them as virtual network cables. They get created and destroyed as needed. Sorry, but I'm confused: My host server has a real NIC and IP address with a real gateway to the outside: virtbr0 IP: 192.168.122.1 Host IP: 10.0.5.16 Gateway IP: 10.0.5.1 on eth0 and this works My VM server has all fake stuff currently: Host IP: 10.0.5.17 Gateway IP: 10.0.5.1 on eth0 and this is like NIC without a cable. So I need to create a bridge device on both the host and VM (lets say I name it br1). I change the eth0 config file on both host and VM to point to br1 and give the br1 config file on both host and VM the correct IP. But won't this just let the two talk to each other. How will the VM server get outside? steve The bridge is created only on the host. Think of the bridge as being like a virtual switch. When a VM is created, you tell it to connect to the bridge, similar to how you would plug a physical wire into a real switch. That provides the link to the network, and then you configure the virtual server's network just as if it was a real network. On the host, you don't set the IP on the ethX device, instead you tell ethX to connect to the bridge (look at 'bond2' in the link above for the 'BRIDGE=...' line). Then you move the host's IP address/config to the bridge itself (look at the 'vbr2' in the link above). If you're still stuck, tell me the IP addresses you want to set in the host and VM and I'll see if I can bang out a couple sample 'ifcfg-X' files. I'm running into some problems with my config files where I get a message that says the network can't determine my interface names. I'll
Re: [CentOS-virt] Finally switching from Xen to KVM - question about networking
On 6/10/2014 3:09 PM, Zoltan Frombach wrote: Steve, Try the following config. On your host: /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 BOOTPROTO=none ONBOOT=yes NM_CONTROLLED=no TYPE=Ethernet HWADDR=xx:xx:xx:xx:xx:xx- put your physical NIC's MAC address here BRIDGE=br0 USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no /etc/sysconfig/network-scripts/ifcfg-br0: DEVICE=br0 BOOTPROTO=static ONBOOT=yes NM_CONTROLLED=no TYPE=Bridge IPADDR=10.0.5.16 NETMASK=255.255.255.0 - you may need to adjust this to your network GATEWAY=10.0.5.1 DNS1=8.8.8.8 DNS2=8.8.4.4 PEERDNS=yes DELAY=0 STP=off USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no Restart networking on the host. Then inside you VM: /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 BOOTPROTO=static ONBOOT=yes NM_CONTROLLED=no TYPE=Ethernet HWADDR=xx:xx:xx:xx:xx:xx- it must be a unique MAC address for your VM IPADDR=10.0.5.17 NETMASK=255.255.255.0 - you may need to adjust this to your network GATEWAY=10.0.5.1 DNS1=8.8.8.8 DNS2=8.8.4.4 PEERDNS=yes USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no Then in Virtual Machine Manager make sure that your VM's NIC is connected to the br0 bridge, like this: Network Source: Specify shared device name Bridge Name: br0 On 6/10/2014 8:16 PM, Steve Campbell wrote: On 6/10/2014 12:43 PM, Digimer wrote: On 10/06/14 12:38 PM, Steve Campbell wrote: On 6/10/2014 12:05 PM, Digimer wrote: On 10/06/14 11:46 AM, Steve Campbell wrote: On 6/10/2014 10:46 AM, Digimer wrote: On 10/06/14 10:03 AM, Steve Campbell wrote: I had so much trouble putting Centos 6 guest VMs on a Centos 5 host that I finally switched to a Centos 6 host. I've not needed more that test VMs, so I've used Virtual Machine Manager on the old system, which worked pretty well, so I decided to create my first KVM guest machine. I noticed when I created it, I only had the options of NAT for my network interface, so I used that (obvious). Well, after starting the VM, I find I don't have connectivity with that interface. Reading, I find examples where I need to create bridges perhaps. Xen did most of this for me, so it's a little new to me. Can anyone throw me a clue, please? steve campbell Setting up a bridge is not that hard, and it will give your VMs direct access to the outside world, and host - VM access just fine as well. Here is a link showing how to setup a bridge connected to a bond device. Ignore the bond and pretend it is a straight ethX device: https://alteeve.ca/w/AN!Cluster_Tutorial_2#Configuring_our_Bridge.2C_Bonds_and_Interfaces The host has a device named virbr0 that is installed during system installation. It also has a network device vnet0. There are no files in /etc/sysconfig/network-scripts for these. Shouldn't I be able to use the virbr0 virtual bridge for this? I've tried setting up the VM's device with all of the options that is listed, but to no avail. Should I need to set up another bridge for this? And thanks for the link. steve virbr0 is created and managed by libvirtd. If you open Virtual Machine Manager, connect to localhost and then double-click on 'localhost', you will see a tab for creating/managing bridges (NAT'ed, generally). I disable 'virbr0' as NAT'ing is generally not what I want. The 'vnetX' devices are dynamically created to link a VM's interface to a bridge. Think of them as virtual network cables. They get created and destroyed as needed. Sorry, but I'm confused: My host server has a real NIC and IP address with a real gateway to the outside: virtbr0 IP: 192.168.122.1 Host IP: 10.0.5.16 Gateway IP: 10.0.5.1 on eth0 and this works My VM server has all fake stuff currently: Host IP: 10.0.5.17 Gateway IP: 10.0.5.1 on eth0 and this is like NIC without a cable. So I need to create a bridge device on both the host and VM (lets say I name it br1). I change the eth0 config file on both host and VM to point to br1 and give the br1 config file on both host and VM the correct IP. But won't this just let the two talk to each other. How will the VM server get outside? steve The bridge is created only on the host. Think of the bridge as being like a virtual switch. When a VM is created, you tell it to connect to the bridge, similar to how you would plug a physical wire into a real switch. That provides the link to the network, and then you configure the virtual server's network just as if it was a real network. On the host, you don't set the IP on the ethX device, instead you tell ethX to connect to the bridge (look at 'bond2' in the link above for the 'BRIDGE=...' line). Then you move the host's IP address/config to the bridge itself (look at the 'vbr2' in the link above). If you're still stuck, tell me the IP addresses you want to set in the host and VM and I'll see if I can bang out a couple sample 'ifcfg-X' files. I'm running into
Re: [CentOS-virt] Finally switching from Xen to KVM - question about networking
On 6/10/2014 9:27 PM, Steve Campbell wrote: On 6/10/2014 3:09 PM, Zoltan Frombach wrote: Steve, Try the following config. On your host: /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 BOOTPROTO=none ONBOOT=yes NM_CONTROLLED=no TYPE=Ethernet HWADDR=xx:xx:xx:xx:xx:xx- put your physical NIC's MAC address here BRIDGE=br0 USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no /etc/sysconfig/network-scripts/ifcfg-br0: DEVICE=br0 BOOTPROTO=static ONBOOT=yes NM_CONTROLLED=no TYPE=Bridge IPADDR=10.0.5.16 NETMASK=255.255.255.0 - you may need to adjust this to your network GATEWAY=10.0.5.1 DNS1=8.8.8.8 DNS2=8.8.4.4 PEERDNS=yes DELAY=0 STP=off USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no Restart networking on the host. Then inside you VM: /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 BOOTPROTO=static ONBOOT=yes NM_CONTROLLED=no TYPE=Ethernet HWADDR=xx:xx:xx:xx:xx:xx- it must be a unique MAC address for your VM IPADDR=10.0.5.17 NETMASK=255.255.255.0 - you may need to adjust this to your network GATEWAY=10.0.5.1 DNS1=8.8.8.8 DNS2=8.8.4.4 PEERDNS=yes USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no Then in Virtual Machine Manager make sure that your VM's NIC is connected to the br0 bridge, like this: Network Source: Specify shared device name Bridge Name: br0 On 6/10/2014 8:16 PM, Steve Campbell wrote: On 6/10/2014 12:43 PM, Digimer wrote: On 10/06/14 12:38 PM, Steve Campbell wrote: On 6/10/2014 12:05 PM, Digimer wrote: On 10/06/14 11:46 AM, Steve Campbell wrote: On 6/10/2014 10:46 AM, Digimer wrote: On 10/06/14 10:03 AM, Steve Campbell wrote: I had so much trouble putting Centos 6 guest VMs on a Centos 5 host that I finally switched to a Centos 6 host. I've not needed more that test VMs, so I've used Virtual Machine Manager on the old system, which worked pretty well, so I decided to create my first KVM guest machine. I noticed when I created it, I only had the options of NAT for my network interface, so I used that (obvious). Well, after starting the VM, I find I don't have connectivity with that interface. Reading, I find examples where I need to create bridges perhaps. Xen did most of this for me, so it's a little new to me. Can anyone throw me a clue, please? steve campbell Setting up a bridge is not that hard, and it will give your VMs direct access to the outside world, and host - VM access just fine as well. Here is a link showing how to setup a bridge connected to a bond device. Ignore the bond and pretend it is a straight ethX device: https://alteeve.ca/w/AN!Cluster_Tutorial_2#Configuring_our_Bridge.2C_Bonds_and_Interfaces The host has a device named virbr0 that is installed during system installation. It also has a network device vnet0. There are no files in /etc/sysconfig/network-scripts for these. Shouldn't I be able to use the virbr0 virtual bridge for this? I've tried setting up the VM's device with all of the options that is listed, but to no avail. Should I need to set up another bridge for this? And thanks for the link. steve virbr0 is created and managed by libvirtd. If you open Virtual Machine Manager, connect to localhost and then double-click on 'localhost', you will see a tab for creating/managing bridges (NAT'ed, generally). I disable 'virbr0' as NAT'ing is generally not what I want. The 'vnetX' devices are dynamically created to link a VM's interface to a bridge. Think of them as virtual network cables. They get created and destroyed as needed. Sorry, but I'm confused: My host server has a real NIC and IP address with a real gateway to the outside: virtbr0 IP: 192.168.122.1 Host IP: 10.0.5.16 Gateway IP: 10.0.5.1 on eth0 and this works My VM server has all fake stuff currently: Host IP: 10.0.5.17 Gateway IP: 10.0.5.1 on eth0 and this is like NIC without a cable. So I need to create a bridge device on both the host and VM (lets say I name it br1). I change the eth0 config file on both host and VM to point to br1 and give the br1 config file on both host and VM the correct IP. But won't this just let the two talk to each other. How will the VM server get outside? steve The bridge is created only on the host. Think of the bridge as being like a virtual switch. When a VM is created, you tell it to connect to the bridge, similar to how you would plug a physical wire into a real switch. That provides the link to the network, and then you configure the virtual server's network just as if it was a real network. On the host, you don't set the IP on the ethX device, instead you tell ethX to connect to the bridge (look at 'bond2' in the link above for the 'BRIDGE=...' line). Then you move the host's IP address/config to the bridge itself (look at the 'vbr2' in the link above). If you're still stuck, tell me the IP addresses you want to set in the host and VM and I'll see if I can bang out a couple sample
Re: [CentOS-virt] Finally switching from Xen to KVM - question about networking
On 6/10/2014 3:38 PM, Zoltan Frombach wrote: On 6/10/2014 9:27 PM, Steve Campbell wrote: On 6/10/2014 3:09 PM, Zoltan Frombach wrote: Steve, Try the following config. On your host: /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 BOOTPROTO=none ONBOOT=yes NM_CONTROLLED=no TYPE=Ethernet HWADDR=xx:xx:xx:xx:xx:xx- put your physical NIC's MAC address here BRIDGE=br0 USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no /etc/sysconfig/network-scripts/ifcfg-br0: DEVICE=br0 BOOTPROTO=static ONBOOT=yes NM_CONTROLLED=no TYPE=Bridge IPADDR=10.0.5.16 NETMASK=255.255.255.0 - you may need to adjust this to your network GATEWAY=10.0.5.1 DNS1=8.8.8.8 DNS2=8.8.4.4 PEERDNS=yes DELAY=0 STP=off USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no Restart networking on the host. Then inside you VM: /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 BOOTPROTO=static ONBOOT=yes NM_CONTROLLED=no TYPE=Ethernet HWADDR=xx:xx:xx:xx:xx:xx- it must be a unique MAC address for your VM IPADDR=10.0.5.17 NETMASK=255.255.255.0 - you may need to adjust this to your network GATEWAY=10.0.5.1 DNS1=8.8.8.8 DNS2=8.8.4.4 PEERDNS=yes USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no Then in Virtual Machine Manager make sure that your VM's NIC is connected to the br0 bridge, like this: Network Source: Specify shared device name Bridge Name: br0 On 6/10/2014 8:16 PM, Steve Campbell wrote: On 6/10/2014 12:43 PM, Digimer wrote: On 10/06/14 12:38 PM, Steve Campbell wrote: On 6/10/2014 12:05 PM, Digimer wrote: On 10/06/14 11:46 AM, Steve Campbell wrote: On 6/10/2014 10:46 AM, Digimer wrote: On 10/06/14 10:03 AM, Steve Campbell wrote: I had so much trouble putting Centos 6 guest VMs on a Centos 5 host that I finally switched to a Centos 6 host. I've not needed more that test VMs, so I've used Virtual Machine Manager on the old system, which worked pretty well, so I decided to create my first KVM guest machine. I noticed when I created it, I only had the options of NAT for my network interface, so I used that (obvious). Well, after starting the VM, I find I don't have connectivity with that interface. Reading, I find examples where I need to create bridges perhaps. Xen did most of this for me, so it's a little new to me. Can anyone throw me a clue, please? steve campbell Setting up a bridge is not that hard, and it will give your VMs direct access to the outside world, and host - VM access just fine as well. Here is a link showing how to setup a bridge connected to a bond device. Ignore the bond and pretend it is a straight ethX device: https://alteeve.ca/w/AN!Cluster_Tutorial_2#Configuring_our_Bridge.2C_Bonds_and_Interfaces The host has a device named virbr0 that is installed during system installation. It also has a network device vnet0. There are no files in /etc/sysconfig/network-scripts for these. Shouldn't I be able to use the virbr0 virtual bridge for this? I've tried setting up the VM's device with all of the options that is listed, but to no avail. Should I need to set up another bridge for this? And thanks for the link. steve virbr0 is created and managed by libvirtd. If you open Virtual Machine Manager, connect to localhost and then double-click on 'localhost', you will see a tab for creating/managing bridges (NAT'ed, generally). I disable 'virbr0' as NAT'ing is generally not what I want. The 'vnetX' devices are dynamically created to link a VM's interface to a bridge. Think of them as virtual network cables. They get created and destroyed as needed. Sorry, but I'm confused: My host server has a real NIC and IP address with a real gateway to the outside: virtbr0 IP: 192.168.122.1 Host IP: 10.0.5.16 Gateway IP: 10.0.5.1 on eth0 and this works My VM server has all fake stuff currently: Host IP: 10.0.5.17 Gateway IP: 10.0.5.1 on eth0 and this is like NIC without a cable. So I need to create a bridge device on both the host and VM (lets say I name it br1). I change the eth0 config file on both host and VM to point to br1 and give the br1 config file on both host and VM the correct IP. But won't this just let the two talk to each other. How will the VM server get outside? steve The bridge is created only on the host. Think of the bridge as being like a virtual switch. When a VM is created, you tell it to connect to the bridge, similar to how you would plug a physical wire into a real switch. That provides the link to the network, and then you configure the virtual server's network just as if it was a real network. On the host, you don't set the IP on the ethX device, instead you tell ethX to connect to the bridge (look at 'bond2' in the link above for the 'BRIDGE=...' line). Then you move the host's IP address/config to the bridge itself (look at the 'vbr2' in the link above). If you're still stuck, tell me the IP addresses you want to set
Re: [CentOS-virt] Finally switching from Xen to KVM - question about networking
On 6/10/2014 9:51 PM, Steve Campbell wrote: On 6/10/2014 3:38 PM, Zoltan Frombach wrote: On 6/10/2014 9:27 PM, Steve Campbell wrote: On 6/10/2014 3:09 PM, Zoltan Frombach wrote: Steve, Try the following config. On your host: /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 BOOTPROTO=none ONBOOT=yes NM_CONTROLLED=no TYPE=Ethernet HWADDR=xx:xx:xx:xx:xx:xx- put your physical NIC's MAC address here BRIDGE=br0 USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no /etc/sysconfig/network-scripts/ifcfg-br0: DEVICE=br0 BOOTPROTO=static ONBOOT=yes NM_CONTROLLED=no TYPE=Bridge IPADDR=10.0.5.16 NETMASK=255.255.255.0 - you may need to adjust this to your network GATEWAY=10.0.5.1 DNS1=8.8.8.8 DNS2=8.8.4.4 PEERDNS=yes DELAY=0 STP=off USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no Restart networking on the host. Then inside you VM: /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 BOOTPROTO=static ONBOOT=yes NM_CONTROLLED=no TYPE=Ethernet HWADDR=xx:xx:xx:xx:xx:xx- it must be a unique MAC address for your VM IPADDR=10.0.5.17 NETMASK=255.255.255.0 - you may need to adjust this to your network GATEWAY=10.0.5.1 DNS1=8.8.8.8 DNS2=8.8.4.4 PEERDNS=yes USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no Then in Virtual Machine Manager make sure that your VM's NIC is connected to the br0 bridge, like this: Network Source: Specify shared device name Bridge Name: br0 On 6/10/2014 8:16 PM, Steve Campbell wrote: On 6/10/2014 12:43 PM, Digimer wrote: On 10/06/14 12:38 PM, Steve Campbell wrote: On 6/10/2014 12:05 PM, Digimer wrote: On 10/06/14 11:46 AM, Steve Campbell wrote: On 6/10/2014 10:46 AM, Digimer wrote: On 10/06/14 10:03 AM, Steve Campbell wrote: I had so much trouble putting Centos 6 guest VMs on a Centos 5 host that I finally switched to a Centos 6 host. I've not needed more that test VMs, so I've used Virtual Machine Manager on the old system, which worked pretty well, so I decided to create my first KVM guest machine. I noticed when I created it, I only had the options of NAT for my network interface, so I used that (obvious). Well, after starting the VM, I find I don't have connectivity with that interface. Reading, I find examples where I need to create bridges perhaps. Xen did most of this for me, so it's a little new to me. Can anyone throw me a clue, please? steve campbell Setting up a bridge is not that hard, and it will give your VMs direct access to the outside world, and host - VM access just fine as well. Here is a link showing how to setup a bridge connected to a bond device. Ignore the bond and pretend it is a straight ethX device: https://alteeve.ca/w/AN!Cluster_Tutorial_2#Configuring_our_Bridge.2C_Bonds_and_Interfaces The host has a device named virbr0 that is installed during system installation. It also has a network device vnet0. There are no files in /etc/sysconfig/network-scripts for these. Shouldn't I be able to use the virbr0 virtual bridge for this? I've tried setting up the VM's device with all of the options that is listed, but to no avail. Should I need to set up another bridge for this? And thanks for the link. steve virbr0 is created and managed by libvirtd. If you open Virtual Machine Manager, connect to localhost and then double-click on 'localhost', you will see a tab for creating/managing bridges (NAT'ed, generally). I disable 'virbr0' as NAT'ing is generally not what I want. The 'vnetX' devices are dynamically created to link a VM's interface to a bridge. Think of them as virtual network cables. They get created and destroyed as needed. Sorry, but I'm confused: My host server has a real NIC and IP address with a real gateway to the outside: virtbr0 IP: 192.168.122.1 Host IP: 10.0.5.16 Gateway IP: 10.0.5.1 on eth0 and this works My VM server has all fake stuff currently: Host IP: 10.0.5.17 Gateway IP: 10.0.5.1 on eth0 and this is like NIC without a cable. So I need to create a bridge device on both the host and VM (lets say I name it br1). I change the eth0 config file on both host and VM to point to br1 and give the br1 config file on both host and VM the correct IP. But won't this just let the two talk to each other. How will the VM server get outside? steve The bridge is created only on the host. Think of the bridge as being like a virtual switch. When a VM is created, you tell it to connect to the bridge, similar to how you would plug a physical wire into a real switch. That provides the link to the network, and then you configure the virtual server's network just as if it was a real network. On the host, you don't set the IP on the ethX device, instead you tell ethX to connect to the bridge (look at 'bond2' in the link above for the 'BRIDGE=...' line). Then you move the host's IP address/config to the bridge itself (look at the 'vbr2' in the link above). If you're still stuck, tell me
Re: [CentOS-virt] Finally switching from Xen to KVM - question about networking
On 6/10/2014 4:00 PM, Zoltan Frombach wrote: On 6/10/2014 9:51 PM, Steve Campbell wrote: On 6/10/2014 3:38 PM, Zoltan Frombach wrote: On 6/10/2014 9:27 PM, Steve Campbell wrote: On 6/10/2014 3:09 PM, Zoltan Frombach wrote: Steve, Try the following config. On your host: /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 BOOTPROTO=none ONBOOT=yes NM_CONTROLLED=no TYPE=Ethernet HWADDR=xx:xx:xx:xx:xx:xx- put your physical NIC's MAC address here BRIDGE=br0 USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no /etc/sysconfig/network-scripts/ifcfg-br0: DEVICE=br0 BOOTPROTO=static ONBOOT=yes NM_CONTROLLED=no TYPE=Bridge IPADDR=10.0.5.16 NETMASK=255.255.255.0 - you may need to adjust this to your network GATEWAY=10.0.5.1 DNS1=8.8.8.8 DNS2=8.8.4.4 PEERDNS=yes DELAY=0 STP=off USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no Restart networking on the host. Then inside you VM: /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 BOOTPROTO=static ONBOOT=yes NM_CONTROLLED=no TYPE=Ethernet HWADDR=xx:xx:xx:xx:xx:xx- it must be a unique MAC address for your VM IPADDR=10.0.5.17 NETMASK=255.255.255.0 - you may need to adjust this to your network GATEWAY=10.0.5.1 DNS1=8.8.8.8 DNS2=8.8.4.4 PEERDNS=yes USERCTL=no IPV6INIT=no IPV6_AUTOCONF=no Then in Virtual Machine Manager make sure that your VM's NIC is connected to the br0 bridge, like this: Network Source: Specify shared device name Bridge Name: br0 On 6/10/2014 8:16 PM, Steve Campbell wrote: On 6/10/2014 12:43 PM, Digimer wrote: On 10/06/14 12:38 PM, Steve Campbell wrote: On 6/10/2014 12:05 PM, Digimer wrote: On 10/06/14 11:46 AM, Steve Campbell wrote: On 6/10/2014 10:46 AM, Digimer wrote: On 10/06/14 10:03 AM, Steve Campbell wrote: I had so much trouble putting Centos 6 guest VMs on a Centos 5 host that I finally switched to a Centos 6 host. I've not needed more that test VMs, so I've used Virtual Machine Manager on the old system, which worked pretty well, so I decided to create my first KVM guest machine. I noticed when I created it, I only had the options of NAT for my network interface, so I used that (obvious). Well, after starting the VM, I find I don't have connectivity with that interface. Reading, I find examples where I need to create bridges perhaps. Xen did most of this for me, so it's a little new to me. Can anyone throw me a clue, please? steve campbell Setting up a bridge is not that hard, and it will give your VMs direct access to the outside world, and host - VM access just fine as well. Here is a link showing how to setup a bridge connected to a bond device. Ignore the bond and pretend it is a straight ethX device: https://alteeve.ca/w/AN!Cluster_Tutorial_2#Configuring_our_Bridge.2C_Bonds_and_Interfaces The host has a device named virbr0 that is installed during system installation. It also has a network device vnet0. There are no files in /etc/sysconfig/network-scripts for these. Shouldn't I be able to use the virbr0 virtual bridge for this? I've tried setting up the VM's device with all of the options that is listed, but to no avail. Should I need to set up another bridge for this? And thanks for the link. steve virbr0 is created and managed by libvirtd. If you open Virtual Machine Manager, connect to localhost and then double-click on 'localhost', you will see a tab for creating/managing bridges (NAT'ed, generally). I disable 'virbr0' as NAT'ing is generally not what I want. The 'vnetX' devices are dynamically created to link a VM's interface to a bridge. Think of them as virtual network cables. They get created and destroyed as needed. Sorry, but I'm confused: My host server has a real NIC and IP address with a real gateway to the outside: virtbr0 IP: 192.168.122.1 Host IP: 10.0.5.16 Gateway IP: 10.0.5.1 on eth0 and this works My VM server has all fake stuff currently: Host IP: 10.0.5.17 Gateway IP: 10.0.5.1 on eth0 and this is like NIC without a cable. So I need to create a bridge device on both the host and VM (lets say I name it br1). I change the eth0 config file on both host and VM to point to br1 and give the br1 config file on both host and VM the correct IP. But won't this just let the two talk to each other. How will the VM server get outside? steve The bridge is created only on the host. Think of the bridge as being like a virtual switch. When a VM is created, you tell it to connect to the bridge, similar to how you would plug a physical wire into a real switch. That provides the link to the network, and then you configure the virtual server's network just as if it was a real network. On the host, you don't set the IP on the ethX device, instead you tell ethX to connect to the bridge (look at 'bond2' in the link above for the 'BRIDGE=...' line). Then you move the host's IP address/config to the
Re: [CentOS-virt] Finally switching from Xen to KVM - question about networking
On Tue, Jun 10, 2014 at 10:03 AM, Steve Campbell campb...@cnpapers.com wrote: I had so much trouble putting Centos 6 guest VMs on a Centos 5 host that I finally switched to a Centos 6 host. I've not needed more that test VMs, so I've used Virtual Machine Manager on the old system, which worked pretty well, so I decided to create my first KVM guest machine. I noticed when I created it, I only had the options of NAT for my network interface, so I used that (obvious). Well, after starting the VM, I find I don't have connectivity with that interface. Reading, I find examples where I need to create bridges perhaps. Xen did most of this for me, so it's a little new to me. Can anyone throw me a clue, please? steve campbell ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt For full-blown pair-bonding, trunked VLAN's, and KVM bridges, you want my old notes at https://wikis.uit.tufts.edu/confluence/display/TUSKpub/Configure+Pair+Bonding,+VLANs,+and+Bridges+for+KVM+Hypervisor. Just dial back on any features you don't need in your environment. And rip all NetworkManager based components kicking and screaming the !@#$ out of any KVM server, it is *NOT* your friend. sudo yum remove *NetworkManager* ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt