Hello CentOS mailinglist I am running CentOS 6.3 with qemu-kvm and libvirt. I was experimenting with bridged VM networking. Usually the VMs run over the network device virbr0. So i created a new bridge with brctl and added my eth0 to that bridge. Not touching virbr0 or it's configuration at all. Then i edited the configuration xml from my VM with 'virsh edit vmname'. After that i decided to restart my server, basically just to 'reset' my network. I know, that's not necessary. But it's easier than risking connection loss and having to get physical access to the server ;)
After the restart my virbr0 network device was gone! cat /var/log/dmesg | grep virbr0 returned nothing. cat /var/log/messages | grep virbr0 brought up nothing aswell.
I tried to reinstall all relevant packages with yum reinstall qemu-kvm python-virtinst virt-top virt-viewer libvirt libvirt-client libvirt-python qemu-kvm-tools
But with no success :(
Does anyone have an idea how to recreate the default virbr0? Is it doable via virsh? I don't have a DE installed on this server, so no virtual-manager. I am willing to go that far if it's worth it though.
Does anyone have an idea how to recreate the default virbr0? Is it doable via virsh? I don't have a DE installed on this server, so no virtual-manager. I am willing to go that far if it's worth it though.
You don't need a DE for that just yum install xauth virt-manager and ssh -X to forward it to your local X server.
Although I do a fair amount from virsh and editing XML if you don't use a cluster manager/tool/IaaS like ovirt, openstack, archipel etc virt-manager is too useful not to have - especially to get console access to VMs nicely.
I'm home now but if you're struggling on the bridge part come Monday send me a mail and I'll send you my server network configs to give you a start on this.
Am 01.02.2013 23:39, schrieb James Hogarth:
Does anyone have an idea how to recreate the default virbr0? Is it doable via virsh? I don't have a DE installed on this server, so no virtual-manager. I am willing to go that far if it's worth it though.
You don't need a DE for that just yum install xauth virt-manager and ssh -X to forward it to your local X server.
Although I do a fair amount from virsh and editing XML if you don't use a cluster manager/tool/IaaS like ovirt, openstack, archipel etc virt-manager is too useful not to have - especially to get console access to VMs nicely.
I'm home now but if you're struggling on the bridge part come Monday send me a mail and I'll send you my server network configs to give you a start on this. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
I guess it's better to communicating this over the list, in case someone runs in the same problem :)
What i did in terms of network changes was the following script. It's an old one i used when i didn't work with virsh, because i followed an old tutorial for kvm-qemu on CentOS 5. It basically creates a new bridge called bg0, creates a tap0 interface, and connects eth0 and tap0 to the bridge. (comments ommited)
22 chown root:kvm /dev/net/tun 23 chmod 0660 /dev/net/tun 24 25 service libvirtd stop 26 service httpd stop 27 service vsftpd stop 28 service named stop 32 brctl addbr br0 35 ifconfig eth0 0.0.0.0 38 brctl addif br0 eth0 41 ifconfig br0 192.168.2.253 netmask 255.255.255.0 up 44 route add -net 192.168.2.0 netmask 255.255.255.0 br0 47 route add default gw 192.168.2.1 br0 50 tunctl -u root -g kvm -t tap0 58 ifconfig tap0 up
so i ran this script and tried to use the tap0 the xml from the vm. it didn't work (yeah i am not that smart in terms of bridges, i know i am not getting it 100 percent ;) ) but i didn't touch virbr0 at all. it even showed up as usual when i did a "brctl show all" and either eth0 or tap0 were connected in any way with it.
after the restart virbr0 was gone.
If you want to have more logs etc just ask away.
Am 01.02.2013 23:56, schrieb skull:
Am 01.02.2013 23:39, schrieb James Hogarth:
Does anyone have an idea how to recreate the default virbr0? Is it doable via virsh? I don't have a DE installed on this server, so no virtual-manager. I am willing to go that far if it's worth it though.
You don't need a DE for that just yum install xauth virt-manager and ssh -X to forward it to your local X server.
Although I do a fair amount from virsh and editing XML if you don't use a cluster manager/tool/IaaS like ovirt, openstack, archipel etc virt-manager is too useful not to have - especially to get console access to VMs nicely.
I'm home now but if you're struggling on the bridge part come Monday send me a mail and I'll send you my server network configs to give you a start on this. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
I guess it's better to communicating this over the list, in case someone runs in the same problem :)
What i did in terms of network changes was the following script. It's an old one i used when i didn't work with virsh, because i followed an old tutorial for kvm-qemu on CentOS 5. It basically creates a new bridge called bg0, creates a tap0 interface, and connects eth0 and tap0 to the bridge. (comments ommited)
22 chown root:kvm /dev/net/tun 23 chmod 0660 /dev/net/tun 24 25 service libvirtd stop 26 service httpd stop 27 service vsftpd stop 28 service named stop 32 brctl addbr br0 35 ifconfig eth0 0.0.0.0 38 brctl addif br0 eth0 41 ifconfig br0 192.168.2.253 netmask 255.255.255.0 up 44 route add -net 192.168.2.0 netmask 255.255.255.0 br0 47 route add default gw 192.168.2.1 br0 50 tunctl -u root -g kvm -t tap0 58 ifconfig tap0 up
so i ran this script and tried to use the tap0 the xml from the vm. it didn't work (yeah i am not that smart in terms of bridges, i know i am not getting it 100 percent ;) ) but i didn't touch virbr0 at all. it even showed up as usual when i did a "brctl show all" and either eth0 or tap0 were connected in any way with it.
after the restart virbr0 was gone.
If you want to have more logs etc just ask away.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
I fixed it. I had to yum remove everything and then yum install everything
apparently yum reinstall doesnt do the same.
What i did in terms of network changes was the following script. It's an old one i used when i didn't work with virsh, because i followed an old tutorial for kvm-qemu on CentOS 5. It basically creates a new bridge called bg0, creates a tap0 interface, and connects eth0 and tap0 to the bridge.
Err no... That's a terrible way to go about this.
It's very not rhel and pretty flakey at best.
You can do everything you need to in /etc/sysconfig/network-scripts/ifcfg-*
Specifically you need ifcfg-br0 (or something similar) with type=Bridge (the capital B is important) this is where you should configure the network fit you physical host too.
Then in your ifcfg-eth0 you link that to the bridge.
For VMs you can then see this in virt-manager when building hosts and libvirt will automatically create appropriate vnetX virtual interfaces to bind to the bridge.
This is off the top of my head whilst suffering insomnia so double check with the upstream documentation ;-)
If you need bonding or vlans it becomes more complicated ;-)
Am 02.02.2013 02:12, schrieb James Hogarth:
What i did in terms of network changes was the following script. It's an old one i used when i didn't work with virsh, because i followed an old tutorial for kvm-qemu on CentOS 5. It basically creates a new bridge called bg0, creates a tap0 interface, and connects eth0 and tap0 to the bridge.
Err no... That's a terrible way to go about this.
It's very not rhel and pretty flakey at best.
You can do everything you need to in /etc/sysconfig/network-scripts/ifcfg-*
Specifically you need ifcfg-br0 (or something similar) with type=Bridge (the capital B is important) this is where you should configure the network fit you physical host too.
Then in your ifcfg-eth0 you link that to the bridge.
For VMs you can then see this in virt-manager when building hosts and libvirt will automatically create appropriate vnetX virtual interfaces to bind to the bridge.
This is off the top of my head whilst suffering insomnia so double check with the upstream documentation ;-)
If you need bonding or vlans it becomes more complicated ;-) _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
It's very not rhel and pretty flakey at best.
Isn't the rhel way to install NetworkManager anyway? Because then you can forget all your ifcfg scripts anyway because they will be overwritten by NM. At least that was the cause when i had NetworkManager installed... (That was why i removed it if i remember correctly) Does anyone have a good link on that subject?
IBM says that tap interfaces are best practice: http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=%2Fl...
My RHCSA course material doesn't even touch the subject (At least not until now). The Red Had documentation is only focused on using virt-manager and thereby explains not much in that regards.
Isn't the rhel way to install NetworkManager anyway? Because then you can
forget all your ifcfg scripts anyway because they will be overwritten by NM.
At least that was the cause when i had NetworkManager installed... (That
was why i removed it if i remember correctly)
Does anyone have a good link on that subject?
IBM says that tap interfaces are best practice:
http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=%2Fl...
My RHCSA course material doesn't even touch the subject (At least not
until now). The Red Had documentation is only focused on using virt-manager and thereby explains not much in that regards.
Of course RHCSA doesn't touch this subject... That's very basic - RHCE doesn't cover this either in fact (or at least didn't 2 years back and I doubt that has changed).
Don't look at IBM's stuff when you are using RHEL - always check docs.redhat.com - admittedly from the point you are at you may not know the actual question you need to ask anyway...
NetworkManager doesn't support bridging (in rhel anyway) so you need to remove nm and use the regular network service configuring ifcfg appropriately to make all this work.
Here's the relevant documentation you should be using for creating the bridge in the first place:
https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/ht...
With that working it will then show as an interface to select when you create a vm.
Am 02.02.2013 16:58, schrieb James Hogarth:
Isn't the rhel way to install NetworkManager anyway? Because then you can
forget all your ifcfg scripts anyway because they will be overwritten by NM.
At least that was the cause when i had NetworkManager installed... (That
was why i removed it if i remember correctly)
Does anyone have a good link on that subject?
IBM says that tap interfaces are best practice:
http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=%2Fl...
My RHCSA course material doesn't even touch the subject (At least not
until now). The Red Had documentation is only focused on using virt-manager and thereby explains not much in that regards. Of course RHCSA doesn't touch this subject... That's very basic - RHCE doesn't cover this either in fact (or at least didn't 2 years back and I doubt that has changed).
Don't look at IBM's stuff when you are using RHEL - always check docs.redhat.com - admittedly from the point you are at you may not know the actual question you need to ask anyway...
NetworkManager doesn't support bridging (in rhel anyway) so you need to remove nm and use the regular network service configuring ifcfg appropriately to make all this work.
Here's the relevant documentation you should be using for creating the bridge in the first place:
https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/ht...
With that working it will then show as an interface to select when you create a vm. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Thank you very much! The link you sent me was exactly what i needed. I just didn't think about searching for bridging outside of the vm documentation. Silly me!
Thanks for the advice!
On Sat, Feb 2, 2013 at 2:12 AM, James Hogarth james.hogarth@gmail.com wrote:
If you need bonding or vlans it becomes more complicated ;-)
LOL. We have been testing this (bonding *and* vlans).
Once you understand how it works it makes sense, but you need to understand it first and most people researching this are probably used to the fantastic vmware tooling that keeps it all hidden.
LOL. We have been testing this (bonding *and* vlans).
Once you understand how it works it makes sense, but you need to understand it first and most people researching this are probably used to the fantastic vmware tooling that keeps it all hidden.
One of the environments I built a year or so back needed this - 8 interfaces in LACP bonds per system with around 10-12 VLANs (( forget specifically) on top of this and then bridged through to VMs ...
As you say - take it one layer at a time and it's simple enough... but demoing the setup to people initially left them a little lost following the various config files.
Am 01.02.2013 23:39, schrieb James Hogarth:
You don't need a DE for that just yum install xauth virt-manager and ssh -X to forward it to your local X server.
By the way I would be very interested in that bit, because I never managed to actually get X forwarding to work from a server running at init 3.
Am 02.02.2013 14:58, schrieb skull:
Am 01.02.2013 23:39, schrieb James Hogarth:
You don't need a DE for that just yum install xauth virt-manager and ssh -X to forward it to your local X server.
By the way I would be very interested in that bit, because I never managed to actually get X forwarding to work from a server running at init 3.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
nevermind. i needed AddressFamily inet in my sshd_config on the client.