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.
Remark:
Other VMs works seamlessly with above static IP
If the other VM's work then the problem lies within the new VM (who thought of that ).
I'm a bit puzzled what configs you posted are for what. I assembled that they are all from the Host and not from the guest. Right?
Please provide the following information
- complete ip addr from the host
- complete ip addr from the guest
- complete ip route from host
- complete ip route from guest
- complete ip link from host
- complete ip link from guest
- brctl show
- line how you start the guest
The ip link part is to make sure that the nics are up and in promisce mode.
Ideas why it is not working
You did not join the nic of the guest with the bridge from host.
Different subnet between guest and host. (typo)
Configured nic is not installed inside guest. (kvm has about 6-8 diffrent nic that are passed to the guest) Missing module? dmesg | grep "eth"; lspci; ip link;
If the other VM's work then the problem lies within the new VM (who thought of that ).
Thanks for your advice.
I suppose you meant the command for creating the new VM. I took it from the document written down previously in creating the old VM.
Quote:
I'm a bit puzzled what configs you posted are for what. I assembled that they are all from the Host and not from the guest. Right?
Sorry, no. They are from VM, the guest. I copied them from the running guest and change the IP address.
Quote:
Please provide the following information
- complete ip addr from the host
192.168.0.10
Quote:
- complete ip addr from the guest
192.168.0.30
This is the static ip address I try to use without result. The dynamic ip assigned automatically is 192.168.0.49
They are ip address on the router
Quote:
- complete ip route from host
$ ip route
Code:
192.168.0.0/24 dev br0 proto kernel scope link src 192.168.0.10
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1
default via 192.168.0.1 dev br0
Would it be the problem here "192.168.0.0/24 ?
Where can I change it to "192.168.0.0/50"?
Quote:
- complete ip route from guest
$ ip route
Code:
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.49
default via 192.168.0.1 dev eth0 metric 100
Quote:
- complete ip link from host
$ ip link
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
link/ether 00:0e:a6:f9:a3:5b brd ff:ff:ff:ff:ff:ff
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether 00:0e:a6:f9:a3:5b brd ff:ff:ff:ff:ff:ff
4: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether fa:cc:db:5d:a5:63 brd ff:ff:ff:ff:ff:ff
5: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500
link/ether 00:ff:95:46:91:b5 brd ff:ff:ff:ff:ff:ff
6: vnet1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500
link/ether 00:ff:00:13:7d:6d brd ff:ff:ff:ff:ff:ff
7: vnet2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500
link/ether 00:ff:e9:57:bf:64 brd ff:ff:ff:ff:ff:ff
Quote:
- complete ip link from guest
$ ip link
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 54:52:00:07:69:c8 brd ff:ff:ff:ff:ff:ff
Quote:
- brctl show
On host
$ sudo brctl show
Code:
bridge name bridge id STP enabled interfaces
br0 8000.000ea6f9a35b no eth0
vnet0
vnet1
vnet2
virbr0 8000.000000000000 yes
Quote:
- line how you start the guest
On host
$ sudo virsh --connect qemu:///system start vmX
X is the vm number.
Quote:
The ip link part is to make sure that the nics are up and in promisce mode.
Could you please explain in more detail on "promisece mode". There is only 1 nic on this box.
Quote:
Ideas why it is not working
You did not join the nic of the guest with the bridge from host.
Different subnet between guest and host. (typo)
Configured nic is not installed inside guest. (kvm has about 6-8 diffrent nic that are passed to the guest) Missing module? dmesg | grep "eth"; lspci; ip link;
I suppose you meant the command for creating the new VM. I took it from the document written down previously in creating the old VM.
Nope, actually I wanted to know how you make the connection between host and guest. But as you are using virsh to start the vm I'm lost. I only have experience with qemu-system-x64_86 to start vm's. And with that binary you normaly provide a -net option. The nic which goes with the -net option has to be on the bridge. (further down I'm getting back on this)
Quote:
Originally Posted by satimis
192.168.0.30
This is the static ip address I try to use without result. The dynamic ip assigned automatically is 192.168.0.49
They are ip address on the router
Might be the chance that 192.168.0.30 is allready used on another machine. But don't think this will hold true. But a ping 192.168.0.30 from the host would make this clear (when coming think about it, if you would get an response from 192.168.0.30 you would'nt have come to think that the vm is not running....)
Quote:
Originally Posted by satimis
Would it be the problem here "192.168.0.0/24 ?
The routes look fine to me. Just a normal 254 host subnet in CIDR notation.
Quote:
Originally Posted by satimis
Where can I change it to "192.168.0.0/50"?
You would need to change the netmask of the host. /etc/network/interfaces should do the trick. Just comment out the network and broadcast line cause they would not match with a netmask of 255.255.0.0 (which isn't a /50 subnet no fun on math right now )
Quote:
Originally Posted by satimis
$ ip link
Okay we have a nic in the guest so this works out.
Quote:
Originally Posted by satimis
$ sudo brctl show
Code:
bridge name bridge id STP enabled interfaces
br0 8000.000ea6f9a35b no eth0
vnet0
vnet1
vnet2
virbr0 8000.000000000000 yes
What is the second bridge good for? Maybe this is causing some trouble? Also I doubt this cause it got no interface connected to it. Also it got Spanning Tree Protocol enabled...
Quote:
Originally Posted by satimis
$ sudo virsh --connect qemu:///system start vmX
X is the vm number.
Sadly but true I dunno virsh. Are there any config files for each VM?
I found this line on the manpage
Code:
attach-interface domain-id type source optional --target target --mac mac --script script
Attach a new network interface to the domain.
type can be either network to indicate a physical network device or bridge to indicate a bridge to a device.
source indicates the source device.
target allows you to indicate the target device in the guest.
mac allows you to specify the MAC address of the network interface.
script allows you to specify a path to a script handling a bridge instead of the default one.
Quote:
Originally Posted by satimis
Could you please explain in more detail on "promisece mode". There is only 1 nic on this box.
Promisce mode has the nic to also accept packets for mac address that are not the one of the nic itself. It normaly is used for sniffing network traffic what you on some kind need to have so the VM's can be reached from outside.
If the physical device (eth0) is not in promisce mode it would only put packets with the right mac address (ip link eth0) on to the network stack. But as we are debuing the inside it should not make a huge diffrence. Beside how do you test network connectivity from/to the guest? And as the other VM's are working I doubt that this realy makes a difference.
To straighten things I would take a look how the other VM's are started maybe this gives the final clue. Specially as they are working.
Next ping from host to guest and vice versa to make sure that the box itself is happy. After that see that you can ping something on the network from the guest.
It has been there for long time. What shall I change for a test?
If you don't have to have a bigger subnet I would leave the networkmask as it is right now. If you need a bigger one go with 255.255.0.0 which lets you have 254 * 254 numbers of hosts.
Quote:
Originally Posted by satimis
I have no idea. Would it be vm11.qcow2, vm12.qcow2, etc.? But they are program.
the *.qcow2 files are the diskimages of the vm's. So this might be a point to further check on...
Quote:
Originally Posted by satimis
Most time I run;
$ sudo virsh --connect qemu:///system start vm11/vm12 etc.
They can be ping either way without problem. From the guest I can ping other guests and/or Internet.
Hm...
I'm out of ideas right now. Let me think about it some more. I'll check back later.
I found out the cause in running following command on VM (Guest)
$ sudo /etc/init.d/networking restart
Code:
* Reconfiguring network interfaces...
* if-up.d/mountnfs[eth0]: waiting for interface br0 before doing NFS mounts
SIOCSIFADDR: No such device
br0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
SIOCSIFBRDADDR: No such device
br0: ERROR while getting interface flags: No such device
br0: ERROR while getting interface flags: No such device
Failed to bring up br0.
[ OK ]
I have no idea how to fix the problem. IIRC I met this problem sometimes ago. I had it fixed later unfortunate I have no recollection.
I guess its the way the network in the guest is configured. Check out /etc/network/interfaces.
There should be some line about the bridge. I'd say you could comment it out. Or just leave it as every thing is working.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.