Friday, October 18, 2013

Glusterfs volume based Havana 2013.2 instances on NFS-Like Standalone Storage Server With GlusterFS 3.4.1 Fedora 19

  Following http://www.gluster.org/category/openstack/


This is a snapshot to show the difference between the Havanna and Grizzly releases with GlusterFS.
Grizzly Havana
Glance – Could point to the filesystem images mounted with GlusterFS, but had to copy VM image to deploy it Can now point to Cinder interface, removing the need to copy image
Cinder – Integrated with GlusterFS, but only with Fuse mounted volumes Can now use libgfapi-QEMU integration for KVM hypervisors
Nova – No integration with GlusterFS Can now use the libgfapi-QEMU integration
Swift – GlusterFS maintained a separate repository of changes to Swift proxy layer Swift patches now merged upstream, providing a cleaner break between API and implementation

Please,  view also nice article: http://www.mirantis.com/blog/openstack-havana-glusterfs-and-what-improved-support-really-means/

Actually, on Glusterfs F19 Server included in cluster procedure of cinder tuning should be the same. First step -  set up Havana RC1 RDO on Fedora 19 per

http://bderzhavets.blogspot.ru/2013/10/neutron-basic-rdo-setup-havana-to-have.html

 

Post install fix (as of 10/31/2013) :

Also set  ALLOWED_HOSTS = ['*']  in /etc/openstack-dashboard/local_settings and restart  httpd

 

 Next - installing GlusterFS Server on Cinder host


 #   yum install glusterfs glusterfs-server glusterfs-fuse
 #   systemctl status glusterd

  glusterd.service - GlusterFS an clustered file-system server
   Loaded: loaded (/usr/lib/systemd/system/glusterd.service; enabled)
   Active: active (running) since Fri 2013-10-18 13:47:51 MSK; 2h 37min ago
  Process: 1126 ExecStart=/usr/sbin/glusterd -p /run/glusterd.pid (code=exited, status=0/SUCCESS)
 Main PID: 1136 (glusterd)
   CGroup: name=systemd:/system/glusterd.service
           ├─1136 /usr/sbin/glusterd -p /run/glusterd.pid
           ├─8861 /usr/sbin/glusterfsd -s 192.168.1.135 --volfile-id cinder-volume.192.168.1.135.rhs-brick1-cinder-volume -...
           ├─8878 /usr/sbin/glusterfs -s localhost --volfile-id gluster/nfs -p /var/lib/glusterd/nfs/run/nfs.pid -l /var/lo...
           └─8885 /sbin/rpc.statd

Oct 18 13:47:51 localhost.localdomain systemd[1]: Started GlusterFS an clustered file-system server.
Oct 18 13:58:19 localhost.localdomain  rpc.statd[8885]: Version 1.2.7 starting
Oct 18 13:58:19 localhost.localdomain  sm-notify[8886]: Version 1.2.7 starting
Oct 18 13:58:19 localhost.localdomain  rpc.statd[8885]: Initializing NSM state

 #   mkdir -p /rhs/brick1/cinder-volume
 #  gluster volume create cinder-volume  \
     192.168.1.135:/rhs/brick1/cinder-volume
 #  gluster volume start cinder-volume
 #  gluster volume info

Volume Name: cinder-volume
Type: Distribute
Volume ID: d52c0ba1-d7b1-495d-8f14-07ff03e7db95
Status: Started
Number of Bricks: 1
Transport-type: tcp
Bricks:
Brick1: 192.168.1.135:/rhs/brick1/cinder-volume

A sample of utilizing stripe gluster volume may be viewed here



Configuring Cinder to Add GlusterFS


# openstack-config --set /etc/cinder/cinder.conf DEFAULT volume_driver cinder.volume.drivers.glusterfs.GlusterfsDriver 

# openstack-config --set /etc/cinder/cinder.conf DEFAULT glusterfs_shares_config /etc/cinder/shares.conf 

# openstack-config --set /etc/cinder/cinder.conf DEFAULT glusterfs_mount_point_base /var/lib/cinder/volumes

 # vi /etc/cinder/shares.conf
    192.168.1.135:cinder-volume

:wq


# iptables-save > iptables.dump

Add to *filter section:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 111 -j ACCEPT 
-A INPUT -m state --state NEW -m tcp -p tcp --dport 24007 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 24008 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 24009 -j ACCEPT 
-A INPUT -m state --state NEW -m tcp -p tcp --dport 24010 -j ACCEPT 
-A INPUT -m state --state NEW -m tcp -p tcp --dport 24011 -j ACCEPT 
-A INPUT -m state --state NEW -m tcp -p tcp --dport 38465:38469 -j ACCEPT
 
# iptables-restore < iptables.dump
 # service iptables restart
  
Restart openstack-cinder-volume service mounts glusterfs volume with no problems with ownership :
# for i in api scheduler volume ; do service openstack-cinder-${i} restart ;done
  Redirecting to /bin/systemctl restart  openstack-cinder-api.service
  Redirecting to /bin/systemctl restart  openstack-cinder-scheduler.service
  Redirecting to /bin/systemctl restart  openstack-cinder-volume.service
 # df -h

Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/fedora-root      164G   29G  127G  19% /
devtmpfs                     3.9G     0  3.9G   0% /dev
tmpfs                           3.9G  148K  3.9G   1% /dev/shm
tmpfs                           3.9G  1.1M  3.9G   1% /run
tmpfs                           3.9G     0  3.9G   0% /sys/fs/cgroup
tmpfs                           3.9G  800K  3.9G   1% /tmp
/dev/sda1                    477M   87M  362M  20% /boot
/dev/loop0                   928M  1.4M  860M   1% /srv/node/device1
tmpfs                           3.9G  1.1M  3.9G   1% /run/netns 
192.168.1.135:cinder-volume  164G   29G  127G  19% /var/lib/cinder/volumes/f39d1b2d7e2a2e48af66eceba039b139

 # nova image-list
+--------------------------------------+------------------+--------+--------+
| ID                                   | Name             | Status | Server |
+--------------------------------------+------------------+--------+--------+
| 59758edc-da8d-444e-b0a0-d93d323fc026 | F19Image         | ACTIVE |        |
| df912358-b227-43a5-94a3-edc874c577bc | UbuntuSalamander | ACTIVE |        |
| ae07d1ba-41de-44e9-877a-455f8956d86f | cirros           | ACTIVE |        |
+--------------------------------------+------------------+--------+--------+

Creating volume via command line :

# cinder create --image-id 59758edc-da8d-444e-b0a0-d93d323fc026  --display_name Fedora19VL 5

# cinder list

+--------------------------------------+--------+--------------+------+-------------+----------+
|                  ID                  | Status | Display Name | Size | Volume Type | Bootable |             Attached to              |
+--------------------------------------+--------+--------------+------+-------------+----------+
| 0474ead2-61a8-41dd-8f8d-ef3000266403 | in-use |              |  5   |     None    |   true   | 779b306b-3cb2-48ea-9711-2c42c508b577 |
| da344703-dcf9-450e-9e34-cafb331f80f6 | in-use |  Fedora19VL  |  5   |     None    |   true   | 1a8e5fa5-6a79-43f0-84ee-58e2099b1ebe |
+--------------------------------------+--------+--------------+------+-------------+----------+

 # ls -l /var/lib/cinder/volumes/f39d1b2d7e2a2e48af66eceba039b139

total 5528248

-rw-rw-rw-. 1 qemu qemu 5368709120 Oct 18 16:19 volume-0474ead2-61a8-41dd-8f8d-ef3000266403

-rw-rw-rw-. 1 qemu qemu 5368709120 Oct 18 16:19 volume-da344703-dcf9-450e-9e34-cafb331f80f6



   


Screen shots on another F19 instance dual booting with first

 



  


 

   Creating via cinder command line Ubuntu 13.10 Server bootable volume in glusterfs storage :


   

     

  
References

http://www.gluster.org/community/documentation/index.php/GlusterFS_Cinder

Saturday, October 05, 2013

Neutron basic RDO setup (havana 2013.2) to have original LAN as external on Fedora 19

*************************************
Update on 10/27/2013.  View also
*************************************

Neutron basic RDO setup (havana 2013.2) to have original LAN as external on Fedora 19 with native Ethernet interfaces names


 http://bderzhavets.blogspot.ru/2013/10/neutron-basic-rdo-setup-havana-20132-to_26.html

************************************

  Follow as normal   http://openstack.redhat.com/Quickstart, just after  

$ sudo yum install -y openstack-packstack run  $ sudo yum -y update  one more time to upgrade python-backports to 1.0.4 

Post install fix (as of 10/31/2013) :

Also set  ALLOWED_HOSTS = ['*']  in /etc/openstack-dashboard/local_settings and restart  httpd

When done switch to eth0 per
http://unix.stackexchange.com/questions/81834/how-can-i-change-the-default-ens33-network-device-to-old-eth0-on-fedora-19

    Remove biosdevname if it is installed. (yum remove biosdevname)
    Disable the udev rule:
      ln  -s /dev/null    /etc/udev/rules.d/80-net-name-slot.rules
    Reboot

and  create under /etc/sysconfig/network-scripts

[root@localhost network-scripts]# cat ifcfg-br-ex
DEVICE="br-ex"
BOOTPROTO="static"
IPADDR="192.168.1.125"
NETMASK="255.255.255.0"
DNS1="83.221.202.254"
BROADCAST="192.168.1.255"
GATEWAY="192.168.1.1"
NM_CONTROLLED="no"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="yes"
IPV6INIT=no
ONBOOT="yes"
TYPE="OVSBridge"
DEVICETYPE="ovs"


[root@localhost network-scripts]# cat ifcfg-eth0
NAME="eth0"
HWADDR=90:E6:BA:2D:11:EB
ONBOOT="yes"
TYPE="OVSPort"
DEVICETYPE="ovs"
OVS_BRIDGE=br-ex
NM_CONTROLLED=no
IPV6INIT=no

Enable network service, turn off interface eth0

********************************
UPDATE on 12/17/2013
********************************

It's working again



  

 

[root@openstack1 ~(keystone_admin)]# ovs-vsctl show
5e1fc460-3882-4210-b185-310e00af8a47
    Bridge br-int
        Port br-int
            Interface br-int
                type: internal
        Port "tapf7dd77e3-50"
            tag: 1
            Interface "tapf7dd77e3-50"
                type: internal
        Port "qr-33f43f85-da"
            tag: 1
            Interface "qr-33f43f85-da"
                type: internal
    Bridge br-ex
        Port "qg-161a8f7c-01"
            Interface "qg-161a8f7c-01"
                type: internal
        Port br-ex
            Interface br-ex
                type: internal
        Port "eth0\nbr-ex"
            Interface "eth0\nbr-ex"
        Port "eth0"
            Interface "eth0"
    ovs_version: "1.11.0"


**************************************************************************

Due to known bugs

Bug 981583 - Openstack firewall rules are not enabled after reboot
  https://bugzilla.redhat.com/show_bug.cgi?id=981583

Bug 981652 - firewalld does not cover openstack/packstack use case.    
  https://bugzilla.redhat.com/show_bug.cgi?id=981652

Run:-

# yum -y install iptables-services
# systemctl disable firewalld
# systemctl enable iptables

then  reboot

In dashboard environment delete router1 and public network.

# source keystonerc_admin
# nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
# nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
# neutron net-create public --router:external=True
# neutron subnet-create public 192.168.1.0/24 --name vlan --enable_dhcp False \
   --allocation_pool start=192.168.1.57,end=192.168.1.92  \
   --gateway 192.168.1.1
# neutron floatingip-create public

# EXTERNAL_NETWORK_ID=`neutron net-list | grep public | awk '{ print $2 }'`
# INT_SUBNET_ID=`neutron subnet-list | grep private_subnet | awk '{ print $2}'`
# SERVICE_TENANT_ID=`keystone tenant-list | grep service | awk '{ print $2}'`
# neutron router-create --name router2 --tenant-id $SERVICE_TENANT_ID router2
# neutron router-gateway-set router2  $EXTERNAL_NETWORK_ID
# neutron router-interface-add router2  $INT_SUBNET_ID
# neutron subnet-update $INT_SUBNET_ID --dns_nameservers list=true 83.221.202.254
# neutron subnet-update $INT_SUBNET_ID --gateway_ip 10.0.0.1

Create images via command line :-

# glance image-create --name 'Fedora19image' --disk-format qcow2 --container-format bare --is-public true \
--copy-from http://cloud.fedoraproject.org/fedora-19.x86_64.qcow2

# glance image-create --name 'UbuntuServer13.10image' \
  --disk-format qcow2 \
 --container-format bare --is-public true \
 --copy-from http://cloud-images.ubuntu.com/saucy/current/saucy-server-cloudimg-amd64-disk1.img

You can also fix the issue per

http://openstack.redhat.com/forum/discussion/554/havana-horizon-no-formats-available-for-images

Creating volumes on Havana release


By default (not to follow [1]) cinder-volumes VG gets created under
/var/lib/cinder as loop mounted empty file due to :-

[root@localhost ~(keystone_admin)]# cd /var/lib/cinder

[root@localhost cinder(keystone_admin)]# ls -l
total 16777236
-rw-r--r--. 1 root   root   22118662144 Oct  7 16:04 cinder-volumes
drwxr-xr-x. 2 cinder cinder        4096 Oct  7 15:48 tmp

[root@localhost cinder(keystone_admin)]# losetup -a

/dev/loop0: [64768]:6034065 (/srv/loopback-device/device1)
/dev/loop1: [64768]:918092 (/var/lib/cinder/cinder-volumes)


[root@localhost ~(keystone_admin)]# nova image-list
+--------------------------------------+------------------------+--------+--------+
| ID                                   | Name                   | Status | Server |
+--------------------------------------+------------------------+--------+--------+
| 73ddfddf-833d-4eda-869f-e26321c20a2e | Fedora19image  | ACTIVE |        |
| 2d5f5596-c5f5-401a-ae16-388b5dae78f2 | UbuntuServer13.10image | ACTIVE           
| 0415ec26-d202-4fb7-b6a0-3e7923547e98 | cirros                 | ACTIVE |        |
+--------------------------------------+------------------------+--------+--------+

[root@localhost ~(keystone_admin)]# cinder create --image-id 2d5f5596-c5f5-401a-ae16-388b5dae78f2  --display_name SalamanderVG 7

+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                 nova             |
|       bootable      |                False                 |
|      created_at     |      2013-10-07T11:39:32.001108      |
| display_description |                 None         |
|     display_name    |        SlamanderVG       |
|          id         | 624f7b78-bb1e-411a-afc6-e3190187af38 |
|       image_id      | 2d5f5596-c5f5-401a-ae16-388b5dae78f2 |
|       metadata      |                  {}                  |
|         size        |                  7                          |
|     snapshot_id     |                 None             |
|     source_volid    |                 None             |
|        status       |               creating               |
|     volume_type     |                 None            |
+---------------------+--------------------------------------+

[root@localhost ~(keystone_admin)]# nova volume-list
+--------------------------------------+-------------+--------------+------+-------------+-------------+
| ID                                   | Status      | Display Name | Size | Volume Type | Attached to |
+--------------------------------------+-------------+--------------+------+-------------+-------------+
| 624f7b78-bb1e-411a-afc6-e3190187af38 | downloading | SalamanderVG | 7    | None        |             |
+--------------------------------------+-------------+--------------+------+-------------+-------------+

[root@localhost ~(keystone_admin)]# cinder create --image-id 73ddfddf-833d-4eda-869f-e26321c20a2e  --display_name Fedora19VG 7

