Hello all, I am trying to understand the logic of cloudstack for creating VLANs at XenServer 6.2. I have configured XenServer to use with advanced networking. Have followed these steps (basically for public VLAN):
1. Defined new network with name „cloud-public“ (xe network-create name-label=“cloud-public“) 2. Defined new vlan with tag=200 for cloud-public (xe vlan-create network-uuid=$net-uuid pif-uuid=$pif vlan=200) 3. Now I have network and VLAN defined for cloudstack. Then I see at management log following lines while creating new VM: 2014-09-29 17:02:01,088 DEBUG [c.c.h.x.r.CitrixResourceBase] (DirectAgent-381:ctx-7eb015e6) Looking for network named cloud-public 2014-09-29 17:02:01,309 DEBUG [c.c.h.x.r.CitrixResourceBase] (DirectAgent-381:ctx-7eb015e6) Found a network called cloud-public on host=172.17.1.3; Network=45d9613c-8bb9-70ab-519b-6c07af66e204; pif=d888e50f-c214-c93b-2210-b231fc75b060 2014-09-29 17:02:01,311 DEBUG [c.c.h.x.r.CitrixResourceBase] (DirectAgent-381:ctx-7eb015e6) Creating VLAN 200 on host 172.17.1.3 on device eth0 2014-09-29 17:02:01,315 WARN [c.c.h.x.r.CitrixResourceBase] (DirectAgent-381:ctx-7eb015e6) Catch Exception: class com.xensource.xenapi.Types$PifIsVlan due to You tried to create a VLAN on top of another VLAN - use the underlying physical PIF/bond instead You tried to create a VLAN on top of another VLAN - use the underlying physical PIF/bond instead Why CS tries to add new VLAN when it already exsists ?? If I try to remove manually created VLAN CS can not re-create it, and throws an exception: 2014-09-29 16:46:01,311 DEBUG [c.c.h.x.r.CitrixResourceBase] (DirectAgent-218:ctx-7056598d) Looking for network named cloud-public 2014-09-29 16:46:01,317 WARN [c.c.h.x.r.CitrixResourceBase] (DirectAgent-218:ctx-7056598d) Catch Exception: class java.lang.NullPointerException due to java.lang.NullPointerException Then I mentioned that CS has crated new VLAN with name : VLAN-45d9613c-8bb9-70ab-519b-6c07af66e204-200 and obviously tries to map it to wrong PIF. When I re-mapped vlan=200 to this newly created VLAN manually, it stops issuing errors, but obviously I have to tag „cloud-public“ to different ID, because there can’t be 2 different VLANs with same ID on the same PIF. Why does CS creates own VLANs and does not use existing? Why can’t it do from the scratch – I still need to configure „cloud-public“ first and give it a tag in order CS to create new VLAN-$UUUD-tag? How it should work in reality ? Thank you for explaination, Vadim