Network creation on the pool using xo-cli
-
Hi,
I've got a bond0 connected to a switch which exposes a LOTs of VLANs in trunk mode, so i need to create the associated networks/vlan in XO to connect my VMs directly to the VLANs.
Unfortunately i'm stuck and i can't find the correct parameters to give to network.create:The pif i'm giving as a parameter is the bond0 listed in the network part of XO, obviously i'm doing it wrong, but what ? :))
xo@xo-ce:~$ xo-cli network.create pool=5ecb81a5-8ea7-d88a-3d8d-76bec7a83a03 name="VLAN20 - Builders" pif=85fcc01b-f13d-a6f9-2ad4-d3ee99ce12ef vlan=json:20 ā JsonRpcError: no such PIF 85fcc01b-f13d-a6f9-2ad4-d3ee99ce12ef at Peer._callee$ (/opt/xo/xo-builds/xen-orchestra-202407081745/node_modules/json-rpc-peer/dist/index.js:139:44) at tryCatch (/opt/xo/xo-builds/xen-orchestra-202407081745/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:45:16) at Generator.<anonymous> (/opt/xo/xo-builds/xen-orchestra-202407081745/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:133:17) at Generator.next (/opt/xo/xo-builds/xen-orchestra-202407081745/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:74:21) at asyncGeneratorStep (/opt/xo/xo-builds/xen-orchestra-202407081745/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:17) at _next (/opt/xo/xo-builds/xen-orchestra-202407081745/node_modules/@babel/runtime/helpers/asyncToGenerator.js:17:9) at /opt/xo/xo-builds/xen-orchestra-202407081745/node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:7 at new Promise (<anonymous>) at Peer.<anonymous> (/opt/xo/xo-builds/xen-orchestra-202407081745/node_modules/@babel/runtime/helpers/asyncToGenerator.js:14:12) at Peer.exec (/opt/xo/xo-builds/xen-orchestra-202407081745/node_modules/json-rpc-peer/dist/index.js:182:20) { code: 1, data: { id: '85fcc01b-f13d-a6f9-2ad4-d3ee99ce12ef', type: 'PIF' } } xo@xo-ce:~$ -
@Pix FYI, I was just doing some testing on this exact function and I was able to add a network to the pool when using the UUID for the host's matching PIF. The UUID you were using is from the pool's network, which won't work here. For example --
Networks
[17:29 xenserver-slnqfzrh ~]# xe network-list uuid ( RO) : a379a6e7-f099-f838-6514-486de4d56e80 name-label ( RW): Pool-wide network associated with eth0 name-description ( RW): bridge ( RO): xenbr0 uuid ( RO) : b14a0bdd-2f77-25f7-3a76-b830ff971624 name-label ( RW): Pool-wide network associated with eth2 name-description ( RW): bridge ( RO): xenbr2 uuid ( RO) : 00b6604f-9098-023b-5880-0ef9f8e1b437 name-label ( RW): Pool-wide network associated with eth1 name-description ( RW): bridge ( RO): xenbr1 uuid ( RO) : e3be0e1a-9872-4b90-c851-35eb30a86920 name-label ( RW): Pool-wide network associated with eth3 name-description ( RW): bridge ( RO): xenbr3 uuid ( RO) : c54ecffe-9467-5d5f-cb73-ec10dedef2b9 name-label ( RW): Host internal management network name-description ( RW): Network on which guests will be assigned a private link-local IP address which can be used to talk XenAPI bridge ( RO): xenapiPIFs
[17:49 xenserver-slnqfzrh ~]# xe pif-list network-uuid=00b6604f-9098-023b-5880-0ef9f8e1b437 uuid ( RO) : ea3edc31-9b23-402c-a65e-2316c88febb5 device ( RO): eth1 currently-attached ( RO): true VLAN ( RO): -1 network-uuid ( RO): 00b6604f-9098-023b-5880-0ef9f8e1b437 uuid ( RO) : 3a1ef416-787f-45b4-ace9-0147c2f3ca07 device ( RO): eth1 currently-attached ( RO): true VLAN ( RO): -1 network-uuid ( RO): 00b6604f-9098-023b-5880-0ef9f8e1b437Adding a VLAN
[18:27 21] xoa:xoa$ xo-cli network.create pool=63b7154a-1a6c-8642-525e-c6abb0acc941 name="VLAN20 - On Eth1" pif=ea3edc31-9b23-402c-a65e-2316c88febb5 vlan=json:20 52d18dc6-8078-a7ce-4bc5-d4337d2fb970HTH, Dan
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better š
Register Login