Problem to set static IP
Hi folks,
KVM host - Debian 5.0 VM (guest) - Ubuntu 9.10 Just created a new VM running Ubuntu 9.10 with following command; $ sudo virt-install --connect qemu:///system -n vm30ubuntu910 -r 512 --vcpus=2 -f /home/satimis/VM/vm30ubuntu910.qcow2 -s 12 -c /home/satimis/Desktop/mini_ubuntu9.10.iso --vnc --noautoconsole --os-type linux --accelerate --network=bridge:br0 --hvm Internet can be connected with following dynamic IP $ cat /etc/network/interfaces Code:
auto lo If change it to static IP then it can't connect Internet $ cat /etc/network/interfaces Code:
# The loopback network interface $ sudo ifconfig eth0 Code:
eth0 Link encap: Ethernet HWaddr 54:52:00:07:69:c8 Code:
Kernel IP routing table Remark: Other VMs works seamlessly with above static IP B.R. satimis |
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? 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; Hope it helps Cheers Zhjim |
Quote:
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:
Quote:
Quote:
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:
Code:
192.168.0.0/24 dev br0 proto kernel scope link src 192.168.0.10 Where can I change it to "192.168.0.0/50"? Quote:
Code:
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.49 Quote:
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN Quote:
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN Quote:
$ sudo brctl show Code:
bridge name bridge id STP enabled interfaces Quote:
$ sudo virsh --connect qemu:///system start vmX X is the vm number. Quote:
Quote:
$ dmesg | grep "eth" Code:
[ 2.755926] forcedeth: Reverse Engineered nForce ethernet driver. Version 0.61. B.R. satimis |
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
I found this line on the manpage Code:
attach-interface domain-id type source optional --target target --mac mac --script script Quote:
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. |
Quote:
1) Virsh 2) virt-manager Both work without problem. Quote:
I name the VM with a number starting from vm11, vm12, etc. Each VM is assigned with a static IP corresponding to its number, such as; 192.168.0.11 for vm11 192.168.0.12 for vm12 etc. The last VM created is vm30 with ip address 192.168.0.30 assigned. There is no duplication. Quote:
/etc/network/interfaces Code:
netmask 255.255.255.0 Quote:
Quote:
Quote:
$ 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. B.R. satimis |
Quote:
Quote:
Quote:
I'm out of ideas right now. Let me think about it some more. I'll check back later. |
Hi zhjim,
I found out the cause in running following command on VM (Guest) $ sudo /etc/init.d/networking restart Code:
* Reconfiguring network interfaces... B.R. satimis |
Solved
Hi zhjim,
I got my problem sorted out. VM host already has bridge-utils installed. But VM guest also needs it. After having it installed on VM guest my problem is gone. B.R. satimis |
Quote:
I am sorry that I could not response lately, but works a bitch at the moment. |
Quote:
Still I don't understand why it needs bridge-utils in VM (guest). It was by chance to discover this solution. B.R. satimis |
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. |
All times are GMT -5. The time now is 05:17 PM. |