You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Mario Giammarco <mg...@gmail.com> on 2016/01/07 23:51:54 UTC

Getting crazy with KVM network config

Hello,
I am evaluating cloudstack 4.7
I have followed instructions for creating kvm hosts with openvswitch
networking (and vlan 100, 200, 300 as suggested)
Tried creating a basic zone network in different ways.
It seems ok but it cannot reaches secondary storage. 
It is due to the fact that I cannot reach system vm.
>From documentation it is not clear at all that cloudstack needs to create
two system vms to access secondary storage and as a proxy.
So I tried advanced networking in the hope I can tell cloudstack right
vlans/subnets and so on.
When I add first host I see the host do not reply anymore.
So I go to console and I see that cloudstack has modified openvswitch
configuration and it has also modified /etc/network/interfaces putting
management network on wrong vlan and so destroying completely my previous
configuration.
>From documentation I cannot understand if I have to configure networking in
hosts or if is cloudstack that configures it.
Anyway it does not configure it in the right way.
Can you please tell me a working tutorial?
Can you please help me in some way?
Please note that in the kvm hosts I have one network card with vlans.

Thanks in advance,
Mario


Re: Getting crazy with KVM network config

Posted by ilya <il...@gmail.com>.
On 1/8/16 2:32 PM, Mario Giammarco wrote:
> ilya <il...@...> writes:
> 
>> In order for CloudStack to talk to System VM, it uses the KVM host as
>> proxy, because the SystemVM is on link-local (unroutable) network.
>> Specifically, CloudStack will connect to KVM on 3922 and execute a
>> command called cloudstack-ssh
>>
>> example: cloudstack-ssh 169.254.0.139
>>
> Thank you for these info.
> Infact I tried to start with basic networking the configuration seemed all
> ok, the system vm take a management and guest ip but then... nothing.

Would you please explain what you mean as "nothing". What state is your
system VM in?



> Now I discover that cloudstack uses also link-local network.
> 
> So I have management (included storage), public, guest and link-local
> 
> If these networks must be supported on kvm host I need to have 4
> vlans/bridges. How should I call them?
> 

Assuming you have a server with only 2 NICs you can run your vlan
trunking over these 2 links, here is one way how this might work.

As mentioned by Dag, there is no need to create VLAN trunks on the host,
cloudstack will manage that on your behalf.

eth0 and eth1 - must be bonded as bond0
bond0 must be mapped to bridge mybridge0
create virtual interface for mybridge0 as mybridge0:1 and assign the ip
address for host management via ssh (or anything else)
in cloudstack, under physical network
set Public, Management and Guest traffic labels as "mybridge0"

If you trunking is done properly, you should be good to go...


One thing to note, once the system vm start, run "top" command to check
on host utilization, if CPU is around 100% for qemu process for extended
period of time, you may have a kernel/qemu issue. If you run latest
redhat 6 or 7 based kernel, you should be ok.

Lastly, if you follow cloudstack guide, the trunks that are referenced
in the docs, would need to exist on the switch, otherwise - it
might/will not work, hence basic zone - is easiest model to go.


Regards,
ilya



> Am I right?
> 
> Thanks again,
> Mario
> 

Re: Getting crazy with KVM network config

Posted by Mario Giammarco <mg...@gmail.com>.
ilya <il...@...> writes:

> In order for CloudStack to talk to System VM, it uses the KVM host as
> proxy, because the SystemVM is on link-local (unroutable) network.
> Specifically, CloudStack will connect to KVM on 3922 and execute a
> command called cloudstack-ssh
> 
> example: cloudstack-ssh 169.254.0.139
> 
Thank you for these info.
Infact I tried to start with basic networking the configuration seemed all
ok, the system vm take a management and guest ip but then... nothing.
Now I discover that cloudstack uses also link-local network.

So I have management (included storage), public, guest and link-local

If these networks must be supported on kvm host I need to have 4
vlans/bridges. How should I call them?

Am I right?

Thanks again,
Mario


Re: Getting crazy with KVM network config

Posted by ilya <il...@gmail.com>.
Mario

Dont see anything crazy with what you are doing so far.

I would suggest that you initially keep it simple and setup cloudstack
with basic zone.

The communication workflow you've been asking is as follows:

CloudStack Management Server talks to KVM host on port 3922
CloudStack KVM Agent talks back to Cloudstack MS on 8250

In order for CloudStack to talk to System VM, it uses the KVM host as
proxy, because the SystemVM is on link-local (unroutable) network.
Specifically, CloudStack will connect to KVM on 3922 and execute a
command called cloudstack-ssh

example: cloudstack-ssh 169.254.0.139

You can look up the KVM hypervisor and link-local IP by going to system
vm tab in UI.

If you SystemVM is started but you dont see any communication, it would
be worth doing virsh console, use root/password as access and
troubleshoot from there. Logs are posted in /var/log/cloud.out

We assume you have minimal linux skillset..

As mentioned earlier, keep it simple and deploy cloudstack with Basic
Zone so you can learn, once you get the hang of it, experiment to your
hearts desire.

