0

Upgrade VMware vCloud Director for Service Providers v8.20 to v9.0.0

Now before starting this activity need to take backup for few VMs like. You can check my last blog regarding same.

Here is the link https://www.dtechinspiration.com/upgrade-vmware-vcloud-director-for-service-providers-v8-1-0-to-v8-20/

Now starting activity

 

Steps to upgrade

We are running only one vCD cell server. Here is the process:

  1. Restrict access to vCD and display a maintenance message for the duration of the upgrade.

 

0

Upgrade VMware vCloud Director for Service Providers v8.1.0 to v8.20

Today we are upgrading our vCloud Director from 8.10 to 8.20.

Now before starting this activity need to take backup for few VMs like.

  • Take Snapshot of vCloud Director VM
  • Take Snapshot of vCenter VM
  • Take Snapshot of NSX VM
  • Do the FTP backup for NSX VM
  • Take vCloud Database backup
  • Take vCenter Database backup
  • Login into vmware website and download the upgrade bin file from there
  • Copy it on vCloud Director Server using winscp software to copy this in tmp folder

 

Steps to upgrade

We are running only one vCD cell server. Here is the process:

  1. Restrict access to vCD and display a maintenance message for the duration of the upgrade.

2017-09-27 15_34_30-mRemoteNG - confCons.xml - vCenter-Cloud-D2017-09-27 15_34_48-Service Unavailable

 

2. Quiesce vCD cell servers from the Cell Management Tool.

  • cd /opt/vmware/vcloud-director/bin/
    ./cell-management-tool -u username -p password cell –status
    ./cell-management-tool -u username -p password cell –quiesce true
    ./cell-management-tool -u username -p password cell –maintenance true

3. Upgrade the vCD software on all cell servers (If you have). Do not restart vCD services until the database is upgraded.

Log in to the target server as root.

  • Go to cd /tmp folder make this vCloud file as executable
  • chmod u+x vmware-vCloud-director-distribution-8.20.0-5515092.bin

After that run this command ./vmware-vCloud-director-distribution-8.20.0-5515092.bin

If the installer detects a version of vCloud Director installed on this server that is equal to or later than
the version in the installation file it displays an error message and exits. Otherwise, it prompts you to
confirm that you are ready to proceed to upgrade this server.

 

2017-09-27 15_36_17-mRemoteNG - confCons.xml - vCenter-Cloud-D2017-09-27 15_36_23-mRemoteNG - confCons.xml - vCenter-Cloud-D2017-09-27 15_36_41-mRemoteNG - confCons.xml - vCenter-Cloud-D2017-09-27 15_36_53-mRemoteNG - confCons.xml - vCenter-Cloud-D

 

Upgrade the vCD database.

Note: Make Sure you have Database backup before upgrading Schema for database.

image

 

Go to this location: cd /opt/vmware/vCloud-director/bin/

type ./upgrade

2017-09-27 15_39_54-mRemoteNG - confCons.xml - vCenter-Cloud-D2017-09-27 15_40_24-mRemoteNG - confCons.xml - vCenter-Cloud-D

 

After that it will ask you to restart vCD server press Y.

2017-09-27 15_41_09-mRemoteNG - confCons.xml - vCenter-Cloud-D2017-09-27 15_41_43-mRemoteNG - confCons.xml - vCenter-Cloud-D

 

Restart the vCD services on the cell servers.

2017-09-27 15_42_53-mRemoteNG - confCons.xml - vCenter-Cloud-D2017-09-27 15_41_43-mRemoteNG - confCons.xml - vCenter-Cloud-D

 

If you had the vCD web console open during the upgrade, log out to clear the browser cache.

2017-09-27 15_47_00-VMware vCloud Director

Errors during and After upgrade:

 

1. First thing after upgrade vCloud Director, vCD VM not getting IP address

To resolve this issue you have to make nic UP and Down for Centos or Linux

  • ifup eth0 and ifdown eth0
  • Also known error (Due Gratuitous ARP issue)

2. After that vCenter not connecting in vCloud Director.

We discovered the connection issue was due to vCenter using TLSv1 which we needed to enable on the vCD cell by running

  • /opt/vmware/vcloud-director/bin]# ./cell-management-tool ssl-protocols -d SSLv3,SSLv2Hello

and then restarting the cell services.

To perform this activity you have to follow below steps.

  • A. Login to the vCloud Director cell via SSH as root.
  • B. Change directory to where the cell-management-tool is located.
    ># cd /opt/vmware/vcloud-director/bin
  • C. Run the tool to verify the job count and active state (true):
    ># ./cell-management-tool -u administrator cell -t
    Please enter the administrator password:
    Job count = 2
    Is Active = true
  • D. Use the quiesce feature to ensure the cell takes no new jobs
    ># ./cell-management-tool -u administrator cell -q true
    Please enter the administrator password:
  • E. Run the tool to verify the job count and active state (false):
    ># ./cell-management-tool -u administrator cell -t
    Please enter the administrator password:
    Job count = 0
    Is Active = false
  • F. Shut down the cell once the Job count = 0 and Is Active = false:
    ># ./cell-management-tool -u administrator cell -s
    Please enter the administrator password:
  • G. Stop the vCloud Director services:
    ># service vmware-vcd stop
    Stopping vmware-vcd-watchdog:        [  OK  ]
    Stopping vmware-vcd-cell:                   [  OK  ]

3. Here you need to access your vCloud Director SQL database

and run these commands. (Run these command in one go)

  • update jobs set status = 3 where status = 1;
    update last_jobs set status = 3 where status = 1;
    delete from busy_object;
    delete from QRTZ_SCHEDULER_STATE;
    delete from QRTZ_FIRED_TRIGGERS;
    delete from QRTZ_PAUSED_TRIGGER_GRPS;
    delete from QRTZ_CALENDARS;
    delete from QRTZ_TRIGGER_LISTENERS;
    delete from QRTZ_BLOB_TRIGGERS;
    delete from QRTZ_CRON_TRIGGERS;
    delete from QRTZ_SIMPLE_TRIGGERS;
    delete from QRTZ_TRIGGERS;
    delete from QRTZ_JOB_LISTENERS;
    delete from QRTZ_JOB_DETAILS;
    delete from compute_resource_inv;
    delete from custom_field_manager_inv;
    delete from ccr_drs_vm_host_rule_inv;
    delete from cluster_compute_resource_inv;
    delete from datacenter_inv;
    delete from datacenter_network_inv;
    delete from datastore_inv;
    delete from dv_portgroup_inv;
    delete from dv_switch_inv;
    delete from folder_inv;
    delete from managed_server_inv;
    delete from managed_server_datastore_inv;
    delete from managed_server_network_inv;
    delete from network_inv;
    delete from resource_pool_inv;
    delete from storage_pod_inv;
    delete from task_inv;
    delete from task_activity_queue;
    delete from activity;
    delete from activity_parameters;
    delete from failed_cells;
    delete from lock_handle;
    delete from vm_inv;
    delete from property_map;

4. Start the vCloud Director services:
># service vmware-vcd start
Starting vmware-vcd-watchdog: [ OK ]
Starting vmware-vcd-cell: [ OK ]

0

vCloud Director Series Part 6 # Installing vShield

While installing vCloud Director you have to install vShield and this is very important Component, which you have to install on Every ESXi host.

“One vCloud Networking and Security server is needed for each vCenter Server system. vCloud Networking and Security servers provide network security services and automatically deploy VMware vShield virtual appliances on demand from vCloud Director.”

Now we will see how to install vShield into vCenter Server.

1. First download vShield OVF from vmware website. (www.vmware.com)
2. Open vCenter Server and go to Deploy ovf option, options are different if you are using WebClient.

3. Locate the OVF file and Create a VM

4. it will validate the OVF and provide rest of the Information

5. Accept the EULA

6. Provide Virtual Machine name and location

7. Select the Datastore where vmdk will be stored for this VM.

8. Select the Provision

9. Provide Virtual Machine Network

10. Provide password for Web UI or CLI of vShield Manager

11. On Summary page click finish.

12. Once the installation finish you will get this message.

13. Power ON the Virtual Machine and login into it.

14. Type Setup and need to do setup like IP address and basic to use the same.

15. After that reboot the appliance/VM and open Web browser and type the IP address which you provide while setup vShield.
Note: it will give you Certificate warning click to continue and after that it will give you login screen.

16. Here you have to provide user name and password for vShield to login: Default user name and password vShield is: admin and password :default

Note: your system must have updated adobe flash player.

 

17. After login First task is adding vCenter Server. Under Lookup Service you can see vCenter click on Edit and provide your vSphere/vCenter server information.

 

 

18. After Successfully connecting you will be able to see vCenter Server inventory on the left hand side.

 

0

vCloud Director Series Part 5 # Installing VDC on Redhat

After installing Redhat OS it’s time to install VDC but before that you have to copy the vmware-vcloud-director-5.5.2-xxxx.bin.

1. Need to download WINSCP software and open the console of VDC server

2. Copy the vcloud software in prep folder which we created earlier.

3. Here the list of software under prep directory.

4. Now start installing vcloud software by using below command.

[root@vcd prep]# ./vmware-vcloud-director-5.5.2-xxxx.bin

But before that you need libXdmcp.rpm and required rpm

Required software packages

alsa-lib
libICE
module-init-tools
bash
libSM
net-tools
chkconfig
libstdc
pciutils
coreutils
libX11
procps
findutils
libXau
redhat-lsb
glibc
libXdmcp
sed
grep
libXext
tar
initscripts
libXi
which
krb5-libs
libXt

libgcc
libXtst

5. During installation i am getting above error, So how to install missing rpm.

6. Open the Redhat ISO file and copy the “Package” folder from that ISO file, Copy the package with the help of WINSCP into prep folder.

7. After that run the below command.

8. After installing rpm we can start installing vcloud director software but before that we have to clean the previous installation by using below command.

[root@vcd ]# rpm -e vmware-vcloud-director

9. Now start installing vcloud director.

[root@vcd prep]# ./vmware-vcloud-director-5.5.2-xxxx.bin

Now you will not get that error.

10. It will start installing.

11. During installation you have to provide the Certificate.ks and below details like IP address for HTTP Service IP and

 

12. and IP Proxy Server IP

13. Provide Password for Certificate.ks which we generated earlier.

14. Also Provide Database Details Which Database you want to use like Oracle or Microsoft

0

vCloud Director Series Part 4 # Generate Certificate for VDC

While installing VDC it will ask you to provide Certificate file with extension .ks. So need to Generate the Same by using Redhat Linux Server which we installed in Part 2.

1. Login into Server with root and password.
2. Create a Directory with any name, i am using prep
3. [root@vcd ~]# mkdir prep
4. After that provide the below command to generate the Certificate

Command 1: keytool -keystore certificates.ks -storetype JCEKS -storepass password -validity 9999 -genkey -keyalg RSA -alias http

In above command -storepass password is the password which you have to provide and need to provide while installing VDC.

During installation you have to provide details as you can see in below screen shot.

Command 2: keytool -keystore certificates.ks -storetype JCEKS -storepass password -validity 9999 -genkey -keyalg RSA -alias consoleproxy

0

vCloud Director Series Part 3 # Installing Database for VDC

Database is very important component for vCloud Director. It works like vCenter server database and vCloud Director cells use a database to store shared information.

Note: Before start installing VDC this database must exist and configured for vCloud Director software.

Supported vCloud Director databases

vCloud Director supports Oracle and Microsoft SQL Server databases. The most current information about supported databases is available from the VMware Product Interoperability Matrixes. ( KB 2059451 )

First we will see how to install Microsoft SQL Server 2008 R2.

1. Download the SQL Server server setup from Microsoft Website.
Link to Download: https://www.microsoft.com/en-in/download/details.aspx?id=30438

2. You can use Separate Server for the database other than vCenter Server ( Never install SQL with vCenter Server )

3. Before that check the required component like .Net 4.0 version and install the same from Server Roles & Features

4. Run the Setup to start installing.

 

Accept the Agreement and Click next.

5. Select the Features here and click next.

6. It will go to Next option Installation Rules.
7. After that it will give you option for Instance Configuration, Here you have two options like Go with Default either Provide a Name as per your Organisation. ( I will go with Default )

8. It will give you details about Disk Space requirement.
9. Under Server Configuration it will give you Option to choose or Configure Service Account for SQL Services.

Note: User either Service account or Domain Account with Admin Rights.

10. vCloud Director will work with Mixed Mode Authentication only, it will NOT work with Windows Authentication.

Provide Password for sa account
11. Choose Error reporting if you wise to send logs to Microsoft.

12. After that it will start installing.

13. After Successfully installation you will get below screen.

14. To access SQL server so that you will be able to run or create user etc. You need Console Microsoft SQL Server Management Studio (SSMS). I am using 2016 Server.

Download it From Microsoft Website.
Link to download : https://msdn.microsoft.com/en-us/library/mt238290.aspx?f=255&MSPPError=-2147217396

15. Download it and start installing.

 

16. After installation Open the Console to access SQL Server.

17. Provide the SQL Server Name and Provide User name and password to login into database server.
Once you enter into Database Server Need to do Below Task.

