Ask Your Question
1

Host to VM ping with openstack juno with SR-IOV port having VLAN networking

asked 2014-12-17 03:37:49 -0500

Ranjit gravatar image

updated 2015-01-06 03:20:26 -0500

darragh-oreilly gravatar image

I have configured single box system with openstack JUNO and SRIOV feature by following https://wiki.openstack.org/wiki/SR-IO... . In this setup there are SR-IOV port and assign to two VM (one port each). All things are up and running. These two VM are also able to communicate each other (PING test). But i am not able to access the VM from HOST and vice-versa.

[root@openstackJuno ~]# nova list
+--------------------------------------+----------+--------+------------+-------------+------------------------------+
| ID                                   | Name     | Status | Task State | Power State | Networks                     |
+--------------------------------------+----------+--------+------------+-------------+------------------------------+
| 8949c0c2-06ad-4746-9179-64632a06113a | sriovVm1 | ACTIVE | -          | Running     | sriovTestNetwork=192.168.1.8 |
| 74ddde11-7fee-49c0-9d62-2ee80d8f3752 | sriovVm2 | ACTIVE | -          | Running     | sriovTestNetwork=192.168.1.9 |
+--------------------------------------+----------+--------+------------+-------------+------------------------------+


[root@openstackJuno ~]# neutron net-show 1aed54f9-5ae0-4bc4-a688-dab654c67b4d
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | True                                 |
| id                        | 1aed54f9-5ae0-4bc4-a688-dab654c67b4d |
| name                      | sriovTestNetwork                     |
| provider:network_type     | vlan                                 |
| provider:physical_network | physnet1                             |
| provider:segmentation_id  | 3                                    |
| router:external           | False                                |
| shared                    | False                                |
| status                    | ACTIVE                               |
| subnets                   | d0e8be77-5e5d-4d29-ab02-c507068461e6 |
| tenant_id                 | fd987a8fb1b845fbb04b28e8f680d040     |
+---------------------------+--------------------------------------+

[root@openstackJuno ~]# neutron port-show 8d9831e0-0076-4b28-8358-c24e505e7b71
+-----------------------+----------------------------------------------------------------------------------------------+
| Field                 | Value                                                                                        |
+-----------------------+----------------------------------------------------------------------------------------------+
| admin_state_up        | True                                                                                         |
| allowed_address_pairs |                                                                                              |
| binding:host_id       | openstackJuno                                                                                |
| binding:profile       | {"pci_slot": "0000:04:10.5", "physical_network": "physnet1", "pci_vendor_info": "8086:1515"} |
| binding:vif_details   | {"port_filter": false, "vlan": "3"}                                                          |
| binding:vif_type      | hw_veb                                                                                       |
| binding:vnic_type     | direct                                                                                       |
| device_id             | 74ddde11-7fee-49c0-9d62-2ee80d8f3752                                                         |
| device_owner          | compute:None                                                                                 |
| extra_dhcp_opts       |                                                                                              |
| fixed_ips             | {"subnet_id": "d0e8be77-5e5d-4d29-ab02-c507068461e6", "ip_address": "192.168.1.9"}           |
| id                    | 8d9831e0-0076-4b28-8358-c24e505e7b71                                                         |
| mac_address           | fa:16:3e:79:55:a1                                                                            |
| name                  | sriovPort2                                                                                   |
| network_id            | 1aed54f9-5ae0-4bc4-a688-dab654c67b4d                                                         |
| security_groups       | e236afa5-f322-4add-8c86-bbb25debc826                                                         |
| status                | ACTIVE                                                                                       |
| tenant_id             | fd987a8fb1b845fbb04b28e8f680d040                                                             |
+-----------------------+----------------------------------------------------------------------------------------------+

[root@openstackJuno ~]# neutron port-show d4ec34d5-9493-43a5-8694-60476f22dd7c
+-----------------------+----------------------------------------------------------------------------------------------+
| Field                 | Value                                                                                        |
+-----------------------+----------------------------------------------------------------------------------------------+
| admin_state_up        | True                                                                                         |
| allowed_address_pairs |                                                                                              |
| binding:host_id       | openstackJuno                                                                                |
| binding:profile       | {"pci_slot": "0000:04:10.7", "physical_network": "physnet1", "pci_vendor_info": "8086:1515"} |
| binding:vif_details   | {"port_filter": false, "vlan": "3"}                                                          |
| binding:vif_type      | hw_veb                                                                                       |
| binding:vnic_type     | direct                                                                                       |
| device_id             | 8949c0c2-06ad-4746-9179-64632a06113a                                                         |
| device_owner          | compute:None                                                                                 |
| extra_dhcp_opts       |                                                                                              |
| fixed_ips             | {"subnet_id": "d0e8be77-5e5d-4d29-ab02-c507068461e6", "ip_address": "192.168.1.8"}           |
| id                    | d4ec34d5-9493-43a5-8694-60476f22dd7c                                                         |
| mac_address           | fa:16:3e:08:15:2e                                                                            |
| name                  | sriovPort1                                                                                   |
| network_id            | 1aed54f9-5ae0-4bc4-a688-dab654c67b4d                                                         |
| security_groups       | e236afa5-f322-4add-8c86-bbb25debc826                                                         |
| status                | ACTIVE                                                                                       |
| tenant_id             | fd987a8fb1b845fbb04b28e8f680d040                                                             |
+-----------------------+----------------------------------------------------------------------------------------------+

[root@openstackJuno ~]# ping -c 4 192.168.1.9
PING 192.168.1.9 (192.168.1.9) 56(84) bytes of data.
From 192.168.1.120 icmp_seq=1 Destination Host Unreachable
From 192.168.1.120 icmp_seq=2 Destination Host Unreachable
From 192.168.1.120 icmp_seq=3 Destination Host Unreachable
From 192.168.1.120 icmp_seq=4 Destination Host Unreachable

