LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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
 
Search this Thread
Old 07-24-2013, 10:52 AM   #1
Zaoueche
LQ Newbie
 
Registered: Jul 2013
Posts: 1

Rep: Reputation: Disabled
How can I activate network interface in QCOW2 machine


Hi,

I have a virtual machine (myVM.qcow2) and I run it with this command
Quote:
sudo qemu-system-x86_64 -drive file=myVM.qcow2,cache=off -m 2048
The Network interfaces are not activated, I don't know the parameters I must add to activate virtual machine network interface.
Thanks for your help

Zaoueche
 
Old 07-24-2013, 11:25 AM   #2
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 848

Rep: Reputation: 91
nothing to do with qcow2. Just read the manpage for qemu-system, all the switches should be there
 
Old 07-24-2013, 03:37 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 12,087

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
I don't think that is correct. I think it ought to be -hda=path to file

Might also need to be in the directory where qemu is or you may have to add in bios and other file locations.

Not sure why you are using sudo either.

Not sure you do need to add in a network parameter but you may have to. A few ways to add in one of a few choices of NIC cards to the vm.

I get the feeling that if you use command qemu-system-x86_64 it should show possible options. They all may not be in your build. Qemu is pretty well documented but it sometimes help to look at other sources for info like the qemu for windows pages. Most of the switches should work.



Saying all that doesn't guarantee your virtual machine will be correctly configured to use the normal nat connection qemu uses.

Some people install a gui to make machine settings more easy.
 
Old 08-04-2013, 07:03 AM   #4
Sefid par
Member
 
Registered: Jul 2013
Location: Iran, Tehran
Distribution: Slackware Current
Posts: 58

Rep: Reputation: Disabled
I want to find a way to do that.
The network options in documentation:http://qemu.weilnetz.de/qemu-doc.htm...005finvocation are available,
I have tried one of them and could start an interface in linux.img, but couldn't do it again :/ (I forgot how I could do)
Of course this guest interface also did not connect to any interface in host OS.
After that I tested the scripts here: http://en.wikibooks.org/wiki/QEMU/Networking
The qemu-ifup made a virtual interface. (Of course by some edits in script like "/sbin/ifdown eth0" > "ifconfig eth0 down")
I can not understand what the script qemu-ifup does exactly, and also how to connect my guest interface to host interface. (the last commands couldn't do it for me)

Last edited by Sefid par; 08-04-2013 at 07:06 AM.
 
Old 08-05-2013, 10:28 AM   #5
dt64
Member
 
Registered: Sep 2012
Distribution: RHEL5/6, CentOS5/6
Posts: 141

Rep: Reputation: 18
if you have libvirt at hand look for the virt-manager gui. In there it is really easy to set up a virtual machine. if you run a VM created in there you can see all used parameters in the process tree. Maybe this could help you figuring out what you need.
 
  


Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
just want to activate to network cards in same machine kashif2131971 Linux - Newbie 1 04-04-2008 02:43 PM
How to activate sit0 interface? barghota Linux - Networking 2 09-27-2006 03:55 PM
ndiswrapper cannot activate netowrk interface wlan0 wahaha Linux - Wireless Networking 12 08-31-2006 04:30 AM
Failed to activate interface : SIOCSIFADDR: No such device wlan0: hasnain Linux - Wireless Networking 1 04-11-2005 12:13 PM
can't activate network interface taoweijia Linux - General 4 06-03-2004 11:08 PM


All times are GMT -5. The time now is 04:20 AM.

Main Menu
Advertisement
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