Sysprep windows Image with AIK – Openstack Windows

Hi Windows Lovers,

In Virtual environment , Windows templates must be prepared with Sysprep before they can be provisioned on multiple machines. Sysprep allows you to create a generic Windows template and avoid any possible SID conflicts.

Here the steps to do sysprep in unattened way

Creating a Windows Template

Windows templates must be prepared with Sysprep before they can be provisioned on multiple machines. Sysprep allows you to create a generic Windows template and avoid any possible SID conflicts.

An overview of the procedure is as follows:

  1. Upload your Windows ISO.

    For more information, see “Adding an ISO”.

  2. Create a VM Instance with this ISO.

    For more information, see “Creating VMs”.

  3. Follow the steps in Sysprep for Windows Server 2008 R2 (below) or Sysprep for Windows Server 2003 R2, depending on your version of Windows Server

  4. The preparation steps are complete. Now you can actually create the template as described in Creating the Windows Template.

System Preparation for Windows Server 2008 R2

For Windows 2008 R2, you run Windows System Image Manager to create a custom sysprep response XML file. Windows System Image Manager is installed as part of the Windows Automated Installation Kit (AIK). Windows AIK can be downloaded fromMicrosoft Download Center.

Use the following steps to run sysprep for Windows 2008 R2:

Note

The steps outlined here are derived from the excellent guide by Charity Shelbourne, originally published at Windows Server 2008 Sysprep Mini-Setup.

  1. Download and install the Windows AIK

    Note

    Windows AIK should not be installed on the Windows 2008 R2 VM you just created. Windows AIK should not be part of the template you create. It is only used to create the sysprep answer file.

  2. Copy the install.wim file in the \sources directory of the Windows 2008 R2 installation DVD to the hard disk. This is a very large file and may take a long time to copy. Windows AIK requires the WIM file to be writable.

  3. Start the Windows System Image Manager, which is part of the Windows AIK.

  4. In the Windows Image pane, right click the Select a Windows image or catalog file option to load the install.wim file you just copied.

  5. Select the Windows 2008 R2 Edition.

    You may be prompted with a warning that the catalog file cannot be opened. Click Yes to create a new catalog file.

  6. In the Answer File pane, right click to create a new answer file.

  7. Generate the answer file from the Windows System Image Manager using the following steps:

    1. The first page you need to automate is the Language and Country or Region Selection page. To automate this, expand Components in your Windows Image pane, right-click and add the Microsoft-Windows-International-Core setting to Pass 7 oobeSystem. In your Answer File pane, configure the InputLocale, SystemLocale, UILanguage, and UserLocale with the appropriate settings for your language and country or region. Should you have a question about any of these settings, you can right-click on the specific setting and select Help. This will open the appropriate CHM help file with more information, including examples on the setting you are attempting to configure.

      System Image Manager

    2. You need to automate the Software License Terms Selection page, otherwise known as the End-User License Agreement (EULA). To do this, expand the Microsoft-Windows-Shell-Setup component. High-light the OOBE setting, and add the setting to the Pass 7 oobeSystem. In Settings, set HideEULAPage true.

      Depicts hiding the EULA page.

    3. Make sure the license key is properly set. If you use MAK key, you can just enter the MAK key on the Windows 2008 R2 VM. You need not input the MAK into the Windows System Image Manager. If you use KMS host for activation you need not enter the Product Key. Details of Windows Volume Activation can be found athttp://technet.microsoft.com/en-us/library/bb892849.aspx

    4. You need to automate is the Change Administrator Password page. Expand the Microsoft-Windows-Shell-Setup component (if it is not still expanded), expand UserAccounts, right-click on AdministratorPassword, and add the setting to the Pass 7 oobeSystem configuration pass of your answer file. Under Settings, specify a password next to Value.

      Depicts changing the administrator password

      You may read the AIK documentation and set many more options that suit your deployment. The steps above are the minimum needed to make Windows unattended setup work.

  8. Save the answer file as unattend.xml. You can ignore the warning messages that appear in the validation window.

  9. Copy the unattend.xml file into the c:\windows\system32\sysprep directory of the Windows 2008 R2 Virtual Machine

  10. Once you place the unattend.xml file in c:\windows\system32\sysprep directory, you run the sysprep tool as follows:

    cd c:\Windows\System32\sysprep
    sysprep.exe /oobe /generalize /shutdown
    

    The Windows 2008 R2 VM will automatically shut down after sysprep is complete.