Regards
ilya


On 1/7/16 2:51 PM, Mario Giammarco wrote:
> Hello,
> I am evaluating cloudstack 4.7
> I have followed instructions for creating kvm hosts with openvswitch
> networking (and vlan 100, 200, 300 as suggested)
> Tried creating a basic zone network in different ways.
> It seems ok but it cannot reaches secondary storage. 
> It is due to the fact that I cannot reach system vm.
> From documentation it is not clear at all that cloudstack needs to create
> two system vms to access secondary storage and as a proxy.
> So I tried advanced networking in the hope I can tell cloudstack right
> vlans/subnets and so on.
> When I add first host I see the host do not reply anymore.
> So I go to console and I see that cloudstack has modified openvswitch
> configuration and it has also modified /etc/network/interfaces putting
> management network on wrong vlan and so destroying completely my previous
> configuration.
> From documentation I cannot understand if I have to configure networking in
> hosts or if is cloudstack that configures it.
> Anyway it does not configure it in the right way.
> Can you please tell me a working tutorial?
> Can you please help me in some way?
> Please note that in the kvm hosts I have one network card with vlans.
> 
> Thanks in advance,
> Mario
> 

Re: Getting crazy with KVM network config

Posted by Mario Giammarco <mg...@gmail.com>.
Dag Sonstebo <Da...@...> writes:

> 
> 
> Hi Mario,
> first of all you may be better off just configuring untagged bridges on
top of your NIC and let CloudStack take care of VLAN tagging 

But with one network card I need to probably to tag at least management
network else manager cannot communicate with hosts.
>  switches to allow your guest VMs / System VMs to communicate on the right
VLANs. The most important part is to make sure your CloudStack zone
networking has the correct KVM traffic label for each type of network, i.e.
these have to be configured with “cloudbr0”
Argh so the "kvm traffic label" is the bridge name?

I will now restart experiments with these precious infos.
Anyway perhaps I am stupid but I did not find them in the docs.

Re: Getting crazy with KVM network config

Posted by Dag Sonstebo <Da...@shapeblue.com>.
Hi Mario,

first of all you may be better off just configuring untagged bridges on top of your NIC and let CloudStack take care of VLAN tagging - I.e. if you don’t have the suggested VLANs 100/200/300 already configured and in use they don’t make sense.

With regards to networking you configure your bridges with ovs-vsctl etc., then match these settings in your /etc/network/interfaces. When the host is added to CloudStack the management server will take care of configuring additional tagged ports on the OVS switches to allow your guest VMs / System VMs to communicate on the right VLANs. The most important part is to make sure your CloudStack zone networking has the correct KVM traffic label for each type of network, i.e. these have to be configured with “cloudbr0” etc. depending on what you called your bridges.


Regards,

Dag Sonstebo







[ShapeBlue]<http://www.shapeblue.com>
Dag Sonstebo
ShapeBlue

d:       | s: +44 203 603 0540<tel:|%20s:%20+44%20203%20603%200540>

e:      Dag.Sonstebo@shapeblue.com | t: <mailto:Dag.Sonstebo@shapeblue.com%20|%20t:>     |      w:      www.shapeblue.com<http://www.shapeblue.com>

a:      53 Chandos Place, Covent Garden London WC2N 4HS UK


[cid:image8f3efc.png@314c3307.498fe836]


Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is a company registered by The Republic of South Africa and is traded under license from Shape Blue Ltd. ShapeBlue is a registered trademark.
This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error.




On 07/01/2016, 22:51, "Mario Giammarco" <mg...@gmail.com> wrote:

>Hello,
>I am evaluating cloudstack 4.7
>I have followed instructions for creating kvm hosts with openvswitch
>networking (and vlan 100, 200, 300 as suggested)
>Tried creating a basic zone network in different ways.
>It seems ok but it cannot reaches secondary storage.
>It is due to the fact that I cannot reach system vm.
>From documentation it is not clear at all that cloudstack needs to create
>two system vms to access secondary storage and as a proxy.
>So I tried advanced networking in the hope I can tell cloudstack right
>vlans/subnets and so on.
>When I add first host I see the host do not reply anymore.
>So I go to console and I see that cloudstack has modified openvswitch
>configuration and it has also modified /etc/network/interfaces putting
>management network on wrong vlan and so destroying completely my previous
>configuration.
>From documentation I cannot understand if I have to configure networking in
>hosts or if is cloudstack that configures it.
>Anyway it does not configure it in the right way.
>Can you please tell me a working tutorial?
>Can you please help me in some way?
>Please note that in the kvm hosts I have one network card with vlans.
>
>Thanks in advance,
>Mario
>
Find out more about ShapeBlue and our range of CloudStack related services:
IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//> | CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/> | CloudStack Software Engineering<http://shapeblue.com/cloudstack-software-engineering/>
CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/> | CloudStack Bootcamp Training Courses<http://shapeblue.com/cloudstack-training/>