XEN – Changing the Physical NIC NAME after Installation


March 22, 2012 by aubreykloppers

While adding multiple Network Interface Cards (NICs) to a XenServer host, I needed to re-arrange them so their logical naming (eth0, eth1, eth2 etc…) matched that of their physical order.

Here’s a quick guide how to do that.

  • Before adding your NICs to your XenServer host, note the MAC addresses of each port.
  • You might also want to put this on a label, and affix it to the bracket itself, so you can determine the MAC of the NIC by looking at the rear of the server.
  • Add your NICs to your XenServer host. Note where you position each card, so you know which MAC goes where.
  • Boot XenServer.
  • From the shell (Hit Alt+F3 after boot has finished), type in:

xe pif-scan host-uuid=[tab-complete your hosts UUID]
This will scan for new NICs, and enumerate them as Physical Interfaces (PIFs).

  • Determine the order and UUIDs of the new PIFs, by running:

xe pif-list
xe host-list
This will return the uuid, device (which is actually device-name) and other info about each PIF. Check whether the device (-name) fits what you had planned. Eg. if it says eth2, and that’s what you wanted, just leave it. If you wanted it to be eth1, continue.

  • Remove the PIF from XenServer, by running:

xe pif-forget uuid=[UUID of PIF you want to remove]

  • Add the PIF again, by running:

xe pif-introduce host-uuid=[UUID of your host] mac=[the MAC you noted earlier, seperate octets with :] device=eth[x]
For example:
xe pif-introduce host-uuid=8c5bcb04-184b-4523-b870-5d3a5804ca67 mac=00:19:5b:5a:2d:a6 device=eth3

After this, your new PIF might show up with unknown device and vendor. While merely cosmetic, a reboot of your XenServer host should fix this. I was able to use D-Link DGE-528T cards, using the above, even though they aren’t officially supported on XenServer. Well… 2 out of 3 cards worked when placed in a single XenServer host. All 3 cards were detected, and named using the above method.


8 thoughts on “XEN – Changing the Physical NIC NAME after Installation

  1. May I just say what a comfort to uncover
    somebody that really knows what they’re talking about on the web. You definitely know how to bring a problem to light and make it important. More people must read this and understand this side of the story. I was surprised you’re not
    more popular because you definitely possess the gift.


  2. Genia says:

    Hi there, I found your web site by way of Google at the same
    time as looking for a related subject, your site got here up, it
    seems good. I have bookmarked it in my google bookmarks.

    Hi there, simply was alert to your weblog through Google, and located
    that it’s really informative. I’m going to watch out for
    brussels. I’ll appreciate in the event you proceed this in future. Lots of folks will be benefited out of your writing. Cheers!


  3. I’m truly enjoying the design and layout of your blog. It’s
    a very easy on the eyes which makes it much more pleasant for me to come here and
    visit more often. Did you hire out a designer to create your theme?
    Outstanding work!


  4. Hi my family member! I want to say that this
    article is amazing, great written and come with approximately all significant infos.
    I would like to peer more posts like this .


  5. What’s up, its pleasant paragraph on the topic of media print, we all be aware of media is a impressive source of facts.


  6. I believe this is one of the such a lot important info for me.
    And i am glad studying your article. However wanna observation
    on few basic things, The site taste is perfect, the articles is really nice : D.

    Good process, cheers


  7. This is the third time I’ve been to your website. Thanks for providing more details.


  8. Misael Owens says:

    Hey very nice site!! Guy .. Excellent .. Wonderful .. I’ll bookmark
    your blog and take the feeds also…I am happy to seek out
    a lot of helpful info here within the post, we’d like
    work out more strategies on this regard, thank you for
    sharing. . . . . .


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: