Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am testing out the new Xen 6.0 server and am very new to Xen in general. I have installed the basic Xenserver Free, so I'm not putting Xen on top of an existing Debian install for example. Because of something I need to manually set the MAC address of anything that talks to the network (irrelevant as to why, I just need to do it). This machine currently has 0 VMs and can't yet be talked to by the Manager until I fix this

This page says that you should change your /etc/xen/[conf_file] but all I have in /etc/xen is some file called xl.conf and the page itself is labeled as out of date. Googling around hasn't yielded different ways to accomplish this. Unsurprisingly /etc/network/interfaces doesn't exist, so I can't change it there.

Where can I change the Mac address of my ethernet card (the only network connection)? Do I need to change the address of the virtual interface Xen seems to of setup as well?

share|improve this question
    
You can, if the device driver supports it, change the MAC address of your physical ethernet card using something like "ifconfig $interface hw ether $NEW_MAC". This is temporary, and would have to be re-done upon reboot. On my Xen server, I use bridged networking and the bridges have the same MAC as the physical interface. The virtual interfaces, ie vif170.1, have a different MAC than the bridges and the physical device, but the MAC is the same for all vif's. Unsure if you need to change the MAC on "the virtual interfaces Xen" setup, because it's hard to tell to which intefaces you refer. –  Kendall Sep 29 '11 at 21:54
    
@Kendall Because its temporary I was looking for a more permanent solution –  TheLQ Sep 29 '11 at 22:09
add comment

1 Answer

up vote 2 down vote accepted

"XenServer Free" as in Citrix's XenServer? Last I recall, Citrix's XenServer was just dom0 implemented on CentOS. If that is still the case you should be able to change the MAC address of your dom0's interface by editing /etc/sysconfig/network-scripts/ifcfg-ethX and adding/changing the MACADDR setting. Executing a service networking restart should bring up your interface with the new MAC address (providing the drivers for that interface support modifying the MAC address... they probably do).

Refer to the CentOS/RHEL or Xen.org documentation for more information.

share|improve this answer
    
Hmm, forgot about that. Interestingly though there's only a xenbr0 config with a line above it saying do not edit because its autogenerated. There is no eth0. So this won't work –  TheLQ Sep 29 '11 at 23:52
    
What's in /etc/sysconfig/network? Why don't you just create the appropriate ifcfg-ethX file? –  kce Sep 30 '11 at 0:21
    
Now that you mention it, /etc/sysconfig/network is saying that xenbr0 is the "gateway nic". And I guess I can create the config file. Thanks for the help! –  TheLQ Sep 30 '11 at 1:03
    
Xenbr0 is the "shared physical device" which is presented to your domUs. Your actual physical device should be part of the bridge. Check out the example at Xen.org - I'm pretty sure that's what you're looking for. –  kce Sep 30 '11 at 4:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.