LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 03-23-2009, 04:39 AM   #1
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
Question qemu network emulation


Dear all

From past two days i trying to ping my host from running guest on qemu.
Both host and guest is fedora 9. Network emulation on guest os require tap0 interface that is not present on my host. I know that i am not getting the point correctly, where i am doing mistake?
how i can bridge my eth0 with virtual tap0, when tap0 is not present.


Thanks
 
Old 03-23-2009, 04:43 AM   #2
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 41
Did you check using ifconfig -a if it's maybe there but not active.

Also, maybe you'd like to give virt-manager a try. It makes all this VM-related stuff a lot easier.
 
Old 03-23-2009, 05:12 AM   #3
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Original Poster
Rep: Reputation: 66
Angry ifconfig -a

Thanks for reply

Quote:
Originally Posted by reptiler View Post
Did you check using ifconfig -a if it's maybe there but not active.
Yes i already tried 'ifconfig -a' i only list eth0,lo,pan0 and virbr0
 
Old 03-23-2009, 05:27 AM   #4
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 41
pan0 is, if I'm not totally off, Bluetooth-related.
virbr0 is VM-related, as it is established by LibVirt.

As said, try virt-manager, it'll be a lot easier.
I guess you're working in a GUI, right?

Ever since I switched to Fedora I used virt-manager, because I was simply sick of having these damn long command-lines for QEmu all the time.

As an alternative you can have what virt-manager offers you in the shell, using virsh, virt-install and so on.

Edit: Just tried this (as root):
Code:
qemu-kvm -net nic -net tap,script=no -cdrom Slackware-12.1.iso -boot d
And it does create a device tap0.

Last edited by reptiler; 03-23-2009 at 05:29 AM.
 
Old 03-24-2009, 05:37 AM   #5
quantt
Member
 
Registered: Aug 2008
Posts: 62

Rep: Reputation: 15
Hello everyone!
I tried boot my image, but qemu just waiting something. I didn't seen whatever in stdio, why?
Code:
#qemu -m 256 -net nic -net tap,ifname=tap0 -hda netbsd.img -nographic -localtime -no-acpi
I use kernel qemu
Code:
# lsmod | grep kqemu
kqemu                 129444  0
# ls /dev/kqemu
/dev/kqemu
qemu-0.10.0
kqemu-1.4.0pre1
To prepare I made two images via mkdisk.sh.
http://koowaldah.org/people/ash/netbsd/mkdisk.sh

p.s. "And it does create a device tap0."
You needs to create tap0 by your hands via tunctl in linux.

Last edited by quantt; 03-24-2009 at 05:43 AM.
 
Old 03-24-2009, 05:58 AM   #6
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 41
Quote:
Originally Posted by quantt View Post
I tried boot my image, but qemu just waiting something. I didn't seen whatever in stdio, why?
If everything is okay QEmu will not output anything to the shell.
If you want to be able to interact with the VM on the shell I suggest appending -monitor stdio to your list of parameters.

Quote:
Originally Posted by quantt View Post
You needs to create tap0 by your hands via tunctl in linux.
No, I didn't need to do this manually. I used to do it as shown above on LFS and just for this thread tested it on Fedora 10. I did not have to create the tap-device, QEmu did this for me.
Of course you need to be root for that.
 
Old 03-24-2009, 11:20 AM   #7
quantt
Member
 
Registered: Aug 2008
Posts: 62

Rep: Reputation: 15
Quote:
If everything is okay QEmu will not output anything to the shell.
If you want to be able to interact with the VM on the shell I suggest appending -monitor stdio to your list of parameters.
hm. but if I launching that like this, qemu do nothing events somewhere.
qemu -m 256 -hda netbsd.img -nographic -localtime -no-acpi -boot d -monitor stdio
furthermore, it is not eating cpu capacity.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
23455 root 20 0 382m 9.8m 1596 S 0 0.1 0:00.18 qemu
 
Old 03-24-2009, 11:27 AM   #8
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 41
Do you have a GUI available on that machine that you could start QEmu with a window and then see if it actually can boot.
Maybe it tries to boot but cannot for some reason which would only the visible in the VM's window, and thus is not eating up much CPU.
 
Old 03-25-2009, 06:10 AM   #9
quantt
Member
 
Registered: Aug 2008
Posts: 62

Rep: Reputation: 15
What's a window? Did you mean its like kde konsole or something else?
 
Old 03-25-2009, 06:36 AM   #10
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 41
A GUI-window, similar to other windows you may be used to from GUIs, like the Firefox-window, or your filemanager's window.

There QEmu will show the boot-process and the whatever the system is supposed to show, just like when you boot up your PC.

Last edited by reptiler; 03-26-2009 at 12:24 AM.
 
  


Reply

Tags
interface


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Qemu Emulation Fails with All In One Pendrive Linux 2008 Gomer90000 Linux - Newbie 2 08-23-2008 10:32 PM
QEMU Sparc Emulation zeeshanhayat Linux - Software 3 03-05-2008 12:40 PM
LXer: System Emulation with QEMU on Linux LXer Syndicated Linux News 0 09-27-2007 12:40 PM
LXer: System emulation with QEMU LXer Syndicated Linux News 0 09-26-2007 12:40 PM
Qemu Emulation of Win32/MacOSX Support/Tutorial on Linux initialdrifteg6 Linux - Software 12 02-15-2005 01:32 PM


All times are GMT -5. The time now is 03:55 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration