VMware Command Line

### NFS Storage remount
# esxcli storage nfs remove -v nfs-dd03 
# esxcli storage nfs list
# esxcli storage nfs add -H cncda4dd03.ccoe.lab.emc.com -s /data/col1/esxi_store -v nfs-dd03

### vCenter shell login
# ///Reboot vCenter
# Ctrl + D and Select VCSA , Type "p", Enter password of root
# Type "e" and add "init=/bin/bash" in the end of kernel line, then boot it
# fsck /dev/sda

Upgrade OpenStack

  1.  Liberty to Mitaka

Nova Controller:

systemctl stop openstack-nova-api openstack-nova-cert \
               openstack-nova-consoleauth openstack-nova-scheduler \
               openstack-nova-conductor openstack-nova-novncproxy \
               httpd openstack-glance-api openstack-glance-registry
###Add Mitaka Repo, then update
yum clean all && yum update
keystone-manage token_flush
su -s /bin/sh -c "keystone-manage db_sync" keystone
su -s /bin/sh -c "glance-manage db_sync" glance
su -s /bin/sh -c "nova-manage db sync" nova

systemctl start httpd
###Create nova.api database
mysql -u root -p  
openstack endpoint create --region RegionOne compute public http://controller:8774/v2.1/%\(tenant_id\)s
openstack endpoint create --region RegionOne compute internal http://controller:8774/v2.1/%\(tenant_id\)s
openstack endpoint create --region RegionOne compute admin http://controller:8774/v2.1/%\(tenant_id\)s
su -s /bin/sh -c "nova-manage api_db sync" nova
systemctl start openstack-nova-api openstack-nova-consoleauth \
                  openstack-nova-scheduler openstack-nova-conductor\
                  openstack-nova-novncproxy.service \
                  openstack-glance-api openstack-glance-registry

Network Controller:

systemctl stop neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service
###Add Mitaka Repo, then update
yum clean all && yum update -y
su -s /bin/sh -c "neutron-db-manage upgrade heads" neutron
systemctl start neutron-server  neutron-linuxbridge-agent  neutron-dhcp-agent neutron-metadata-agent

Node:

systemctl stop neutron-linuxbridge-agent && systemctl start neutron-linuxbridge-agent
###Add Mitaka Repo, then update
yum clean all && yum update -y
systemctl restart neutron-linuxbridge-agent && systemctl start neutron-linuxbridge-agent

PS : Ubuntu

apt-get install software-properties-common
add-apt-repository cloud-archive:mitaka
add-apt-repository cloud-archive:liberty
rm -f /etc/apt/sources.list.d/cloudarchive-liberty.list
apt update && apt upgrade

2. Mitaka to Newton

# su -s /bin/sh -c "nova-manage api_db sync" nova
# su -s /bin/sh -c "nova-manage db sync" nova
# service nova-api restart
# service nova-consoleauth restart
# service nova-scheduler restart
# service nova-conductor restart
# service nova-novncproxy restart

# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \
 --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
 # service nova-api restart
 # service neutron-server restart
# service neutron-linuxbridge-agent restart
# service neutron-dhcp-agent restart
# service neutron-metadata-agent restart

# service nova-compute restart
# service neutron-linuxbridge-agent restart
# su -s /bin/sh -c "cinder-manage db sync" cinder

# service nova-api restart
# service cinder-scheduler restart
# service cinder-api restart

## grep -v ^# nova.conf|grep -v ^$
[DEFAULT]
.......
transport_url = rabbit://openstack:openstack@controller
auth_strategy = keystone
use_neutron = True
.......
[keystone_authtoken]
............
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = nova
............
[glance]
api_servers = http://controller:9292

2. From Newton to Ocata

Ubuntu:
# apt install software-properties-common
# add-apt-repository cloud-archive:ocata
# apt update && apt dist-upgrade
# su -s /bin/sh -c "keystone-manage db_sync" keystone
# grep -v ^# /etc/keystone/keystone.conf |grep -v ^$
[token]
......
provider = fernet
......
# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
# keystone-manage credential_setup --keystone-user keystone --keystone-group keystone

# keystone-manage bootstrap --bootstrap-password openstack \
--bootstrap-admin-url http://controller:35357/v3/ \
--bootstrap-internal-url http://controller:5000/v3/ \
--bootstrap-public-url http://controller:5000/v3/ \
--bootstrap-region-id RegionOne
# service apache2 restart
# su -s /bin/sh -c "glance-manage db_sync" glance
# service glance-registry restart
# service glance-api restart
//////////// NOVA Controller ////////////////
# apt install nova-api nova-conductor nova-consoleauth \
              nova-novncproxy nova-scheduler nova-placement-api
# grep -v ^# /etc/nova/nova.conf|grep -v ^$
[placement]
os_region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://controller:35357/v3
username = placement
password = openstack
# openstack user create --domain default --password-prompt placement
# openstack service create --name placement --description "Placement API" placement
# openstack role add --project service --user placement admin

# openstack endpoint create --region RegionOne placement public http://controller:8778
# openstack endpoint create --region RegionOne placement internal http://controller:8778
# openstack endpoint create --region RegionOne placement admin http://controller:8778

# su -s /bin/sh -c "nova-manage api_db sync" nova
# su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova
# su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova 109e1d4b-536a-40d0-83c6-5f121b82b650
# nova-manage db online_data_migrations
# su -s /bin/sh -c "nova-manage db sync" nova

# nova-manage cell_v2 list_cells

# service nova-api restart
# service nova-consoleauth restart
# service nova-scheduler restart
# service nova-conductor restart
# service nova-novncproxy restart
//////////// NOVA Node ////////////////
# grep -v ^# /etc/nova/nova.conf|grep -v ^$
[placement]
os_region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://controller:35357/v3
username = placement
password = openstack

# service nova-compute restart
# openstack hypervisor list
# su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
# grep -v ^# /etc/nova/nova.conf|grep -v ^$
[scheduler]
discover_hosts_in_cells_interval = 300
# openstack catalog list
# nova-status upgrade check

/////////////// Neutron Controller /////////////
# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
# service nova-api restart
# service neutron-server restart
# service neutron-linuxbridge-agent restart
# service neutron-dhcp-agent restart
# service neutron-metadata-agent restart
/////////////// Neutron Node /////////////
# service nova-compute restart
# service neutron-linuxbridge-agent restart
/////////////// Cinder Controller /////////////
# su -s /bin/sh -c "cinder-manage db sync" cinder
# service cinder-scheduler restart
# service cinder-api restart
/////////////// Verify ///////////////////////
# service nova-api restart
# openstack extension list --network

 

ScaleIO Installation

ScaleIO Gateway Deployment

#yum install -y gcc gcc-cpp gcc-c++ ncurses-devel openssl
#yum install java-1.8.0-openjdk -y
#GATEWAY_ADMIN_PASSWORD=P@swrd123 rpm -i ./EMC-ScaleIO-gateway-2.0-7120.0.x86_64.rpm --nodeps
  • SDS
# rpm -ivh EMC-ScaleIO-sds-2.0-7120.0.el7.x86_64.rpm
# systemctl enable sds.service
# systemctl start sds.service
  • SDC
    • CentOS
# rpm -ivh EMC-ScaleIO-sdc-2.0-7120.0.el7.x86_64.rpm
#/opt/emc/scaleio/sdc/bin/drv_cfg --add_mdm --ip 10.62.50.81,10.62.50.82,10.62.50.83 
#/opt/emc/scaleio/sdc/bin/drv_cfg --query_mdms  
#systemctl enable scini
    • ESXi

1. Set the acceptance level of your host to PartnerSupported, by typing:

#esxcli software acceptance set –level=PartnerSupported

2. Install the SDC VIB, by typing the following:

# esxcli software vib install -d <full_path_to_VIB>

3. Reboot the ESX host. The SDC will not automatically boot at this point. It is required to update the SDC GUID and MDM IP address parameters:

– GUID, for example: 12345678-90AB-CDEF-1234-567890ABCDEF

Note: GUID (globally unique identifier) is a 128-bit structure that is used when there are multiple systems or clients generating IDs that needs to be unique. GUID should be unique to avoid collision. Please avoid using the same GUID with the difference of some digits. Please search the internet to create random GUIDs. One such example is http://www.guidgen.com/

– MDM IP addresses. It is required to define multiple MDM clusters, each with multiple IP addresses.

4. To update the SDC parameter, type the following command:

#esxcli system module parameters set -m scini -p “IoctlIniGuidStr=<GUID> IoctlMdmIPStr=<MDM_IPs>”

EX:

#esxcli system module parameters set -m scini -p “IoctlIniGuidStr=3e140b31-6b2c-4e31-a0ae-660b59b64089 IoctlMdmIPStr=10.62.50.81,10.62.50.82,10.62.50.83”

5. Back up the parameters, by typing the following:

#/bin/auto-backing.sh

6. Load the SDC module, by typing the following:

#esxcli system module load –m scini  

7. Login to ScaleIO Primary MDM cluster by executing the following command

#scli –-login –-username  

8. Create ScaleIO volume by typing the following command:

 #scli --add_volume --volume_name esx26_vol02 --storage_pool_name defaultSP --protection_domain_name default --size_gb 80
9. Create VMkernel network, Map the ScaleIO volume to the SDC node by typing the following command:
#scli --query_all_sdc  
#scli --map_volume_to_sdc --volume_name esx26_vol01 --sdc_id c329e83100000011

10.  Create VMware datastores on the ESX host where the volume is mapped.(VMFS or NFS)

Others Command :

#scli --add_volume --protection_domain_name default --storage_pool_name default --size_gb 2048 --volume_name Lab_Infra  
#scli --unmap_volume_from_sdc --sdc_id 76c6c40100000000 --volume_name Lab_Infra02   
#scli --add_storage_pool --protection_domain_name default --storage_pool_name OpenStack
#scli --add_sds --sds_ip 10.62.50.88 --protection_domain_name Openstack01 --storage_pool_name OpenStack_pool01 --device_path /dev/sdb --sds_name sio07 --force_clean

BROCADE FC Switch Command Line

Default UserName : admin/password
##### Basic Configuration ##### 
SW6505:admin>switchshow
SW6505:admin>ipAddrShow
SW6505:admin>ipAddrSet
SW6505:admin>licenseshow
SW6505:admin>cfgshow
SW6505:admin>zoneshow
SW6505:admin> zonecreate "STOR_A", "1,0; 1,1; 1,4; 1,5"
SW6505:admin> zonecreate "STOR_B", "1,2; 1,3; 1,6; 1,7"
SW6505:admin> zoneremove "STOR_B","1,2"
SW6505:admin> cfgadd "CFG_1", "STOR_A; STOR_B"
SW6505:admin> cfgenable "CFG_1"
SW6505:admin> cfgsave
###Other Command:
SW6505:admin>ZoneAdd
SW6505:admin>cfgadd
SW6505:admin> alicreate "H230.122_Port1","1,0"

##### Reset Password of Brocade 300B ##### 
# Console login switch and reboot
# Press "ESC" in 4 seconds
# Select Options 3
# Setup Single User like below:
=> setenv OSLoadOptions "single"
# printenv for confirm, then Save it and boot
=> printenv
=> saveenv
=> boot
#remount / partition
sh-2.6# mount -o remount,rw /
# Mount the another partition different with the last command
sh-2.6# mount /dev/hda2 /mnt 
#passwddefault command to reset all passwords
sh-2.6# /sbin/passwddefault
#Reset Load options to "quiet;quiet" and reboot
sh-2.6# bootenv OSLoadOptions "quiet;quiet"
sh-2.6# reboot -f
# Login with admin account using default password

Conference :http://blog.gptnet.net/?p=407

#### Setting domain ID #####
#licenseshow
#switchDisable
#configure 
### Enter y after the "Fabric param" prompt.
Fabric param (yes, y, no, n): [no] y
Domain: (1..239) [1] 3
###Complete the remaining prompts or press Ctrl+D to accept the remaining settings without completing all the prompts.
#switchEnable

			

