Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Doesn't have eth0 interface in VM, It can not connect to the Internet directly

  1. #1
    Join Date
    Apr 2011
    Beans
    23

    Doesn't have eth0 interface in VM, It can not connect to the Internet directly

    I had installed Cloud(Ubuntu 11.04 Natty) on 2 machines ( CC,SC,Walrus,Cloud on 1 machine, and Nc on 1 machine). They connect direct to router. Each machine just have one Nic. I installed images from store and test successfully. But when I installed Ubuntu 9.10 Karmic image :

    $ sudo kvm -m 512 -drive file=ubuntu9-10.img,if=scsi,index=0,boot=on -boot=c -net nic,model=e1000 -net tap -nographic -vnc :0

    Its command talks VM using interface with model e1000 (default of Eucalyptus). And -net tap : connect direct to internet using the host's bridge.

    Then, I can log into VM by using Vnc Viewer, but from VM, it can not connect to the internet. I type in VM :
    $ ifconfig
    It appear just one interface : lo

    Please help me to solve that problem. I don't konw why It doesn't have eth0 interface.

  2. #2
    Join Date
    Dec 2010
    Location
    Earth Planet
    Beans
    162
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Doesn't have eth0 interface in VM, It can not connect to the Internet directly

    did u tried:
    Code:
    ifconfig eth0 up
    command?

  3. #3
    Join Date
    Apr 2011
    Beans
    23

    Re: Doesn't have eth0 interface in VM, It can not connect to the Internet directly

    One more thing, That is in the /etc/network/interfaces => It have tow interfaces. 'lo' interface and 'eht0' interface. The configuration of eth0
    auto eth0
    iface eth0 inet dhcp

    Then command "ifconfig", just appear "lo" interface with ip. When I command : "ifup eth0", It doesn't work.
    Any experts there, please help me correct that problem.
    Sorry about my english...

  4. #4
    Join Date
    Apr 2011
    Beans
    23

    Re: Doesn't have eth0 interface in VM, It can not connect to the Internet directly

    thank WthIteh replying,
    when i "ifconfig eth0 up". It appear error :
    ubuntu@ubuntu: ~$ ifconfig eth0 up
    eth0: ERROR while getting interface flags: No such device

    Could you give me exactly problem and how to fix that please ?

  5. #5
    Join Date
    Dec 2010
    Location
    Earth Planet
    Beans
    162
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Doesn't have eth0 interface in VM, It can not connect to the Internet directly

    The VM needs a way to know about (virtual) NIC. In this case, kvm and qemu work in the same way. See http://www.linux-kvm.org/page/Networking for details on preparing VM NIC.

  6. #6
    Join Date
    Apr 2011
    Beans
    23

    Re: Doesn't have eth0 interface in VM, It can not connect to the Internet directly

    Hi WthIteh
    I had configured br0 for host OS before install VM. Should we have another solution to fix that?
    I think you said that is correct problem. When I create image I always use "kvm" command instead of "qemu", but i think in my system, It maybe runs Qemu. Is it important?
    Let explain more for me, I spend long time to solve that !

  7. #7
    Join Date
    Dec 2010
    Location
    Earth Planet
    Beans
    162
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Doesn't have eth0 interface in VM, It can not connect to the Internet directly

    Quote Originally Posted by lemon1707 View Post
    Hi WthIteh
    I had configured br0 for host OS before install VM. Should we have another solution to fix that?
    I think you said that is correct problem. When I create image I always use "kvm" command instead of "qemu", but i think in my system, It maybe runs Qemu. Is it important?
    Let explain more for me, I spend long time to solve that !
    The qemu and kvm are not (probably) the source of problem.
    So where you installed the ifup script? You could also add
    "-net tap,script=/path/to/qemu-ifup" option to be sure.

  8. #8
    Join Date
    Apr 2011
    Beans
    23

    Re: Doesn't have eth0 interface in VM, It can not connect to the Internet directly

    hi WthIteh,
    I'm in process install Ubuntu 9.10 Karmic, I had adjust the bridge="br0" in /etc/vmbuilder/libvirt/libvirtxml.tmpl, then I restart host OS and relaunch the VM by commnand :
    $ sudo kvm -m 512 -drive file=ubuntu9-10.img,if=scsi,index=0,boot=on -boot c -net nic,vlan=0,model=e1000, -net tap -nographic -vnc :0

    I log into VM by using VNC viewer and command "ifconfig" -> It appears IP of eth0, connect direct to internet via br0 ( br0 , the bridge of host ).
    Now, I finished installation OS, I will register it with UEC. I hope no error happen.
    Thank you a lot. I hope you could guide me to bundle successful Ubuntu 9.10 Karmic into UEC.

  9. #9
    Join Date
    Apr 2011
    Beans
    23

    Re: Doesn't have eth0 interface in VM, It can not connect to the Internet directly

    Unfortunately, It's still doesn't work.
    When I registerd image onto UEC, It's doesn't work correctly. It's can connect direct to internet when I using the command :
    $ sudo kvm -m 512 -drive file=ubuntu9-10.img,if=scsi,index=0,boot=on -boot c -net nic,vlan=0,model=e1000, -net tap -nographic -vnc :0
    Then I upload it onto UEC, It doesn't connect to internet, the outsite can't connect to instance too.
    It maybe I didn' point the VM's interface to Host bridge's interface.
    Could you give me more infomation, WthIteh ?
    Please help me, I spend over a week to configure.

  10. #10
    Join Date
    Apr 2010
    Beans
    92

    Re: Doesn't have eth0 interface in VM, It can not connect to the Internet directly

    Quote Originally Posted by lemon1707 View Post
    I had installed Cloud(Ubuntu 11.04 Natty) on 2 machines ( CC,SC,Walrus,Cloud on 1 machine, and Nc on 1 machine). They connect direct to router. Each machine just have one Nic. I installed images from store and test successfully. But when I installed Ubuntu 9.10 Karmic image :

    $ sudo kvm -m 512 -drive file=ubuntu9-10.img,if=scsi,index=0,boot=on -boot=c -net nic,model=e1000 -net tap -nographic -vnc :0
    Does this mean you loaded a Karmic image onto an instance you downloaded from the store and successfully started and are now trying to run a VM of the Karmic image on your instance?
    I am confused as to why you are using kvm and/or Qemu.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •