Configure Second Adapter within XCP-ng

I installed XCP-ng as a VM inside VirtualBox to work in a lab environment. I enabled two network adapters in VirtualBox for XCP-ng. I assigned one of the adapters as the management network from within the XCP-ng interface. I’d like to configure an IP address, subnet mask, default gateway, and DNS for the second adapter from within XCP-ng. I know how to do this from XO but want to configure it from the Local Command Shell from within XCP-ng.

I used xe network-list to see the UUIDs. I then used the following command:
xe pif-reconfigure-ip IP=172.16.1.4 netmask=255.255.255.0 mode=static gateway=172.16.1.1 DNS=172.16.1.1 uuid=< uuid>
…I typed in the uuid from the xe network-list command for .

However, I get an error message that says “The uuid you supplied was invalid.”. But I checked and double-checked that I typed in the proper UUID from the xe network-list command. Why is it telling me the UUID is wrong? How do I accomplish setting the IP configuration for the second adapter from within XCP-ng?

Do you need the UUID ( RO) at the top of the list?

When I looked via XO-Lite, I got the same network UUID as show lower in the pif-list command (a17a4662-5584-9061-b204-e9af38b3d36f) but the UUID ( RO) is different.

After that, I’ve never tried to set up networking via CLI, and I should probably learn it (and will probably do so now).

Eth3 is the one I focused on because it is connected but not yet assigned to a network.

[edit] sorry, they are different UUID between XO-Lite and pif-list.

something funny, two different lists in my pif-list command, here’s the one I was looking at.

What command are you using? Was it from within the Local Command Shell inside XCP-ng? I’m not seeing the same type of results. I’m attaching a screenshot of the commands I used and their output.

I did xe pif-list to get the info above. Yes console but through XO-Lite because I’m in another room and it’s easy that way.

As you can see, I’m still getting uuid is invalid. What’s more, the uuid given in XO for the given interface is different for some reason than the one listed with xe pif-list on the host itself - and also is invalid. How do I find the valid uuid to use? Am I doing this wrong? Are there different commands that should be used to configure the second adapter?

Just figured out the issue. When I rebooted, the uuid matched. Thanks for your help Greg_E.

That’s kind of strange, normally UUIDs don’t change. But glad it worked out.

Which UUID did it need, the top ( RO) or the lower network UUID?

The top UUID is the one I used.

That should be the same UUID that is shown in the XO-Lite details box. Hopefully soon we will have the ability to do this all through XO-Lite.

If you are a powershell user, you might check and see which features are currently supported through PS, they are working on it. That also means that eventually someone can program PS commands and get XCP integrated into Windows Admin Center, depending on the level of integration, it could be an alternative to XO.