invalid MACAddress

Discussions related to using VirtualBox on Linux hosts.
Post Reply
ciapecki
Posts: 4
Joined: 7. Jul 2009, 11:33
Primary OS: Ubuntu 8.04
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WinXP

invalid MACAddress

Post by ciapecki »

I have a following issue,
I need to set a MACAddress to my MAC address that begins with 1D-00-.......

but I cannot do that because:
MACAddress is not accepted by the pattern

Code: Select all

 '[0-9A-Fa-f][02468ACEace][0-9A-Fa-f]{10}'
as you can see I cannot put D on the second place.

I already tried to change this value in .xml config file (the eror from above about the pattern)
and as well:

Code: Select all

VBoxManage modifyvm xp_obi_40new --macaddress1 1D0012345678 
which results in:

Code: Select all

ERROR: Invalid MAC address format
Details: code NS_ERROR_INVALID_ARG (0x80070057), component NetworkAdapter, interface INetworkAdapter, callee nsISupports
Context: "COMSETTER(MACAddress)(Bstr(macs[n]))" at line 1607 of file VBoxManageModifyVM.cpp
whereas this works fine with A instead of D on second place:

Code: Select all

chris@chris-ub:~/.VirtualBox/Machines$ VBoxManage modifyvm xp_obi_40new --macaddress1 1A0012345678
VirtualBox Command Line Management Interface Version 3.0.0
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

chris@chris-ub:~/.VirtualBox/Machines$ 
Is there a reason for that? or any possible workaround?

thanks,
chris
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: invalid MACAddress

Post by vbox4me2 »

What if you edit the xml manually?
ciapecki
Posts: 4
Joined: 7. Jul 2009, 11:33
Primary OS: Ubuntu 8.04
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WinXP

Re: invalid MACAddress

Post by ciapecki »

vbox4me2 wrote:What if you edit the xml manually?
As already written before i tried that.
When changing in .xml file I get:

MACAddress is not accepted by the pattern '[0-9A-Fa-f][02468ACEace][0-9A-Fa-f]{10}'
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: invalid MACAddress

Post by Sasquatch »

I don't remember where I read it, but I do remember that virtual machines are bound by certain rules for virtual NICs when it comes to MAC addresses. You can't use just any address.
Why do you need that specific MAC address anyway? You can change the MAC address in the OS itself too in the properties of the NIC, if the driver allows it.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
ciapecki
Posts: 4
Joined: 7. Jul 2009, 11:33
Primary OS: Ubuntu 8.04
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WinXP

Re: invalid MACAddress

Post by ciapecki »

Sasquatch wrote:I don't remember where I read it, but I do remember that virtual machines are bound by certain rules for virtual NICs when it comes to MAC addresses. You can't use just any address.
Why do you need that specific MAC address anyway? You can change the MAC address in the OS itself too in the properties of the NIC, if the driver allows it.
I tried changing in guest windows xp (to 1D00....) and I see it changed in ipconfig /all, but then I receive no packages through it. :(
when I change in geust windows xp to 1A00..... then networking works fine (but this does not solve my MAC issue see below)

I really do not understand why the pattern that is checked by VB is:
'[0-9A-Fa-f][02468ACEace][0-9A-Fa-f]{10}'

and why it's not
'[0-9A-Fa-f]{12}' => why some values on second place are forbidden

and one of our corporate applications associates your account based on the MAC address.
(I don't want to provide to our iT department any other MAC address because there's a possibility that the conflict occurs when 2 same MAC addresses will be in our LAN)
Post Reply