+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                 nova             |
|       bootable      |                False                 |
|      created_at     |      2013-10-07T11:42:32.708633      |
| display_description |                 None         |
|     display_name    |              Fedora19VG   |
|          id         | d2745ee6-9166-4ace-9fb6-826999eddcd0 |
|       image_id      | 73ddfddf-833d-4eda-869f-e26321c20a2e |
|       metadata      |                  {}                  |
|         size        |                  7                         |
|     snapshot_id     |                 None             |
|     source_volid    |                 None             |
|        status       |               creating               |
|     volume_type     |                 None             |
+---------------------+--------------------------------------+

[root@localhost ~(keystone_admin)]# nova volume-list

+--------------------------------------+-------------+--------------+------+-------------+-------------+
| ID                                   | Status      | Display Name | Size | Volume Type | Attached to |
+--------------------------------------+-------------+--------------+------+-------------+-------------+
| d2745ee6-9166-4ace-9fb6-826999eddcd0 | downloading | Fedora19VG   | 7    | None        |             |
| 624f7b78-bb1e-411a-afc6-e3190187af38  | available   | SalamanderVG     | 7   | None        |             |
+--------------------------------------+-------------+--------------+------+-------------+-------------+

[root@localhost ~(keystone_admin)]# nova volume-list

+--------------------------------------+--------+--------------+------+-------------+--------------------------------------+
| ID                                   | Status | Display Name | Size | Volume Type | Attached to                          |
+--------------------------------------+--------+--------------+------+-------------+--------------------------------------+
| d2745ee6-9166-4ace-9fb6-826999eddcd0 | in-use | Fedora19VG   | 7    | None        | 5dc6569f-42d8-49fb-a3d5-7f3089249952 |
| 624f7b78-bb1e-411a-afc6-e3190187af38 | in-use | SalamanderVG | 7    | None        | 3e0a32b4-1045-4d30-9921-b1c2c5140639 |
+--------------------------------------+--------+--------------+------+-------------+--------------------------------------+

[root@localhost ~(keystone_admin)]# pvscan | grep cinder-volumes
  PV /dev/loop1   VG cinder-volumes   lvm2 [20.60 GiB / 6.60 GiB free]





   Status of  RDO Havana 6 services


  





Cloud instance of Ubuntu 13.10 Server running Gnome 3.8.4 installed via  PPA    ppa:gnome3-team/gnome3 :
  1. $ sudo add-apt-repository ppa:gnome3-team/gnome3
  2. $ sudo apt-get update
  3. $sudo apt-get install gnome-shell ubuntu-gnome-desktop
View http://www.techrepublic.com/blog/linux-and-open-source/how-to-install-gnome-38-on-ubuntu/ regarding setup Gnome 3.8 on Ubuntu 13.04 (10)



REFERENCES

1. http://funwithlinux.net/2013/08/install-openstack-grizzly-on-fedora-19-using-packstack-with-quantum-networking/

 2. http://www.blog.sandro-mathys.ch/2013/08/install-rdo-havana-2-on-fedora-19-and.html

Monday, September 16, 2013

Quantum basic RDO setup (grizzly) to have original LAN as external on Fedora 19

Follow as normal http://openstack.redhat.com/Neutron-Quickstart
When done switch to eth0 per
http://unix.stackexchange.com/questions/81834/how-can-i-change-the-default-ens33-network-device-to-old-eth0-on-fedora-19

  1. Remove biosdevname if it is installed. (yum remove biosdevname)
  2. Disable the udev rule: ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
  3. Reboot
and  create under /etc/sysconfig/network-scripts
[root@localhost network-scripts]# cat ifcfg-br-ex
DEVICE="br-ex"
BOOTPROTO="static"
IPADDR="192.168.1.52"
NETMASK="255.255.255.0"
DNS1="83.221.202.254"
BROADCAST="192.168.1.255"
GATEWAY="192.168.1.1"
NM_CONTROLLED="no"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="yes"
IPV6INIT=no
ONBOOT="yes"
TYPE="OVSBridge"
DEVICETYPE="ovs"

[root@localhost network-scripts]# cat ifcfg-eth0
NAME="eth0"
HWADDR=90:E6:BA:2D:11:EB
ONBOOT="no"
TYPE="OVSPort"
DEVICETYPE="ovs"
OVS_BRIDGE=br-ex
NM_CONTROLLED=no
IPV6INIT=no

Enable network service
REBOOT

Turn off interface eth0 , update ONBOOT="no" to ONBOOT="yes"
in ifcfg-eth0, then  restart network service





In dashboard environment delete router1 and public network.
Create router2 and internal interface to private network.

#   source keystonerc_admin
#   nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
#   nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
#   quantum net-create public --router:external=True
#   quantum subnet-create public 192.168.1.0/24 --name vlan \
     --enable_dhcp False --allocation_pool  \
     start=192.168.1.57, end=192.168.1.62  \
     --gateway 192.168.1.1
#  quantum floatingip-create public


Next step
# EXTERNAL_NETWORK_ID=`quantum net-list | grep public | awk '{ print $2 }'`
# quantum router-gateway-set router2  $EXTERNAL_NETWORK_ID
# INT_SUBNET_ID=`quantum subnet-list | grep private_subnet | awk '{ print $2}'`
# quantum subnet-update $INT_SUBNET_ID --dns_nameservers list=true 83.221.202.254
# quantum subnet-update $INT_SUBNET_ID --gateway_ip 10.0.0.1

 Router2 and internal interface to private network may be also created via CLI:

# EXTERNAL_NETWORK_ID=`quantum net-list | grep public | awk '{ print $2 }'`
# INT_SUBNET_ID=`quantum subnet-list | grep private_subnet | awk '{ print $2}'`
# SERVICE_TENANT_ID=`keystone tenant-list | grep service | awk '{ print $2}'`
# quantum router-create --name router2 --tenant-id $SERVICE_TENANT_ID router2
# quantum router-gateway-set router2  $EXTERNAL_NETWORK_ID
# quantum router-interface-add router2  $INT_SUBNET_ID
# quantum subnet-update $INT_SUBNET_ID --dns_nameservers list=true 83.221.202.254
# quantum subnet-update $INT_SUBNET_ID --gateway_ip 10.0.0.1

View  http://openstack.redhat.com/forum/discussion/196/quantum-basic-setup/p1



To make configuration persistent between reboots due to known bugs

Bug 981583 - Openstack firewall rules are not enabled after reboot
  https://bugzilla.redhat.com/show_bug.cgi?id=981583

Bug 981652 - firewalld does not cover openstack/packstack use case.     
  https://bugzilla.redhat.com/show_bug.cgi?id=981652

Run:-
 
# yum -y install iptables-services
# systemctl disable firewalld
# systemctl enable iptables








Cloud instance of Ubuntu 13.10 Server running Gnome 3.8.1 installed via  PPA    ppa:gnome3-team/gnome3 :
  1. $ sudo add-apt-repository ppa:gnome3-team/gnome3
  2. $ sudo apt-get update
  3. $sudo apt-get install gnome-shell ubuntu-gnome-desktop
View http://www.techrepublic.com/blog/linux-and-open-source/how-to-install-gnome-38-on-ubuntu/ regarding setup Gnome 3.8 on Ubuntu 13.04 (10)





Setup Windows Server 2012 evaluation cloud instance

# gunzip -cd windows_server_2012_standard_eval_kvm_20130510.qcow2.gz |
 glance image-create --property hypervisor_type=kvm --name "Windos Server2012 Std Eval"  --container-format bare --disk-format vhd


+--------------------------------------------+----------------------------------------+
| Property                              | Value                                |
+--------------------------------------------+----------------------------------------+
| Property 'hypervisor_type' | kvm                                  |
| checksum                            | 801d232ea89f74810284c88b1512a32a   
| container_format                | bare                                 |
| created_at                           | 2013-09-23T13:05:44       |
| deleted                                | False                                |
| deleted_at                           | None                                |
| disk_format                         | vhd                                   |
| id                                          | 32ae031d-3bc0-4a38-a355-f9a8fa8be6e6
| is_public                              | False                                |
| min_disk                              | 0                                       |
| min_ram                              | 0                                       |
| name                                   |  Windos Server 2012 Std Eval       

|owner                                   | f0001a9a94f741dfa1545f2682d01fde  
| protected                            | False                                 |
| size                                      | 16337731584                    |
| status                                  | active                                |
| updated_at                         | 2013-09-23T13:10:29        |
+-------------------------------------------+-----------------------------------------+

Getting password for Admin :

# nova list
+--------------------------------------+----------------+-----------+--------------------------------------------+
| ID                                    | Name      | Status  | Networks                            |
+--------------------------------------+----------------+-----------+--------------------------------------------+
| c0b65e09-7195-4c10-bce3-2c4c7aca7cea | UbuntuSRV13.10 | SUSPENDED | InternalNetwork=192.168.12.2, 192.168.1.62 |
| 019ce45c-5586-4e46-8db0-68cfc9777049 | VF19BD         | SUSPENDED | private=10.0.0.3, 192.168.1.58             |
| 59070632-c37d-4a60-8ee7-9bc4db3960ed | WinSRV2012     | SUSPENDED | private=10.0.0.4, 192.168.1.59             |
+--------------------------------------+----------------+-----------+--------------------------------------------+

# nova get-password   WinSRV2012 /home/boris/Downloads/key2.pem



Remote noVNC access to cloud instances

[root@localhost ~(keystone_admin)]# nova list
+--------------------------------------+------------+-----------+--------------------------------+
| ID                                   | Name       | Status    | Networks                       |
+--------------------------------------+------------+-----------+--------------------------------+
| 27616e5c-a08d-4c18-8366-038a03dec77c | Ubuntu1310 | ACTIVE    | private=10.0.0.6, 192.168.1.63 |
| ca57df26-ae59-4ea0-a9c3-b21b1e862947 | VF19BD     | SUSPENDED | private=10.0.0.3, 192.168.1.59 |
| d37ccd48-0ba4-4e28-aa0b-eb43deb8b948 | WinSRV2012 | ACTIVE    | private=10.0.0.5, 192.168.1.61 |
+--------------------------------------+------------+-----------+--------------------------------+
[root@localhost ~(keystone_admin)]# nova get-vnc-console 27616e5c-a08d-4c18-8366-038a03dec77c novnc
+-------+------------------------------------------------------------------------------------+
| Type  | Url                                                                                |
+-------+------------------------------------------------------------------------------------+
| novnc | http://192.168.1.145:6080/vnc_auto.html?token=8a6dbade-e4f0-4c6d-8ee7-dab8bb34fa32 |
+-------+------------------------------------------------------------------------------------+
[root@localhost ~(keystone_admin)]# nova get-vnc-console d37ccd48-0ba4-4e28-aa0b-eb43deb8b948 novnc
+-------+------------------------------------------------------------------------------------+
| Type  | Url                                                                                |
+-------+------------------------------------------------------------------------------------+
| novnc | http://192.168.1.145:6080/vnc_auto.html?token=796ef47d-ecb7-40c2-be0f-032f85afe445 |
+-------+------------------------------------------------------------------------------------+