Note

(XenServer) Windows VMs running on XenServer require PV drivers, which may be provided in the template or added after the VM is created. The PV drivers are necessary for essential management functions such as mounting additional volumes and ISO images, live migration, and graceful shutdown.

Single Node OpenStack (Liberty) Installation Steps on CentOS 7

OpenStack is a Cloud Software that manage large pool of compute (hypervisors), storage ( block & swift ) and network resources of a data center. It provides a Dashboard where admins can create and manage Projects (Tenants ) and give appropriate access to the project members , further on Project members can create VMs (Virtual Machine).

In this article we will install latest version of OpenStack ‘Liberty’ on CentOS 7 using rdo repositories. As per my setup i am using followings on my CentOS 7 Machine

  • Hostname = openstack.example.com
  • IP address = 192.168.1.3
  • netmask = 255.255.255.0
  • Gateway = 192.168.1.1
  • DNS = 192.168.1.254

Step:1 Set the hostname using hostnamectl command .

[root@localhost ~]# hostnamectl set-hostname "openstack.example.com"
[root@localhost ~]#

Step:2 Set the Selinux in Permissive Mode

[root@localhost ~]# setenforce 0

Edit the selinux config file ( /etc/sysconfig/selinux ) and set “SELINUX=permissive

[root@localhost ~]# grep permissive /etc/sysconfig/selinux
SELINUX=permissive
[root@localhost ~]#

Step:3 Disable firewalld & NetworkManager Service