Create Oracle DB for vCloud

OS : CentOS6

[root@cnlaboradb02 ~]#vim /etc/profile
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=cnlaboradb02.ccoe.lab.emc.com
export ORACLE_UNQNAME=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=orcl
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
[root@cnlaboradb02 ~]#yum install -y gcc gcc-c++ glibc-common glibc-devel glibc-headers 
[root@cnlaboradb02 ~]#yum install -y libaio-devel libgcc unixODBC-devel ksh
[root@cnlaboradb02 ~]#groupadd -g 54321 oracle
[root@cnlaboradb02 ~]#groupadd -g 54322 dba
[root@cnlaboradb02 ~]#groupadd -g 54323 oper
[root@cnlaboradb02 ~]#useradd -u 54321 -g oracle -G dba,oper oracle
[root@cnlaboradb02 ~]#usermod -a -G wheel oracle
[root@cnlaboradb02 ~]#passwd oracle
[root@cnlaboradb02 ~]#mkdir -p /u01/app/oracle/product/12.1.0/db_1
[root@cnlaboradb02 ~]#chown -R oracle:oracle /u01
[root@cnlaboradb02 ~]#chmod -R 775 /u01
[root@cnlaboradb02 ~]vim /etc/sysctl.conf
kernel.shmmax = 4294967295
kernel.shmall = 2097152
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
[root@cnlaboradb02 ~]#sysctl -p
[root@cnlaboradb02 ~]#vim /etc/security/limits.conf 
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
[root@cnlaboradb02 ~]#visudo
oracle ALL=(ALL) NOPASSWD: ALL
[root@cnlaboradb02 ~]#vim /etc/security/limits.d/90-nproc.conf 
* - nproc 16384
root soft nproc unlimited
[root@cnlaboradb02 ~]yum install -y tigher-vncserver xorg-x11-utils
[root@cnlaboradb02 ~]chkconfig vncserver on
[root@cnlaboradb02 ~]chkconfig NetworkManager off
[root@cnlaboradb02 ~]service vncserver start
[root@cnlaboradb02 ~]vncpasswd
[root@cnlaboradb02 ~]vim /etc/sysconfig/vncservers
VNCSERVERS="1:root 2:oracle"
VNCSERVERARGS[1]="-geometry 1028x768"
VNCSERVERARGS[2]="-geometry 1028x768"

[root@cnlaboradb02 ~]# yum groupinstall -y "Desktop"
[root@cnlaboradb02 ~]#su - root
[oracle@cnlaboradb02 ~]$ vncpasswd 
[oracle@cnlaboradb02 ~]$ vim .bash_profile
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=cnlaboradb02.ccoe.lab.emc.com
export ORACLE_UNQNAME=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=orcl
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

#Download Oracle and unzip it 
[oracle@cnlaboradb02 ~]$jar -xvf linuxamd64_12c_database_1of2.zip 
[oracle@cnlaboradb02 ~]$jar -xvf linuxamd64_12c_database_2of2.zip 

# Connect host by VNC view in oracle user
[oracle@cnlaboradb02 ~]$xhost +
[oracle@cnlaboradb02 ~]$ cd database/
[oracle@cnlaboradb02 ~]$ ./runInstaller
# Begin Installation Process:
1.Create and configurature a database
2.Server class
3.Single instance database installation
4.Advanced install
5.Enterprise Edition
6.General Purpose/Transaction Pocessing
7.Global database name : orcal
  Oracle system identiifer(SID) : orcl
8.Use the same password for all accounts
9.Choose oracle account for every options in Operating system Groups.
10.Install Product
#Switch to root
# cd /
# ./u01/app/oralnventory/orainstRoot.sh
# ./u01/app/oracle/product/12.1.0/db_1/root.sh  /// /usr/bin for local bin directory
# vim /etc/oratab /// like below
orcl:/u01/app/oracle/product/12.1.0/db_1:Y
11. Finish installation 
EM Database Express URL as : https://cnlaboradb02.ccoe.lab.emc.com:5500/em
[root@cnlaboradb02 ~]# Reboot Server