Sunday, September 15, 2013

Quantum basic RDO setup (grizzly) to have original LAN as external on CentOS 6.4

Attempting to follow http://allthingsopen.com/2013/08/23/openstack-packstack-installation-with-external-connectivity/I've got an error after starting :-
# packstack --allinone --quantum-l3-ext-bridge=eth0
It reports that ovs port eth0 already exists. Approach bellow in general follows RDO's  discussion
at http://openstack.redhat.com/forum/discussion/196/quantum-basic-setup/p1
Follow as normal http://openstack.redhat.com/Neutron-Quickstart
When done create under /etc/sysconfig/network-scripts


[root@Server64 network-scripts]# cat ifcfg-br-ex
DEVICE="br-ex"
BOOTPROTO="none"
IPADDR="192.168.1.42"
NETMASK="255.255.255.0"
DNS1="83.221.202.254"
BROADCAST="192.168.1.255"
GATEWAY="192.168.1.1"
NM_CONTROLLED="no"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="yes"
IPV6INIT=no
ONBOOT="yes"
TYPE="OVSBridge"
DEVICETYPE="ovs"

[root@Server64 network-scripts]# cat ifcfg-eth0
DEVICE="eth0"
ONBOOT="yes"
# HWADDR="1C:C1:DE:76:19:70"
HWADDR="00:22:15:63:E4:E2"
TYPE="OVSPort"
DEVICETYPE="ovs"
OVS_BRIDGE=br-ex
NM_CONTROLLED=no
IPV6INIT=no

Run script as root :-

