How to add an additional vif to VM in XenServer

Assume that you know the name-label of the VM.

Create a network for the new interface to be attached to, and returns the network-uuid

$ xe network-create name-label="alice-network"

Find out vm-uuid of the VM

$ xe vm-list name-label=<vm's name-label>

Create eth1 interface for the VM, and gets the uuid of the new interface

$ xe vif-create vm-uuid=<vm-uuid> network-uuid=<network-uuid> device=1 mac=random

Hot-plug the created interface to the VM

$ xe vif-plug uuid=<new_vif_uuid>

Now eth1 is visible from inside the VM.

You still need to configure eth1 from within VM to make it active.

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

The following two tabs change content below.
Dan Nanni is the founder and also a regular contributor of He is a Linux/FOSS enthusiast who loves to get his hands dirty with his Linux box. He likes to procrastinate when he is supposed to be busy and productive. When he is otherwise free, he likes to watch movies and shop for the coolest gadgets.

Leave a comment

Your email address will not be published. Required fields are marked *