[root@openstack ~]# systemctl stop firewalld
[root@openstack ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
[root@openstack ~]#
[root@openstack ~]# systemctl stop NetworkManager
[root@openstack ~]# systemctl disable NetworkManager
Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
[root@openstack ~]#

Step:4 Enable rdo repository for liberty packages.

Use below commands to update the system and enable rdo repository

[root@openstack ~]# yum update -y
[root@openstack ~]# yum install -y https://www.rdoproject.org/repos/rdo-release.rpm

Step:5 Install OpenStack PackStack Package

[root@openstack ~]# yum install -y openstack-packstack

Generate the answer file using below command.

[root@openstack ~]# packstack --gen-answer-file=/root/answer.txt
Packstack changed given value to required value /root/.ssh/id_rsa.pub

Edit the answer file “/root/answer.txt” , set the following parameters and leave rest of parameters as it is.

# NTP Server
CONFIG_NTP_SERVERS=<NTP_Server_IP>

# Disable Demo Version
CONFIG_PROVISION_DEMO=n

# Set KeyStone Admin Password or Admin user Password
CONFIG_KEYSTONE_ADMIN_PW=<password>

# Config Horizon over SSL
CONFIG_HORIZON_SSL=y

# Disable Nagios
CONFIG_NAGIOS_INSTALL=n

Note : In case if you don’t have NTP server in your setup then you can leave NTP parameter as it is.

 

Step:6 Start OpenStack installation using answer file.

[root@openstack ~]# packstack --answer-file /root/answer.txt

Once the installation is completed , we will get below message.

openstack-installation-packstack

After the installation a new interface “br-ex” will be created and assign the IP addess of eth0 or enp0s3 to br-ex .

[root@openstack ~]# cd /etc/sysconfig/network-scripts/
[root@openstack network-scripts]# cp ifcfg-enp0s3 ifcfg-br-ex
[root@openstack network-scripts]# vi ifcfg-enp0s3
DEVICE=enp0s3
HWADDR="08:00:27:8E:EA:56"
TYPE=OVSPort
DEVICETYPE=ovs
OVS_BRIDGE=br-ex
ONBOOT=yes

[root@openstack network-scripts]# vi ifcfg-br-ex
DEVICE=br-ex
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=192.168.1.3
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=192.168.1.254
ONBOOT=yes

In above files please change the IP details, Hardware address and Device name as per your setup.

When we restart the network service , it will add “enp0s3” as a port in br-ex OVS bridge.

[root@openstack network-scripts]# systemctl restart network
[root@openstack network-scripts]#

Please take a reboot and check whether settings are persistent or not.

Step:7 Now Access OpenStack Dashboard.

When the installation is completed a dashboard link was provided on the screen , in My Case it is “https://192.168.1.3/dashboard”

Liberty-OpenStack-Dashboard jpg

Use the user name as “admin” and password that we set for keystone admin user in answer file.

Instance-Overview- OpenStack-Dashboard

As we are able to login in Dashboard , so OpenStack installation part is completed. Now our next task is to “Launch an Instance from OpenStack Dashboard

OpenStack Liberty on Ubuntu 14.04 and Ubuntu 15.10 – Single machine setup – maestropandy

Install Ubuntu with partitioning scheme as per your requirements. Note: Run all the commands as super-user. We assume that the IP of the Single machine is 10.0.0.1.

Configure the repositories and update the packages.

This step is needed only if the OS is Ubuntu 14.04 LTS. You can skip the repository configuration if the OS is Ubuntu 15.10

apt-get update && apt-get -y dist-upgrade
add-apt-repository cloud-archive:liberty
Update the packages.

apt-get update && apt-get -y dist-upgrade
Note: Reboot is needed only if kernel is updated

reboot
Support packages

RaabitMQ server

apt-get install -y rabbitmq-server
Create a new user named ‘openstack’ and set necessary permissions for it.

rabbitmqctl add_user openstack rabbit_pass
rabbitmqctl set_permissions openstack “.*” “.*” “.*”
MariaDB server

Install MariaDB server and related software

apt-get install -y mariadb-server python-pymysql
Create a new file /etc/mysql/conf.d/mysqld_openstack.cnf and edit the following lines as follows

[mysqld]

bind-address = 0.0.0.0
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = ‘SET NAMES utf8’
character-set-server = utf8
Restart MySQL service

service mysql restart
Other Configuration

Edit the following lines in the file /etc/sysctl.conf
net.ipv4.ip_forward=1
net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0
Load the values

sysctl -p
Keystone (Identity)

Install keystone

apt-get install -y keystone apache2 libapache2-mod-wsgi memcached python-memcache python-openstackclient
Create mysql database named keystone and add credentials

mysql -u root -p
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO ‘keystone’@’%’ IDENTIFIED BY ‘keystone_dbpass’;
quit
Edit the file /etc/keystone/keystone.conf and make the following changes

[DEFAULT]

admin_token = ADMIN
[database]

connection = mysql+pymysql://keystone:keystone_dbpass@10.0.0.1/keystone
[memcache]

servers = localhost:11211
[token]

provider = uuid
driver = memcache
[revoke]

driver = sql
And comment the following line

connection = sqlite:////var/lib/keystone/keystone.db
Stop Keystone from automatically starting after reboot

echo “manual” > /etc/init/keystone.override
Sync the database

keystone-manage db_sync
Edit the file /etc/apache2/sites-available/wsgi-keystone.conf and append the following lines

Listen 5000
Listen 35357
<VirtualHost *:5000>
WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
WSGIProcessGroup keystone-public
WSGIScriptAlias / /usr/bin/keystone-wsgi-public
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
<IfVersion >= 2.4>
ErrorLogFormat “%{cu}t %M”
</IfVersion>
ErrorLog /var/log/apache2/keystone.log
CustomLog /var/log/apache2/keystone_access.log combined
<Directory /usr/bin>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
</VirtualHost>
<VirtualHost *:35357>
WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
WSGIProcessGroup keystone-admin
WSGIScriptAlias / /usr/bin/keystone-wsgi-admin
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
<IfVersion >= 2.4>
ErrorLogFormat “%{cu}t %M”
</IfVersion>
ErrorLog /var/log/apache2/keystone.log
CustomLog /var/log/apache2/keystone_access.log combined
<Directory /usr/bin>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
</VirtualHost>
Create a soft link for the conf file created just now, in the ‘sites-enabled’ directory

ln -s /etc/apache2/sites-available/wsgi-keystone.conf /etc/apache2/sites-enabled
Export the variable to run initial keystone commands

export OS_TOKEN=ADMIN
export OS_URL=http://10.0.0.1:35357/v3
export OS_IDENTITY_API_VERSION=3
Create admin user, admin tenant, admin role and service tenant. Also add admin user to admin tenant and admin role.

openstack service create –name keystone –description “OpenStack Identity” identity
openstack endpoint create –region RegionOne identity public http://10.0.0.1:5000/v2.0
openstack endpoint create –region RegionOne identity internal http://10.0.0.1:5000/v2.0
openstack endpoint create –region RegionOne identity admin http://10.0.0.1:35357/v2.0
openstack project create –domain default –description “Admin Project” admin
openstack user create –domain default –password-prompt admin
openstack role create admin
openstack role add –project admin –user admin admin
openstack project create –domain default –description “Service Project” service
unset OS_TOKEN OS_URL
Create a file named creds and add the following lines

export OS_PROJECT_DOMAIN_ID=default
export OS_USER_DOMAIN_ID=default
export OS_PROJECT_NAME=admin
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=ADMIN
export OS_AUTH_URL=http://10.0.0.1:35357/v3
export OS_IDENTITY_API_VERSION=3
Source the file

source creds
Test the keysone setup

openstack token issue
Glance (Image Store)

Install Glance

apt-get install -y glance python-glanceclient
Create database and credentials for Glance

mysql -u root -p
CREATE DATABASE glance;
GRANT ALL ON glance.* TO ‘glance’@’%’ IDENTIFIED BY ‘glance_dbpass’;
quit;
Create Keystone entries for glance

openstack user create –password-prompt glance
openstack role add –project service –user glance admin
openstack service create –name glance –description “OpenStack Image service” image
openstack endpoint create –region RegionOne image public http://10.0.0.1:9292
openstack endpoint create –region RegionOne image internal http://10.0.0.1:9292
openstack endpoint create –region RegionOne image admin http://10.0.0.1:9292
Edit /etc/glance/glance-api.conf and edit the following lines

[database]

connection = mysql+pymysql://glance:glance_dbpass@10.0.0.1/glance

[keystone_authtoken]

auth_uri = http://10.0.0.1:5000
auth_url = http://10.0.0.1:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = glance
password = glance_pass

[paste_deploy]

flavor = keystone

[glance_store]

default_store = file
filesystem_store_datadir = /var/lib/glance/images/
Edit /etc/glance/glance-registry.conf and edit the following lines as below

[database]

connection = mysql+pymysql://glance:glance_dbpass@10.0.0.1/glance

[keystone_authtoken]

auth_uri = http://10.0.0.1:5000
auth_url = http://10.0.0.1:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = glance
password = glance_pass

[paste_deploy]

flavor = keystone
Restart Glance services

service glance-api restart
service glance-registry restart
Sync the database

glance-manage db_sync
Download a pre-bundled image for testing

wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
glance image-create –name “cirros” –file cirros-0.3.4-x86_64-disk.img –disk-format qcow2 –container-format bare –visibility public –progress
Check the Glance installation using the following command

glance image-list
Nova (Compute)

Install the Nova services

apt-get install -y nova-compute sysfsutils nova-api nova-cert nova-conductor nova-consoleauth nova-novncproxy nova-scheduler python-novaclient nova-console
Create database and credentials for Nova

mysql -u root -p
CREATE DATABASE nova;
GRANT ALL PRIVILEGES ON nova.* TO ‘nova’@’%’ IDENTIFIED BY ‘nova_dbpass’;
quit
Create Keystone entries for Nova

openstack user create –domain default –password-prompt nova
openstack role add –project service –user nova admin
openstack service create –name nova –description “OpenStack Compute” compute
openstack endpoint create –region RegionOne compute public http://10.0.0.1:8774/v2/%\(tenant_id\)s
openstack endpoint create –region RegionOne compute internal http://10.0.0.1:8774/v2/%\(tenant_id\)s
openstack endpoint create –region RegionOne compute admin http://10.0.0.1:8774/v2/%\(tenant_id\)s
Open /etc/nova/nova.conf and edit the file as follows

[DEFAULT]
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/var/lock/nova
force_dhcp_release=True
libvirt_use_virtio_for_bridges=True
verbose=True
ec2_private_dns_show_ip=True
api_paste_config=/etc/nova/api-paste.ini
enabled_apis=ec2,osapi_compute,metadata
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 10.0.0.1
vnc_enabled = True
vncserver_listen = 10.0.0.1
vncserver_proxyclient_address = 10.0.0.1
novncproxy_base_url = http://10.0.0.1:6080/vnc_auto.html
network_api_class = nova.network.neutronv2.api.API
security_group_api = neutron
linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver
scheduler_default_filters=AllHostsFilter

[database]
connection = mysql://nova:nova_dbpass@10.0.0.1/nova

[oslo_messaging_rabbit]
rabbit_host = 127.0.0.1
rabbit_userid = openstack
rabbit_password = rabbit_pass

[keystone_authtoken]
auth_uri = http://10.0.0.1:5000
auth_url = http://10.0.0.1:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = nova
password = nova_pass

[glance]
host = 10.0.0.1

[oslo_concurrency]
lock_path = /var/lock/nova

[neutron]
service_metadata_proxy = True
metadata_proxy_shared_secret = openstack

url = http://10.0.0.1:9696
auth_strategy = keystone
admin_auth_url = http://10.0.0.1:35357/v2.0
admin_tenant_name = service
admin_username = neutron
admin_password = neutron_pass
[cinder]
os_region_name = RegionOne
sync the Nova db

nova-manage db sync
Restart all nova services

service nova-api restart; service nova-cert restart; service nova-consoleauth restart; service nova-scheduler restart; service nova-conductor restart; service nova-novncproxy restart; service nova-compute restart; service nova-console restart
Test the Nova installation using the following command

nova-manage service list
The output should be something like this

Binary Host Zone Status State Updated_At
nova-cert ubuntu-OS internal enabled 🙂 2015-10-28 15:32:13
nova-consoleauth ubuntu-OS internal enabled 🙂 2015-10-28 15:32:13
nova-scheduler ubuntu-OS internal enabled 🙂 2015-10-28 15:32:14
nova-conductor ubuntu-OS internal enabled 🙂 2015-10-28 15:32:14
nova-compute ubuntu-OS nova enabled 🙂 2015-10-28 15:32:15
nova-console ubuntu-OS internal enabled 🙂 2015-10-28 15:32:15
Also run the following command to check if nova is able to authenticate with keystone server

nova list
Neutron (Networking)

Install the Neutron services

apt-get install -y neutron-server neutron-plugin-openvswitch neutron-plugin-openvswitch-agent neutron-common neutron-dhcp-agent neutron-l3-agent neutron-metadata-agent openvswitch-switch
Create database and credentials for Neutron

mysql -u root -p
CREATE DATABASE neutron;
GRANT ALL ON neutron.* TO ‘neutron’@’%’ IDENTIFIED BY ‘neutron_dbpass’;
quit;
Create Keystone entries for Neutron

openstack user create –domain default –password-prompt neutron
openstack role add –project service –user neutron admin
openstack service create –name neutron –description “OpenStack Networking” network
openstack endpoint create –region RegionOne network public http://10.0.0.1:9696
openstack endpoint create –region RegionOne network internal http://10.0.0.1:9696
openstack endpoint create –region RegionOne network admin http://10.0.0.1:9696
Edit /etc/neutron/neutron.conf and make the following changes in appropriate sections.

[DEFAULT]

core_plugin = ml2
service_plugins = router
rpc_backend = rabbit
auth_strategy = keystone
notify_nova_on_port_status_changes = True
notify_nova_on_port_data_changes = True
nova_url = http://10.0.0.1:8774/v2

[keystone_authtoken]
auth_uri = http://10.0.0.1:5000
auth_url = http://10.0.0.1:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = neutron
password = neutron_pass

[database]

connection = mysql+pymysql://neutron:neutron_dbpass@10.0.0.1/neutron

[oslo_messaging_rabbit]

rabbit_host = 10.0.0.1
rabbit_userid = openstack
rabbit_password = rabbit_pass
[nova]

auth_url = http://10.0.0.1:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
region_name = RegionOne
project_name = service
username = nova
password = nova_pass
Open /etc/neutron/plugins/ml2/ml2_conf.ini and make the following changes

[ml2]
type_drivers=flat,vlan
tenant_network_types=vlan,flat
mechanism_drivers=openvswitch
[ml2_type_flat]
flat_networks=External
[ml2_type_vlan]
network_vlan_ranges=Intnet1:100:200
[ml2_type_gre]
[ml2_type_vxlan]
[securitygroup]
firewall_driver=neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
enable_security_group=True
[ovs]
bridge_mappings=External:br-ex,Intnet1:br-eth1
We have created two physical networks one as a flat network and the other as a vlan network with vlan ranging from 100 to 200. We have mapped External network to br-ex and Intnet1 to br-eth1. Now Create bridges Note: The naming convention for the ethernet cards may also be like “p4p1”, “em1” from Ubuntu 14.04 LTS. You can use the appropriate interface names below instead of “eth1” and “eth2”.

ovs-vsctl add-br br-int
ovs-vsctl add-br br-eth1
ovs-vsctl add-br br-ex
ovs-vsctl add-port br-eth1 eth1
ovs-vsctl add-port br-ex eth2
According to our set up all traffic belonging to External network will be bridged to eth2 and all traffic of Intnet1 will be bridged to eth1. If you have only one interface(eth0) and would like to use it for all networking then please have a look at https://fosskb.wordpress.com/2014/06/10/managing-openstack-internaldataexternal-network-in-one-interface.

Edit /etc/neutron/metadata_agent.ini to look like this

[DEFAULT]
auth_uri = http://10.0.0.1:5000
auth_url = http://10.0.0.1:35357
auth_region = RegionOne
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = neutron
password = neutron_pass
….
nova_metadata_ip = 127.0.0.1
Edit /etc/neutron/dhcp_agent.ini to look like this

[DEFAULT]
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
use_namespaces = True
dnsmasq_dns_servers = 8.8.8.8
Edit /etc/neutron/l3_agent.ini to look like this

[DEFAULT]
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
use_namespaces = True
Sync the db

neutron-db-manage –config-file /etc/neutron/neutron.conf –config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade liberty
Restart all Neutron services

service neutron-server restart; service neutron-plugin-openvswitch-agent restart;service neutron-metadata-agent restart; service neutron-dhcp-agent restart; service neutron-l3-agent restart
Check if the services are running. Run the following command

neutron agent-list
The output should be like

+————————————–+——————–+——–+——-+—————-+
| id | agent_type | host | alive | admin_state_up |
+————————————–+——————–+——–+——-+—————-+
| 01a5e70c-324a-4183-9652-6cc0e5c98499 | Metadata agent | ubuntu | 🙂 | True |
| 17b9440b-50eb-48b7-80a8-a5bbabc47805 | DHCP agent | ubuntu | 🙂 | True |
| c30869f2-aaca-4118-829d-a28c63a27aa4 | L3 agent | ubuntu | 🙂 | True |
| f846440e-4ca6-4120-abe1-ffddaf1ab555 | Open vSwitch agent | ubuntu | 🙂 | True |
+————————————–+——————–+——–+——-+—————-+
Users who want to know what happens under the hood can read

How neutron-openvswitch-agent provides L2 connectivity between Instances, DHCP servers and routers
How neutron-l3-agent provides services like routing, natting, floatingIP and security groups
See more of Linux networking capabilities
Cinder (Block storage)

Install Cinder services

apt-get install cinder-api cinder-scheduler cinder-volume lvm2 open-iscsi-utils open-iscsi iscsitarget sysfsutils python-cinderclient
Create database and credentials for Cinder

mysql -u root -p
mysql> CREATE DATABASE cinder;
mysql> GRANT ALL PRIVILEGES ON cinder.* TO ‘cinder’@’%’ IDENTIFIED BY ‘cinder_dbpass’;
mysql> quit;
Create Cinder related keystone entries

openstack user create –domain default –password-prompt cinder
openstack role add –project service –user cinder admin
openstack service create –name cinder –description “OpenStack Block Storage” volume
openstack service create –name cinderv2 –description “OpenStack Block Storage” volumev2
openstack endpoint create –region RegionOne volume public http://10.0.0.1:8776/v1/%\(tenant_id\)s
openstack endpoint create –region RegionOne volume admin http://10.0.0.1:8776/v1/%\(tenant_id\)s
openstack endpoint create –region RegionOne volume internal http://10.0.0.1:8776/v1/%\(tenant_id\)s
openstack endpoint create –region RegionOne volumev2 public http://10.0.0.1:8776/v2/%\(tenant_id\)s
openstack endpoint create –region RegionOne volumev2 admin http://10.0.0.1:8776/v2/%\(tenant_id\)s
openstack endpoint create –region RegionOne volumev2 internal http://10.0.0.1:8776/v2/%\(tenant_id\)s
Edit /etc/cinder/cinder.conf and replace all the lines with the following.

[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
api_paste_confg = /etc/cinder/api-paste.ini
iscsi_helper = tgtadm
volume_name_template = volume-%s
volume_group = cinder-volumes
verbose = True
auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 10.0.0.1
enabled_backends = lvm
glance_host = 10.0.0.1

[database]
connection = mysql+pymysql://cinder:cinder_dbpass@10.0.0.1/cinder

[oslo_messaging_rabbit]
rabbit_host = 10.0.0.1
rabbit_userid = openstack
rabbit_password = rabbit_pass

[keystone_authtoken]
auth_uri = http://10.0.0.1:5000
auth_url = http://10.0.0.1:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = cinder
password = cinder_pass

[oslo_concurrency]
lock_path = /var/lib/cinder/tmp

[lvm]
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_group = cinder-volumes
iscsi_protocol = iscsi
iscsi_helper = tgtadm
Sync the database

cinder-manage db sync
Create physical volume

pvcreate /dev/sdb
Create volume group named “cinder-volumes”

vgcreate cinder-volumes /dev/sdb
Restart all the Cinder services

service cinder-scheduler restart;service cinder-api restart;service cinder-volume restart;service tgt restart
Create a volume to test the setup

cinder create –display-name myVolume 1
List the volume created

+————————————–+———–+——————+———-+——+————-+———-+————-+————————————–+
| ID | Status | Migration Status | Name | Size | Volume Type | Bootable | Multiattach | Attached to |
+————————————–+———–+——————+———-+——+————-+———-+————-+————————————–+
| 535adcde-f206-4377-8875-4354e910a3e0 | available | – | myVolume | 1 | – | false | False | |
+————————————–+———–+——————+———-+——+————-+———-+————-+————————————–+
Horizon (OpenStack Dashboard)

Install OpenStack Web UI using the following command.

apt-get install -y openstack-dashboard
After installing login using the following credentials

URL : http://10.0.0.1/horizon
Username: admin
Password: ADMIN
Use the following link to get started with the first instance on OpenStack.

Procedure to get started with the first instance on OpenStack

About these ads

Share this:
Click to share on Twitter (Opens in new window)3Share on Facebook (Opens in new window)3Click to email (Opens in new window)Click to print (Opens in new window)1Click to share on LinkedIn (Opens in new window)1Click to share on Reddit (Opens in new window)Click to share on Google+ (Opens in new window)Click to share on Tumblr (Opens in new window)Click to share on Pinterest (Opens in new window)Click to share on Pocket (Opens in new window)

Related
OpenStack Juno on Ubuntu 14.04 LTS and 14.10 – Single Machine Setup
In “Cloud”
OpenStack Kilo on Ubuntu 14.04 LTS and 15.04 – Single machine setup
In “Cloud”
OpenStack IceHouse on Ubuntu 14.04 LTS and 12.04 LTS – Single machine setup
In “Cloud”
20/10/2015 · POSTED IN CLOUD, GLANCE, LIBERTY, NEUTRON, OPEN VSWITCH, OPENSTACK, OPENSTACK INSTALLATION GUIDE, UBUNTU, UBUNTU 14.04 · TAGGED OPENSTACK LIBERTY- SINGLE MACHINE INSTALL GUIDE
4 thoughts on “OpenStack Liberty on Ubuntu 14.04 and Ubuntu 15.10 – Single machine setup”

Pedro Stéfano
05/01/2016 AT 12:39 AM
Depois que adaptei esses comando em uma instalação que eu já tenho, não esta aceitando nem a conexão ssh

REPLY
Pedro Stéfano
05/01/2016 AT 12:06 AM
Have any wiki on how to make multi node

REPLY
Felipe
12/11/2015 AT 10:31 PM
Your tuts regarding openstack installation on single server rocks!

I couldn’t however get neutron to work well 😦

Have you any extra configuration to make it work? like interfaces config ?

Regads

REPLY
psichomofo
02/11/2015 AT 9:20 PM
I love Liberty ( Openstack )

REPLY
Leave a Reply
Enter your comment here…
Post navigation
« Installing LEMP stack using CentOS 6
Getting started with first instance on OpenStack »
CREATE A FREE WEBSITE OR BLOG AT WORDPRESS.COM. · THE EDDA THEME.
Follow
Follow “Free and Open Source Software Knowledge Base”

Get every new post delivered to your Inbox.

Join 140 other followers
Enter your email address

SIGN ME UP

Build a website with WordPress.com