Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
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.


  Search this Thread
Old 07-24-2013, 09:52 AM   #1
LQ Newbie
Registered: Jul 2013
Posts: 1

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


I have a virtual machine (myVM.qcow2) and I run it with this command
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

Old 07-24-2013, 10:25 AM   #2
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
nothing to do with qcow2. Just read the manpage for qemu-system, all the switches should be there
Old 07-24-2013, 02:37 PM   #3
Registered: Mar 2008
Posts: 17,000

Rep: Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513
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, 06:03 AM   #4
Sefid par
Registered: Jul 2013
Location: Iran, Shiraz
Distribution: Slackware Live Current - Plusma Desktop
Posts: 118

Rep: Reputation: 25
I want to find a way to do that.
The network options in documentation: 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:
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 06:06 AM.
Old 08-05-2013, 09:28 AM   #5
Registered: Sep 2012
Distribution: RHEL5/6, CentOS5/6
Posts: 216

Rep: Reputation: 38
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.


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 01:43 PM
How to activate sit0 interface? barghota Linux - Networking 2 09-27-2006 02:55 PM
ndiswrapper cannot activate netowrk interface wlan0 wahaha Linux - Wireless Networking 12 08-31-2006 03:30 AM
Failed to activate interface : SIOCSIFADDR: No such device wlan0: hasnain Linux - Wireless Networking 1 04-11-2005 11:13 AM
can't activate network interface taoweijia Linux - General 4 06-03-2004 10:08 PM > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 06:46 PM.

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