[root@cnlaboradb02 ~]#su - oracle
[oracle@cnlaboradb02 ~]$lsnrctl start
[oracle@cnlaboradb02 ~]$sqlplus / as sysdba
[oracle@cnlaboradb02 ~]$# startup

#If listener does not start, you need to replace the domain name with local IP address 127.0.0.1 in below file.
[root@cnlaboradb02 ~]#vim /u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora
LISTENER =
 (DESCRIPTION_LIST =
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
 (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
 )
 )
[oracle@cnlaboradb02 ~]$sqlplus / as sysdba
SQL> startup
SQL> drop user vcloud cascade;
SQL> drop tablespace CLOUD_DATA including contents and datafiles;
SQL> Create Tablespace CLOUD_DATA datafile '/oradata/oracle/oradata/orcl/cloud_data1.dbf' size 1500M autoextend on;
SQL> Create user vcloud identified by vCloud0000 default tablespace CLOUD_DATA;
SQL> grant CONNECT,RESOURCE,CREATE VIEW, CREATE TRIGGER, CREATE TYPE, CREATE PROCEDURE, CREATE SEQUENCE, CREATE MATERIALIZED VIEW to vcloud;
SQL> grant unlimited TABLESPACE to vcloud;

##### Rabbitmq Installation Process ######
#yum install epel-release
#yum install unixODBC unixODBC-devel wxBase wxGTK SDL wxGTK-gl -y
#wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
#rpm -ivh rabbitmq-server-3.7.4-1.el7.noarch.rpm
Link :
https://www.tecmint.com/setting-up-prerequisites-for-oracle-12c-installation/
https://www.tecmint.com/oracle-12c-installation-in-centos-6/

 

How to transfer SSL certificate from Linux to Windows

1.combine private key and certificate file as one file.

#cat cnlabwsus04.ccoe.lab.emc.com.key >> cnlabwsus04.pem
 #cat cnlabwsus04.ccoe.lab.emc.com.cert >> cnlabwsus04.pem

2.convert pem file as p12 file for windows platform with password.

# openssl pkcs12 -export -in cnlabwsus04.pem -out cnlabwsus04.p12
Enter Export Password:
Verifying - Enter Export Password:

3. Import new generated certification file into IIS of windows server  .

4. Select Bindings of “Default Web Site” , add “Https” and SSL Certificate just imported.

5. if SSL CA is issued by Enterprise, intermediate or internal , need import ROOT SSL CA by certmgr.msc manually.

Certmgr.msc -> Trusted Root Certification Authorities -> All Tasks -> Import

Certmgr.msc -> Enterprise Trust  -> All Tasks -> Import

6. Restart IIS service.

 

 

Avamar Related issues

  •  Turn off certificate authentication for all vCenter-to-Avamar

1. Open a command shell, and log in:
• If logging into a single-node server, log in to the server as admin.
• If logging into a multi-node server, log in to the utility node as admin.
2. Stop the MCS by typing:
dpnctl stop mcs
3. Open /usr/local/avamar/var/mc/server_data/prefs/mcserver.xml in a UNIX text
editor.
4. Locate the ignore_vc_cert preference.
5. Change the ignore_vc_cert preference setting to true.
For example:
<entry key=”ignore_vc_cert” value=”true” />
6. Save your changes.
7. Restart the MCS by typing:
dpnctl start mcs
  • Re-register AVAMAR Client

1.Open the Avamar Administrator

2.go to POLICY

3.Edit Client

4.Uncheck the option “Activated”

Control TCP Protocol by VLAN access-map

SWL02(config)#ip access-list extended tcp_smb
SWL02(config-ext-nacl)# deny tcp any any eq 445
SWL02(config-ext-nacl)# deny tcp any any eq 139
SWL02(config-ext-nacl)# permit ip any any
!
!
SWL02(config)#vlan access-map tcp_smb 181
SWL02(config-access-map)# match ip address tcp_smb
SWL02(config-access-map)# action forward
!
SWL02(config)#vlan filter tcp_smb vlan-list 181