You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Vadim Kimlaychuk <Va...@Elion.ee> on 2014/09/29 16:54:15 UTC

XenServer : VLAN logic at CS 4.4

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


Re: XenServer : VLAN logic at CS 4.4

Posted by Erdősi Péter <fa...@niif.hu>.
2014.09.30. 13:23 keltezéssel, Vadim Kimlaychuk írta:
> 	Thank you again,
You're welcome :)

I'm actually rebuild our testing environment to "production" for my 
colleagues, and I did the vlan adding in the morning..
So if you have console to switch, you can generate "command list" with 
excel, and after some notepad replace trick, you'll have a command list, 
which can be copy-pasted to console, and do the job for you :)

BTW: The IP allocation will be random too :)

Regards,
  Peter

RE: XenServer : VLAN logic at CS 4.4

Posted by Vadim Kimlaychuk <Va...@Elion.ee>.
Erdősi,

	Thank you for tips. I "got it".  The only physical network was attached to xenbr0, so I re-named it to "all_in_one" and used as a label for managment, public and guest traffics.  
	CS4.4 has generated random VLAN-xx-tag names upon needs and assigns VLAN id-s dynamically. The only thing that I didn't expected - it takes guest VLAN number randomly from the range I specified. But I haven't configured all VLANs on my switch yet. So I will continue with that.  First tests show that configuration for SSVM, Console proxy and VPC is correct now as well.

	Thank you again,

Vadim.

-----Original Message-----
From: Erdősi Péter [mailto:fazy@niif.hu] 
Sent: Tuesday, September 30, 2014 12:43 PM
To: users@cloudstack.apache.org
Subject: Re: XenServer : VLAN logic at CS 4.4

2014.09.30. 9:30 keltezéssel, Vadim Kimlaychuk írta:
> But where do I tell CS what is my public interface?
If you click here:
http://www.shapeblue.com/wp-content/uploads/2013/01/PhysicalNetworkingBlog_advNetWiz.png

You can see the blue, red, green and yellow circles..
If you click on in, you can write in the physical name (it must be same with Xenserver names ofc...)

For example:
I have 2*4 nic on my setup, where 3-3 are bonded, 1-1 userd for
(presetup) iSCSI
The 3 bonded nic (called management, public, guest by xenserver) was written in a blue, yellow and green boxes.
If you using vlan separation for guest traffic, don't forget to add a range on a switch (you can write in your range later)

Regards,
  Peter

Re: XenServer : VLAN logic at CS 4.4

Posted by Erdősi Péter <fa...@niif.hu>.
2014.09.30. 9:30 keltezéssel, Vadim Kimlaychuk írta:
> But where do I tell CS what is my public interface?
If you click here:
http://www.shapeblue.com/wp-content/uploads/2013/01/PhysicalNetworkingBlog_advNetWiz.png

You can see the blue, red, green and yellow circles..
If you click on in, you can write in the physical name (it must be same 
with Xenserver names ofc...)

For example:
I have 2*4 nic on my setup, where 3-3 are bonded, 1-1 userd for 
(presetup) iSCSI
The 3 bonded nic (called management, public, guest by xenserver) was 
written in a blue, yellow and green boxes.
If you using vlan separation for guest traffic, don't forget to add a 
range on a switch (you can write in your range later)

Regards,
  Peter

RE: XenServer : VLAN logic at CS 4.4

Posted by Vadim Kimlaychuk <Va...@Elion.ee>.
Erdősi,



                Thank you for reply. But where do I tell CS what is my public interface? When I configure advanced networking at CS I do set up:

1. Physical network name (I have 1 interface, so put just name "single"). Isolation method = VLAN (default)

2. Management XenServer traffic label: cloud-mgmt, Public XenServer traffic label: cloud-public, Guest label: cloud-guest.



                All three labels must be defined as network names at XenServer. Even more – each network should be assigned with VLAN ID with „xe vlan-create… “ otherwise I get „null pointer exception“.  So, as I understand, XenServer networking must be configured prior to set up CS advanced networking.



Regards,



Vadim.





-----Original Message-----
From: Erdősi Péter [mailto:fazy@niif.hu]
Sent: Tuesday, September 30, 2014 2:14 AM
To: users@cloudstack.apache.org
Subject: Re: XenServer : VLAN logic at CS 4.4



2014.09.29. 16:54 keltezéssel, Vadim Kimlaychuk írta:

>     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):

I think, you fall into the same trap, as me before. "You tried to create a VLAN on top of another VLAN - use the underlying physical PIF/bond instead"



So... You don't need to add any vlan interface on physical.

When you tell the CS, your public physical interface is XYZ, and when setup the network, and type in the vlan id, the CS management server will be create vlan tagget subinterface on XYZ physical... (the name will be like this: VLAN-12f51238-cc75-42c6-b5a0-c0a3cb32bf01-108) which is for vlan 108.



Regards,

  Peter

Re: XenServer : VLAN logic at CS 4.4

Posted by Erdősi Péter <fa...@niif.hu>.
2014.09.29. 16:54 keltezéssel, Vadim Kimlaychuk írta:
>     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):
I think, you fall into the same trap, as me before. "You tried to create 
a VLAN on top of another VLAN - use the underlying physical PIF/bond 
instead"

So... You don't need to add any vlan interface on physical.
When you tell the CS, your public physical interface is XYZ, and when 
setup the network, and type in the vlan id, the CS management server 
will be create vlan tagget subinterface on XYZ physical... (the name 
will be like this: VLAN-12f51238-cc75-42c6-b5a0-c0a3cb32bf01-108) which 
is for vlan 108.

Regards,
  Peter