LinuxQuestions.org
Visit Jeremy's Blog.
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 01-09-2014, 12:24 PM   #1
insectiod
Member
 
Registered: Feb 2013
Posts: 34

Rep: Reputation: Disabled
Cannot set mac address with qemu


According to the qemu documentation, I should be able to set the mac address for at network card by adding macaddr=MACADDR to the device option.

So I do this:
Code:
>>>qemu-system-i386 -netdev tap,ifname=tap0,id=mynet0,script=no -device i82559c,netdev=mynet0,macaddr=00:00:00:11:11:11 -m 1024 slack.vmdk
qemu-system-i386: -device i82559c,netdev=mynet0,macaddr=00:00:00:11:11:11: Property '.macaddr' not found
/etc/qemu-ifdown: could not launch network script
Maybe it's not possible to set mac when you're using tap as network backend? I seem to get the same mac address without specifying. But I would like to know if it's possible to set it.

I'm using qemu 1.7.0
 
Old 01-09-2014, 01:17 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 7
Posts: 3,494

Rep: Reputation: 932Reputation: 932Reputation: 932Reputation: 932Reputation: 932Reputation: 932Reputation: 932Reputation: 932
When I run:
Code:
qemu-system-x86_64 -net nic,model=help
qemu: Supported NIC models: ne2k_pci,i82551,i82557b,i82559er,rtl8139,e1000,pcnet,virtio
I don't see i82559c, maybe you have a different set. I use e1000.
 
Old 01-09-2014, 01:27 PM   #3
insectiod
Member
 
Registered: Feb 2013
Posts: 34

Original Poster
Rep: Reputation: Disabled
Thanks, I tried e1000 and had the same problem.

Edit:
I don't see the device with the command you gave either, but I see it if I run this, and look for Network devices.
Code:
qemu-system-i386 -device \?

Last edited by insectiod; 01-09-2014 at 01:58 PM.
 
Old 01-12-2014, 11:07 PM   #4
insectiod
Member
 
Registered: Feb 2013
Posts: 34

Original Poster
Rep: Reputation: Disabled
It seems the macaddr property changed name to mac so this works
Code:
qemu-system-i386 -netdev tap,ifname=tap0,id=mynet0,script=no -device i82559c,netdev=mynet0,mac=00:00:00:11:11:11 -m 1024 slack.vmdk
 
  


Reply

Tags
networking, qemu, virtualization


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
LXer: Set up qemu-kvm-1.0+noroms as spice enabled qemu server vs qemu-kvm-spice on Ubuntu Precise LXer Syndicated Linux News 0 05-26-2012 08:41 AM
[SOLVED] set eth0 mac address in smc91xx eeprom via C code shockproof Programming 1 05-06-2010 05:45 PM
How can I change/set the MAC address at boot time under SuSE? Basel Linux - Networking 6 10-20-2006 01:23 AM
DHCP seems to set hostname = Mac address, doesn't reverse lookup techsimian Linux - Networking 4 08-15-2006 05:11 PM
Set MAC/HW Address in /etc/rc.d/rc.inet1.conf? TotalDefiance Slackware 6 09-29-2005 08:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 01:36 PM.

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
Open Source Consulting | Domain Registration