Run these Commands in the SQL Query and Execute. ( https://pubs.vmware.com/vcd-51/index.jsp#com.vmware.vcloud.install.doc_51/GUID-C3C2E2DA-D760-413A-AA8A-A4BC674C068F.html )

Procedure
1
Configure the database server.
A database server configured with 16GB of memory, 100GB storage, and 4 CPUs should be adequate for most vCloud Director clusters.
2
Specify Mixed Mode authentication during SQL Server setup.
Windows Authentication is not supported when using SQL Server with vCloud Director.
3
Create the database instance.
The following script creates the database and log files, specifying the proper collation sequence.
USE [master]
GO
CREATE DATABASE [vcloud] ON PRIMARY
(NAME = N’vcloud’, FILENAME = N’C:\vcloud.mdf’, SIZE = 100MB, FILEGROWTH = 10% )
LOG ON
(NAME = N’vcdb_log’, FILENAME = N’C:\vcloud.ldf’, SIZE = 1MB, FILEGROWTH = 10%)
COLLATE Latin1_General_CS_AS
GO
The values shown for SIZE are suggestions. You might need to use larger values.
4
Set the transaction isolation level.
The following script sets the database isolation level to READ_COMMITTED_SNAPSHOT.
USE [vcloud]
GO
ALTER DATABASE [vcloud] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
ALTER DATABASE [vcloud] SET ALLOW_SNAPSHOT_ISOLATION ON;
ALTER DATABASE [vcloud] SET READ_COMMITTED_SNAPSHOT ON WITH NO_WAIT;
ALTER DATABASE [vcloud] SET MULTI_USER;
GO

For more about transaction isolation, see http://msdn.microsoft.com/en-us/library/ms173763.aspx.
5
Create the vCloud Director database user account.
The following script creates database user name vcloud with password vcloudpass.
USE [vcloud]
GO
CREATE LOGIN [vcloud] WITH PASSWORD = ‘vcloudpass’, DEFAULT_DATABASE =[vcloud],
DEFAULT_LANGUAGE =[us_english], CHECK_POLICY=OFF
GO

CREATE USER [vcloud] for LOGIN [vcloud] – Provide Password as per your organisation Standard.
GO
6
Assign permissions to the vCloud Director database user account.
The following script assigns the db_owner role to the database user created in Step 5.
USE [vcloud]
GO
sp_addrolemember [db_owner], [vcloud]
GO

 

 

 

Under Database settings you will be able to see vcloud database.

0

vCloud Director Series Part 2 # Redhat Installation for VDC

Create a Machine (Virtual Machine or Physical Machine) for VDC with Redhat OS. Guest OS supported for VDC ( https://pubs.vmware.com/vcd-51/index.jsp?topic=%2Fcom.vmware.vcloud.install.doc_51%2FGUID-C258BED7-9664-4DFE-B812-100281D4D460.html )

1. First Download the Redhat Enterprise 6.2 from official Website.

Supported vCloud Director operating systems ( KB 2059451 )

CentOS 6 (64-bit) Update 4
CentOS 6 (64-bit) Update 5
Red Hat Enterprise Linux 5 (64-bit) Update 4
Red Hat Enterprise Linux 5 (64-bit) Update 5
Red Hat Enterprise Linux 5 (64-bit) Update 6
Red Hat Enterprise Linux 5 (64-bit) Update 7
Red Hat Enterprise Linux 5 (64-bit) Update 8
Red Hat Enterprise Linux 5 (64-bit) Update 9
Red Hat Enterprise Linux 6 (64-bit) Update 1
Red Hat Enterprise Linux 6 (64-bit) Update 2
Red Hat Enterprise Linux 6 (64-bit) Update 3
Red Hat Enterprise Linux 6 (64-bit) Update 4
Red Hat Enterprise Linux 6 (64-bit) Update 5

2. After that create Virtual Machine and boot from this ISO.

 

3. Follow the Steps while installing.

4. Select the Language as per your Region

5. Select Basic Storage

 

 

 

 

 

6. Provide root Password (Strong password is recommended)

7. Replace Existing Linux System

8. Select Server Type for which purpose you want to use it.

 

 

9. After installation Redhat is ready for VDC.

10. Now Start the Server to do Configuration the VDC.

11. Login with root and type “ setup “ After that it will prompt you with given option

12. First Off the Firewall by clicking spacebar on that option.

13. Now do the setup for NIC card like IP address

14. Go to “ Device Configuration “

15. VDC Required Minimum 2 NIC otherwise VDC installation will be fail.

 

During Virtual Machine Creation i Provided One Nic but after that added 2 NIC Card.

16. Here you have to provide Static IP address.

17. Configure the DNS setting aswell.

18. After that you have to Edit the cfg file for NIC0, NIC1.

Run the below command
[root@vcd ~]# ls

It will give you list of all files. Here you have to edit specific file for NIC0, NIC1

[root@vcd ~]# ls

ifcfg-nic0
ifcfg-nic1

[root@vcd ~]# vi ifcfg-nic0

First Press “ i “ without inverse for insert and then go to ONBOOT option and change to YES.
Press Esc : wq and hit enter. ( w = write and q= quite )

Same step you have to repeat for Second NIC.

0

vCloud Director Series Part 1 # Architecture

Now a days cloud is very important for multiple reason: 1. Disaster Recovery 2. OPEX Cost 3. CAPEX Cost 4. Avoiding Hardware Purchase and Maintenance etc…

How Many Solutions Available in Market as a Solution Answer is = Multiple Vender.

I am working on VMware Product for Cloud Solutions and i will create home lab to show a demonstration How to Create vCloud Director Lab.

1. First Thing Need to under stand Architecture

2. Components

3. Required Software ( vCloud Director, Redhat, vShield, Database Server {Oracle, Microsoft SQL}, vCenter Server, ESXi Host )

Image Credit to VMware
Before Creating your Home Lab You Need to Focus on downloading few Softwares. If you are using Windows then use VMware Software Manager to download all the required software.

After that You Need to Understand Design and How you will deploy Server.

Image Credit to VMware

vSphere Architecture

Image Credit to VMware

VMware vCloud Director Architecture

Image Credit to VMware

vCloud Director Web UI

Image Credit to VMware