View previous topic :: View next topic |
Author |
Message |
Stonic n00b
Joined: 03 Jun 2007 Posts: 47
|
Posted: Sun Mar 06, 2011 10:21 am Post subject: [SOLVED] Qemu-kvm tap NIC error: SIOCSIFFLAGS |
|
|
Hello,
I have a gentoo X86_64 host running qemu-kvm(0.13.0-r2). I am having difficulties getting a TAP interface on a gentoo guest to work.
I created a tap adapter for my guest VM, a network bridge on the host bridging eth1(LAN) and guest-tap adapter. I load up gentoo-amd64 live CD on the guest VM, eth0 is recognized on the guest and the correct network card is seen (using lspci). When I try to assign an IP address to the guest, it throws the SIOCSIFFLAGS: cannot assign requested address error and will not let me bring the nic up.
On the host I did the following:
Code: | brctl addbr br0
ifconfig br0 10.12.27.254/24 up
tunctl -b -u vxhost -t vxtap0
brctl addif br0 vxtap0
brctl addif br0 eth1 |
At this point I haven't done anything with the firewall, however.
eth1 looks like:
Code: | eth1 Link encap:Ethernet HWaddr 4e:a6:a6:c7:70:b9
inet addr:10.12.27.1 Bcast:10.12.27.255 Mask:255.255.255.0 |
I run the VM as vxhost:
Code: | kvm -hda /dev/vx1/gentoo1 -vnc :1 -m 512 -net nic,macaddr=27:01:27:27:27:01 -net tap,ifname=vxtap0,script=no,downscript=no -smp 4 -cpu host -cdrom iso/install-amd64-minimal-20101118.iso -boot d |
once the vm boots, I can see eth0 while running ifconfig -a (or ifconfig eth0 of course) but I can never bring it up with any address.
ex: ifconfig eth0 inet 10.12.27.15 netmask 255.255.255.0
Does anyone have any clue as to why this doesn't work? I have tried using many different NIC types as well with the same result. I also tried running the VM as root in case it needed access to a root node - same thing.
Last edited by Stonic on Mon Mar 07, 2011 6:27 pm; edited 1 time in total |
|
Back to top |
|
|
Stonic n00b
Joined: 03 Jun 2007 Posts: 47
|
Posted: Mon Mar 07, 2011 6:26 pm Post subject: |
|
|
I figured it out. It was the stupid MAC address I assigned to it - I don't really understand what's an acceptable MAC however. I just followed the KVM convention and changed the first 2 hex to 52:54 instead. Sheesh!! |
|
Back to top |
|
|
nileshgr n00b
Joined: 29 Dec 2012 Posts: 7 Location: Pune. IN
|
Posted: Sat Jul 20, 2013 5:22 pm Post subject: |
|
|
Stonic wrote: | I figured it out. It was the stupid MAC address I assigned to it - I don't really understand what's an acceptable MAC however. I just followed the KVM convention and changed the first 2 hex to 52:54 instead. Sheesh!! |
Bumping a rather old topic. Where did you find this information?!?!?! I have been digging on why my VMs won't get network and this solved it. _________________ Nilesh Govindrajan
http://nileshgr.com |
|
Back to top |
|
|
|