for i in /etc/quantum/*.ini
do
    sed -i "s/^[# ]*ovs_use_veth.*$/ovs_use_veth = True/g" $i
done

sed -i \
    -e "s/^[# ]*enable_isolated_metadata.*$/enable_isolated_metadata = True/g" \
    -e "s/^[# ]*enable_metadata_network.*$/enable_metadata_network = True/g"  \
    /etc/quantum/dhcp_agent.ini


# chkconfig network on

REBOOT
Disable autoconnect eth0.
REBOOT

Remove old puplic (external network) and create new one as required.
Recreate router in dashboard environment and add internal interface to
private network

#   source keystonerc_admin
#   nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
#   nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
#   quantum net-create public --router:external=True
#   quantum subnet-create public 192.168.1.0/24 --name vlan --enable_dhcp False --allocation_pool start=192.168.1.57,end=192.168.1.62 \
    --  gateway 192.168.1.1
#   quantum floatingip-create public

#   quantum net-list
[root@Server64 ~(keystone_admin)]# quantum router-list
+--------------------------------------+---------+--------------------------------------------------------+
| id                                   | name    | external_gateway_info                   |
+--------------------------------------+---------+--------------------------------------------------------+
| c56c1cc1-a11b-454c-9ccb-17dc7e62f475 | router1 |
+--------------------------------------+---------+--------------------------------------------------------+

[root@Server64 ~(keystone_admin)]# quantum net-list
+--------------------------------------+---------+-----------------------------------------------------+
| id                                   | name    | subnets                                       |
+--------------------------------------+---------+-----------------------------------------------------+
| 6823b670-231c-4b31-9325-12dc098087b2 | private | 203320cc-cd60-486d-b092-eec99740c4cc 10.0.0.0/24    |
| c9615975-beb4-461a-9aad-b740a3350bf5 | public  | 40568df0-9bae-4578-8ae9-56d0ae7d4a2e 192.168.1.0/24 |
+--------------------------------------+---------+-----------------------------------------------------+

#   quantum router-gateway-set c56c1cc1-a11b-454c-9ccb-17dc7e62f475 c9615975-beb4-461a-9aad-b740a3350bf5

[root@Server64 ~(keystone_admin)]# quantum subnet-list
+--------------------------------------+----------------+----------------+--------------------------------------------------+
| id                                   | name           | cidr           | allocation_pools                                 |
+--------------------------------------+----------------+----------------+--------------------------------------------------+
| 203320cc-cd60-486d-b092-eec99740c4cc | private_subnet | 10.0.0.0/24    | {"start": "10.0.0.2", "end": "10.0.0.254"}       |
| 40568df0-9bae-4578-8ae9-56d0ae7d4a2e | vlan           | 192.168.1.0/24 | {"start": "192.168.1.57", "end": "192.168.1.62"} |
+--------------------------------------+----------------+----------------+--------------------------------------------------+

[root@Server64 ~(keystone_admin)]#  quantum subnet-update 203320cc-
cd60-486d-b092-eec99740c4cc  --dns_nameservers list=true 83.221.202.254
Updated subnet: 203320cc-cd60-486d-b092-eec99740c4cc

[root@RServer64 ~(keystone_admin)]#  quantum subnet-update 203320cc-cd60-486d-b092-eec99740c4cc  --gateway_ip 10.0.0.1
Updated subnet: 203320cc-cd60-486d-b092-eec99740c4cc


 In other way it may look like :-

# EXTERNAL_NETWORK_ID=`quantum net-list | grep public | awk '{ print $2 }'`
# quantum router-gateway-set router1 $EXTERNAL_NETWORK_ID
# INT_SUBNET_ID=`quantum subnet-list | grep private_subnet | awk '{ print $2}'`
# quantum subnet-update $INT_SUBNET_ID --dns_nameservers list=true 83.221.202.254
# quantum subnet-update $INT_SUBNET_ID --gateway_ip 10.0.0.1














References
1.http://openstack.redhat.com/forum/discussion/196/quantum-basic-setup

Saturday, March 17, 2012


Set up Spice-Gtk 0.11 with USB redirection on Ubuntu Precise



Build requires spice-protocol 0.10.1 and the most recent usbredir 0.4.2
View also recent commit at http://cgit.freedesktop.org/spice/spice-gtk/ converted to 0001-usbredir-Check-for-existing-usb-channels-after-libus.patch for spice-gtk-0.11

****************
Link to PPA
****************

$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir68
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common qemu-utils \
spice-client libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev usbredir-server \
libspice-protocol-dev libspice-server-dev \
libspice-client-glib-2.0-1 libspice-client-glib-2.0-dev \
libspice-client-gtk-2.0-1 libspice-client-gtk-2.0-dev \
libspice-client-gtk-3.0-1 libspice-client-gtk-3.0-dev \
python-spice-client-gtk spice-client-gtk

$ sudo groupadd libvirtd
$ sudo adduser $USER libvirtd
RELOGIN
$ sudo apt-get install virtinst virt-manager virt-viewer
$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/

To start default network :-

sudo virsh net-start default
sudo virsh net-autostart default

Wednesday, January 18, 2012


Set up Spice-Gtk 0.8 (USB Redirection support) on Ubuntu Precise



Short list of the changes per [1] :

- add USB redirection support, see Hans comments in the log and that
post for details: http://hansdegoede.livejournal.com/11084.html
- introduce SpiceGtkSession to deal with session-wide Gtk events, such
as clipboard, instead of doing it per display
- many cursor and keyboard handling improvements
- handle the new "semi-seamless" migration
- support new Spice mini-headers
- better coroutines: fibers on windows & jmp on linux
- add Vala vapi bindings generation
- many bug fixes and code improvements


Build requires spice-protocol 0.10.1 and the most recent usbredir 0.3.3
******************************************************************************************
Link to PPA Qemu-kvm 1.0 & Spice-protocol 0.10.1 & Spice-Gtk 0.8 USB Redirection on Ubuntu Precise
View also PPA Set up Spice-Gtk 0.8 on Ubuntu Precise
******************************************************************************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir58
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common qemu-utils \
spice-client libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev usbredir-server \
libspice-protocol-dev libspice-server-dev \
libspice-client-glib-2.0-4 libspice-client-glib-2.0-dev \
libspice-client-gtk-2.0-1 libspice-client-gtk-2.0-dev \
libspice-client-gtk-3.0-1 libspice-client-gtk-3.0-dev \
python-spice-client-gtk spice-client-gtk

$ sudo groupadd libvirtd
$ sudo adduser $USER libvirtd
RELOGIN
$ sudo apt-get install virtinst virt-manager virt-viewer
$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/

To start default network :-

sudo virsh net-start default
sudo virsh net-autostart default

Works with QEMU-KVM 1.0 with no special patch

1.http://www.mail-archive.com/spice-devel@lists.freedesktop.org/msg06659.html

Friday, January 13, 2012

Tuesday, December 06, 2011


Qemu-kvm 1.0 & Spice 0.10.0 & Spice-Gtk-0.7.81 USB redirection for Ubuntu Precise, Oneiric and Linux Mint 12 (Lisa)



Following bellow is attempt to reproduce Hans de Goede blog entry at http://planet.spice-space.org/ on Ubuntu 12.04 and 11.10 with intend to build Qemu-kvm 1.0 with usb redirection network support per http://planet.spice-space.org/. Current build qemu-kvm for Ubuntu Precise is based on branch http://cgit.freedesktop.org/~jwrdegoede/qemu/.
View similar PPA for Ubuntu Oneiric and Linux Mint 12 (Lisa) Qemu-kvm 1.0 & Spice 0.10.0 & Spice-Gtk-0.7.81 USB redirection and Libvirt 0.9.7-2 for Ubuntu Oneiric(v.6).
Spice-Gtk-0.7.81 has been built up on current snapshot of git://anongit.freedesktop.org/spice/spice-gtk to obtain Spice-Gtk with usb redirection support working stable with Spice 0.10.0.

Builds have been done on Ubuntu Precise and Oneiric as well.Packaged version version of Spice-Gtk-0.7.81 is built up on mentioned git repository. Running autogen.sh with exported environment variable NOCONFIGURE allows to perform it in one build per Debian’s Spice-Gtk-0.7-3 building schema, however requiring several updates to debian/control and debian/rules due to snapshots have to be done from current git tree.Upgrade version of Libvirt up to 0.9.7-2 allows to avoid using “qemu” command line (libvirt 0.9.2) and follow http://planet.spice-space.org/ update VM’s XML profile under /etc/libvirt/qemu/ as suggested in second blog entry of Hans de Goede.

$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-1.0-usbredir origin/qemu-kvm-1.0-usbredir
$ cd ..
$ cp -R qemu qemu-kvm-1.0-usbredir

Intermediate release :-

http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-1.0-usbredir

clearly demonstrates that all usb redirection patches won’t be in Qemu-kvm 1.0 release

Libusb build is based on git://git.libusb.org/libusb.git – 1.0.9-rc1
libusb-1.0.9-rc1 release candidate.

Qemu-kvm 1.0-rc2 debian/rules contains:-

./configure \
–target-list=”x86_64-softmmu i386-softmmu x86_64-linux-user i386-linux-user” \
–prefix=/usr \
–interp-prefix=/etc/qemu-binfmt/%M \
–disable-blobs \
–disable-strip \
–enable-spice \
–enable-usb-redir \
$(conf_arch)

VirtFS support is available.

**********************************************
To install packages from Precise PPA
**********************************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir38
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
spice-client libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev \
libspice-protocol-dev libspice-server-dev \
libspice-client-glib-2.0-4 libspice-client-glib-2.0-dev \
libspice-client-gtk-2.0-1 libspice-client-gtk-2.0-dev \
libspice-client-gtk-3.0-1 libspice-client-gtk-3.0-dev \
python-spice-client-gtk spice-client-gtk \
gir1.2-spice-client-glib-2.0 \
gir1.2-spice-client-gtk-2.0 \
gir1.2-spice-client-gtk-3.0

$ sudo apt-get install virtinst virt-manager virt-viewer
$ sudo adduser $USER libvirtd
$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/

Successful install looks like :-

boris@UbuntuPrecise:~$ dpkg -l |grep libspice
ii libspice-client-glib-2.0-4 0.7.81~4f76-2ubuntu6 GObject for communicating with Spice servers (runtime library)
ii libspice-client-glib-2.0-dev 0.7.81~4f76-2ubuntu6 GObject for communicating with Spice servers (development files)
ii libspice-client-gtk-2.0-1 0.7.81~4f76-2ubuntu6 GTK2 widget for SPICE clients (runtime library)
ii libspice-client-gtk-2.0-dev 0.7.81~4f76-2ubuntu6 GTK2 widget for SPICE clients (development files)
ii libspice-client-gtk-3.0-1 0.7.81~4f76-2ubuntu6 GTK3 widget for SPICE clients (runtime library)
ii libspice-client-gtk-3.0-dev 0.7.81~4f76-2ubuntu6 GTK3 widget for SPICE clients (development files)
ii libspice-protocol-dev 0.10.0-2ubuntu2 SPICE protocol headers
ii libspice-server-dev 0.10.0-2ubuntu7 Header files and development documentation for spice-server
ii libspice-server1 0.10.0-2ubuntu7 Implements the server side of the SPICE protocol

boris@UbuntuPrecise:~$ dpkg -l |grep qemu
ii qemu 1.0-usbredir-2ubuntu3 dummy transitional package from qemu to qemu-kvm
ii qemu-common 1.0-usbredir-2ubuntu3 qemu common functionality (bios, documentation, etc)
ii qemu-kvm 1.0-usbredir-2ubuntu3 Full virtualization on i386 and amd64 hardware

boris@UbuntuPrecise:~$ dpkg -l |grep libvirt
ii libvirt-bin 0.9.7-2ubuntu2 programs for the libvirt library
ii libvirt0 0.9.7-2ubuntu2 library for interfacing with different virtualization systems
ii python-libvirt 0.9.7-2ubuntu2 libvirt Python bindings

Per Hans de Goede – first create file /etc/qemu/ich9-ehci-uhci.cfg



[device "ehci"]
driver = "ich9-usb-ehci1"
addr = "1d.7"
multifunction = "on"

[device "uhci-1"]
driver = "ich9-usb-uhci1"
addr = "1d.0"
multifunction = "on"
masterbus = "ehci.0"
firstport = "0"

[device "uhci-2"]
driver = "ich9-usb-uhci2"
addr = "1d.1"
multifunction = "on"
masterbus = "ehci.0"
firstport = "2"

[device "uhci-3"]
driver = "ich9-usb-uhci3"
addr = "1d.2"
multifunction = "on"
masterbus = "ehci.0"
firstport = "4"


Upgrade version of Libvirt up to 0.9.7 allows to avoid using “qemu” command line (libvirt 0.9.2) and follow http://planet.spice-space.org/ update VM’s XML profile under /etc/libvirt/qemu/ as suggested in second blog entry of Hans de Goede (September 09, 2011):-
Change the first line from:



<domain type='kvm'>


to:



<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>


And add the following lines at the end, above the “</domain>” line:



<qemu:commandline>
<qemu:arg value='-readconfig'/>
<qemu:arg value='/etc/qemu/ich9-ehci-uhci.cfg'/>
<qemu:arg value='-chardev'/>
<qemu:arg value='spicevmc,name=usbredir,id=usbredirchardev1'/>
<qemu:arg value='-device'/>
<qemu:arg value='usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0,debug=3'/>
<qemu:arg value='-chardev'/>
<qemu:arg value='spicevmc,name=usbredir,id=usbredirchardev2'/>
<qemu:arg value='-device'/>
<qemu:arg value='usb-redir,chardev=usbredirchardev2,id=usbredirdev2,bus=ehci.0,debug=3'/>
<qemu:arg value='-chardev'/>
<qemu:arg value='spicevmc,name=usbredir,id=usbredirchardev3'/>
<qemu:arg value='-device'/>
<qemu:arg value='usb-redir,chardev=usbredirchardev3,id=usbredirdev3,bus=ehci.0,debug=3'/>
</qemu:commandline>


Then run :-
# /etc/init.d/libvirt-bin restart