--- 192.168.1.9 ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 2999ms
pipe 4
[root@openstackJuno ~]


[root@openstackJuno ~]# ip link show enp4s0f1
50: enp4s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
    link/ether a0:36:9f:0b:fb:fa brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 1 MAC fa:16:3e:f9:b1:c5, spoof checking on, link-state auto
    vf 2 MAC fa:16:3e:79:55:a1, vlan 3, spoof checking on, link-state auto
    vf 3 MAC fa:16:3e:08:15:2e, vlan 3, spoof checking on, link-state auto

After seeing the VF's configuration's assinged to VM, it looks like all VF's are forming VLAN having the same ID assigned to network. And due to this packets from HOST are dropped.

Just for checking , i have manaly clear the vlan settings from all VF's ... (more)

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2014-12-18 11:40:53 -0500

darragh-oreilly gravatar image

I don't think that's possible - see https://bugs.launchpad.net/neutron/+b...

Maybe you could create a sub-interface with vlan-id 3 off whatever interface has 192.168.1.120, and use it to access the instances.

edit flag offensive delete link more

Comments

Thanks for sending the link. I will try the method suggested by you. But if i am correct, that will fix only HOST to VM ping issue,

If i want to access VM from other system connected via switch, then do i need to configure vlan in switch also? Please note that i have un-managed switch.

Ranjit gravatar imageRanjit ( 2014-12-19 00:32:09 -0500 )edit
1

answered 2015-01-06 06:03:37 -0500

Ranjit gravatar image

@samta

Yes, i have assigned static IP. Below are some details of conf.

  [root@openstackJuno neutron]# grep -E -v '^$|^#' /etc/neutron/plugins/ml2/ml2_conf.ini 
[ml2]
type_drivers = vlan
tenant_network_types = vlan
mechanism_drivers = openvswitch,sriovnicswitch
[ml2_type_flat]
[ml2_type_vlan]
network_vlan_ranges = physnet1:2:100
[ml2_type_gre]
tunnel_id_ranges = 1:1000
[ml2_type_vxlan]
[securitygroup]
firewall_driver = neutron.agent.firewall.NoopFirewallDriver
enable_security_group = True

[root@openstackJuno neutron]# grep -E -v '^$|^#' /etc/neutron/plugins/ml2/ml2_conf_sriov.ini 
[ml2_sriov]
supported_pci_vendor_devs = 8086:1515
agent_required = True
[sriov_nic]
physical_device_mappings = physnet1:enp4s0f1
[root@openstackJuno neutron]# 

(Required section from nova)
    [root@openstackJuno neutron]# grep -E -v '^$|^#' /etc/nova/nova.conf 
    [DEFAULT]
    pci_passthrough_whitelist = {"address":"*:04:10.*","physical_network":"physnet1"}

vm creation steps

neutron net-create --provider:physical_network=physnet1 --provider:network_type=vlan sriovTestNetwork 

neutron subnet-create sriovTestNetwork 192.168.1.0/24 --name sriovSubnet --allocation-pool start=192.168.1.30,end=192.168.1.40

neutron port-create sriovTestNetwork --binding:vnic-type direct --name sriovPort1

nova boot --flavor m1.small --nic port-id=<port id> --image 8d0def3d-8209-42dc-b53d-c00dee8f8856 vm2
edit flag offensive delete link more

Comments

Hi ranjit Thanks for sharing information. I did the same steps as like you but in my case i never able to get VM working(though it in running state but VM console doesnt come up). 1. Did u try with devstack setup? 2. Before creating sriovTestNetwork have you created br-ex and added eth0.

Samta Rangare gravatar imageSamta Rangare ( 2015-01-07 04:43:33 -0500 )edit

[ 0.052002] Performance Events: Broken PMU hardware detected, using software events only. [ 0.052002] NMI watchdog disabled (cpu0): hardware events not enabled [ 0.052002] Brought up 1 CPUs [ 0.052007] Total of 1 processors activated (5399.99 BogoMIPS). [ 0.053554] devtmpfs: initializ

Samta Rangare gravatar imageSamta Rangare ( 2015-01-07 04:57:53 -0500 )edit

This is error i get in logs of VM

Samta Rangare gravatar imageSamta Rangare ( 2015-01-07 04:58:14 -0500 )edit

VM console doesnt come up : That might some nova-vnc-proxy service issue. (FIX IT FIRST) Did u try with devstack setup : NO (Manual installation) Before creating sriovTestNetwork have you created br-ex and added eth0 : No need

Log by VM: I have some similar logs.

Ranjit gravatar imageRanjit ( 2015-01-07 07:54:56 -0500 )edit

Thanks Ranjit for your help.

Cirros image had issue, using other image (ubuntu/fedora) has solved the issue.

Regarding accessing VM from Host this patch https://bugs.launchpad.net/neutron/+b... is merged and working, i have verified. May be you can try that.

Samta Rangare gravatar imageSamta Rangare ( 2015-01-09 03:08:55 -0500 )edit
0

answered 2015-01-06 00:43:12 -0500

Samta Rangare gravatar image

Hey ranjit,

I am also trying sriov feature. How did you get the ip address for VM, In my case VM never gets any ip address. Though nova list shows that ip address has been assigned to VM, but ifconfig -a show no ip address with eth0. And yes even assigning manually VM doesnt ping each other and there is no connectivity from host to VM. (I am using devstack setup)

Can you please share your ml2 conf file also the steps to create network and assign port to VM.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

3 followers

Stats

Asked: 2014-12-17 03:37:49 -0500

Seen: 1,279 times

Last updated: Jan 06 '15