LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This 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

Reply
 
LinkBack Search this Thread
Old 06-27-2011, 04:38 PM   #1
lupe
LQ Newbie
 
Registered: Dec 2008
Distribution: Slackware
Posts: 27

Rep: Reputation: 1
qemu - guest network howto


Hi,

I've setup up a qemu Linux virtual system and start it with
$ qemu -enable-kvm -m 500 -hda disk.qcow2 -net nic

Problem is that I don't have network access in the virtual system.

In the host (Slackware Linux) I use to have two network configurations depending on where I am:
1. eth0: for localnet and Internet

2. eth0: for intranet <-- don't need it for virtual system
ppp (wvdial for usb 3G) for Internet

How can I have Internet access in situations 1 and 2 in the virtual system and continue to have it also in host system?
 
Old 06-27-2011, 07:40 PM   #2
jefro
Guru
 
Registered: Mar 2008
Posts: 8,526

Rep: Reputation: 938Reputation: 938Reputation: 938Reputation: 938Reputation: 938Reputation: 938Reputation: 938Reputation: 938
I never use the net nic without some advanced options. See this for some advanced info.
http://people.gnome.org/~markmc/qemu-networking.html
http://wiki.qemu.org/Documentation/Networking
http://www.h7.dion.ne.jp/~qemu-win/HowToNetwork-en.html
and many more.

Where you need to state is at the client. If you delete the net nic you get the common NAT configuration for qemu.
Qemu has a virtual router software running. When you boot the client, you set it for dhcp and you should get an ip if you have nic support. (may need to set a new nic card or add in default nic driver)

Then I just add in my dns entry or in most cases it simply works. Your host works by it's choice of gateway or by availability.

Remove the net nic and then see ifconfig in client.
 
1 members found this post helpful.
  


Reply

Tags
network, qemu


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How does QEMU shuts down a Guest OS. alphy Linux - Virtualization and Cloud 25 06-13-2011 07:30 AM
[SOLVED] qemu ping guest os Squall90 Linux - Virtualization and Cloud 1 12-07-2010 08:31 AM
qemu-kvm howto setup virtual network to access Internet garydale Linux - Virtualization and Cloud 5 03-06-2010 12:16 PM
Howto get qemu Windows XP guest to join a Samba domain? garydale Linux - Software 1 12-26-2009 12:43 PM
sound in qemu guest os on debian? zero79 Debian 2 10-16-2005 06:42 PM


All times are GMT -5. The time now is 02:15 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
Open Source Consulting | Domain Registration