Upgrading vCloud Usage Meter 3.2 / 3.3 / 3.5

In this post, I will walk you through how to upgrade to UM3.2 / 3.3.

    1. Upgrading Usage meter 3.2 / 3.3 from Usage Meter 2.3.2 to 3.1.0
    2. Upgrading Usage meter 3.3 from Usage Meter 3.2

 

Upgrading Usage meter 3.2 / 3.3 from Usage Meter 2.3.2 to 3.1.0
UM3.2 supports import data from following versions only, 
 vCloud Usage Meter 2.3.2
 vCloud Usage Meter 3.0.0
 vCloud Usage Meter 3.0.2
 vCloud Usage Meter 3.1.0

.[info title=”Note”]if you are having older version then you must upgrade to supported version and then upgrade to 3.2[/info]

Steps for Import:

Flow:

 
 
UM3.2Upgrade

Detailed Steps:

    1.  Download the new Usage Meter Appliance from here  (3.2) & 3.3:
    2.  Deploy and power on new appliance
    3.  Assign IP address
    4.  Go to Old Appliance and enable SSH
      service <span class="mceItemHidden" data-mce-bogus="1"><span class="hiddenSpellError" pre="service " data-mce-bogus="1">sshd</span></span> start
    5.  Go to new appliance and run command
       <span class="mceItemHidden" data-mce-bogus="1"><span class="hiddenSpellError" pre="" data-mce-bogus="1">importum</span></span> <IPADDRESS> <OldVersion>
       vCloud Usage Meter 2.3.2 -->  232
       vCloud Usage Meter 3.0.0 --> 300
       vCloud Usage Meter 3.0.2 --> 302
       vCloud Usage Meter 3.1.0 --> 310
       <span class="mceItemHidden" data-mce-bogus="1"><span class="hiddenSpellError" pre="" data-mce-bogus="1">importum</span></span> xx.xx.xx.xx 232 
    6.  After successful completion, go to the UM 3.2 console and verify if you have all the data
    7. Power off and delete the old Appliance

 

Upgrading vCloud Usage meter from 3.2 to 3.3:
  1. Download vCloud Usage Meter 3.3 Updater from here
  2. Transfer the patch file, usage-meter-330-update.zip to /root in the appliance
  3. Unzip usage-meter-330-update.zip
  4. Enter cd usage-meter-330-update
  5. Enter ./update-um
  6. Appliance is upgraded to 3.3 GA.
    What to do next

    Monitor results to ensure continuous data collection.

Upgrading vCloud Usage meter from 3.2 / 3.3 to 3.5:
  1.  Download the new Usage Meter Appliance 3.5  from here
  2.  Deploy and power on new appliance
  3.  Assign IP address
  4.  Go to Old Appliance and enable SSH
    service <span class="mceItemHidden" data-mce-bogus="1"><span class="hiddenSpellError" pre="service " data-mce-bogus="1">sshd</span></span> start
  5.  Go to new appliance and run command
     <span class="mceItemHidden" data-mce-bogus="1"><span class="hiddenSpellError" pre="" data-mce-bogus="1">importum</span></span> <IPADDRESS> <OldVersion>
     vCloud Usage Meter 3.3.3 --> 333
     vCloud Usage Meter 3.4.0 --> 340
  6.  After successful completion, go to the UM 3.2 console and verify if you have all the data
  7. Power off and delete the old Appliance / Keep backup

 

[Revision]
27-Dec-2013 – Initial post
5-June-2014 – Updated instructions for UM 3.3

21 Dec-2016 – Updated instructions for UM 3.5

 

 

This post first appeared on the Virtualization Express blog at virtualizationexpress.com, by Karthic Kumar .
Copyright © 2014 – VirtualizationExpress . All rights reserved. Not to be reproduced for commercial purposes without written permission.
Advertisements

vCloud Startup Issue

vCD service fails to start for numerous reasons, if you understand what exactly it requires to start the vCD service then you may resolve the issues. I tried explaining what happens when you start the vCloud director services. Below is the workflow that I understood from my experience

Start-up Flow:

Startup

vCloud Director uses JAVA OSGI, which is Java Open Services Gateway Initiative (OSGi) defines an architecture for developing and deploying modular applications and libraries.

To know more about OSGI you may refer wiki article here. What we need to understand is, OSGI is a Container or Folder which has its own sub/internal components. OSGI should be completely up and running for vCloud to properly function.

To begin with check the troubleshooting checklist first. Detailed information can be found below.

Verifying IP/FDQN:

Check if the RHEL cell is configured with proper FQDN and make sure point to a valid DNS address. This is the initial requirement, 2 IPs, one for vCloud HTTP traffic and 2nd one for console proxy, of-course it wouldn’t allow you to install vCloud director application if you do not have 2 nics / ips. There may be chances that NIC might have removed by mistake

 Certificate:

SSL certificate is a crucial requirement for vCloud director since it is a enterprise application and it is used largely by public service providers. The customers / clients / end-user should be confident that their connectivity is secured and encrypted so that a intruder cannot access the packets.Check if the certificates are valid and updated. you may run the below command in the vCloud director server (RHEL / Centos with vCloud Installed).

#opt/vmware/vcloud-director/jre/bin/keytool -storetype JCEKS -storepass <em>passwd</em> -keystore certificates.ks -list

To know more about creating / validating certificates, check below VMware KB.

 

http://kb.vmware.com/kb/1026309

NTP Issues:
Make sure all the  below components are properly synced with NTP server.
  • vCenter Server
  • vShield Manager
  • All vCloud Cells
  • vCloud DB
 DB Connectivity  Issues:
vCD stores all its information in the database, the main reason behind this is clustering and load balancing. you can have more than one vCloud director cell for load balancing and faster access. So if you have more than one vCloud cell then all the cells must have proper connectivity to the Database. At present vCD support Oracle and MSSQL, check the vmware interop matrix for supported versions.Verify the vCD cell can communicate with DB server, may be try a basic test.To know the configured DB for vCloud, you may  check in the global.properties file, there are lot of information in global.properties but we need only the database properties, you may run below command
#grep database.jdbcUrl /opt/vmware/vcloud-director/etc/global.properties

After you get the DB FQDN /IP, perform telnet with respective port to check the connectivity 

#telnet <DB_SERVER> 1433 (MSSQL)
#telnet <DB_SERVER> 1521 (Oracle)

Sometimes vCD can connect to the DB server but it is not enough, the user must have DB_Owner privileges to the vCloud Database. if there is permission issue for the DB user, the OSGI container may start but you cannot access the vCloud UI, it shows a blank grey screen. To find such errors, you can verify cell.log for detailed information.

Reviewing vCloud cell.log
Sometimes the vCD services are fully started but you may see a blank/black screen in the vCD GUI, the first place to look vCD startup issue is
$VCLOUD_HOME/logs/cell.log.

Below is an example of a fully started cell.log file so you can use it to compare.  This log re-writes every time the application restart, you may use this as reference.

 

Application startup begins: MM/DD/YY HH:MM AM
Successfully bound network port: 80 on host address: 192.168.110.xxx
Successfully bound network port: 443 on host address: 192.168.110.xxx
Application Initialization: 9% complete. Subsystem 'com.vmware.vcloud.common.core' started
Successfully connected to database: jdbc:oracle:thin:@Oracle01.test.local:1521/orcl
Successfully bound network port: 443 on host address: 192.168.110.yyy
Successfully bound network port: 61616 on host address: 192.168.110.xxx
Successfully bound network port: 61613 on host address: 192.168.110.xxx
Application Initialization: 18% complete. Subsystem 'com.vmware.vcloud.common-util' started
Application Initialization: 27% complete. Subsystem 'com.vmware.vcloud.consoleproxy' started
Application Initialization: 36% complete. Subsystem 'com.vmware.vcloud.vlsi-core' started
Application Initialization: 45% complete. Subsystem 'com.vmware.vcloud.vim-proxy' started
Successfully verified transfer spooling area: /opt/vmware/cloud-director/data/transfer
Application Initialization: 54% complete. Subsystem 'com.vmware.vcloud.backend-core' started
Application Initialization: 63% complete. Subsystem 'com.vmware.vcloud.imagetransfer-server' started
Application Initialization: 72% complete. Subsystem 'com.vmware.vcloud.rest-api-handlers' started
Application Initialization: 81% complete. Subsystem 'com.vmware.vcloud.ui.configuration' started
Application Initialization: 90% complete. Subsystem 'com.vmware.vcloud.jax-rs-servlet' started
Application Initialization: 100% complete. Subsystem 'com.vmware.vcloud.ui-vcloud-webapp' started
Application Initialization: Complete. Server is ready in 0:46 (minutes:seconds)
Successfully initialized ConfigurationService session factory
Successfully started scheduler
Successfully started remote JMX connector on port 8999

vCloud Director Troubleshooting.

I started working with vCloud director from its initial release (vCloud 1.0) and I was thinking to write an article about the vCloud director troubleshooting for very long time but finally vCloud director(vCD) is going to die oops..I.e it is getting better and better , have a look at below articles
 
 
still it’s not late to write, as per the VMware KB2057589 support for vCD 5.5 is available till Q3 2017 and vCD 5.1 till Sep 2014.
 

What is in this post ?

Troubleshooting , resolving vCloud director issues are complex and tricky, there are no straight forward method to resolve those issues (For Ex:Go ahead just “Restart the service”, “Reboot the server” won’t work with vCloud director) . It needs more  patience and calm approach. To understand the behavior, it is important to understand all the components / services in the vCloud. I tried explaining my way of  approach, below are the topics I covered which I feel it is essential to read.

 
 

 

vCD & its components

You must understand what is vCloud director, what it can do, how it can be used to implement IaaS (Infrastructure as a Service) , there are numerous blog-post and references explaining what is vCloud director (vCD), some of them which I think it is important to read  are listed below.

 

vCloud Training :

 
I hope the above links will make clear about vCD, I would like to cover troubleshooting part of vCD, simply I listed the software components that makes vCD which is required for troubleshooting.
 

Components:

These are the collective software components which makes vCloud 
vCloud director
vCloud Networking and Security (Formerly vShield Manager)
vCenter Server
ESX(i)
vCenter Chargeback manager (optional)

 

vCD Cell Architecture:

 
To begin with vCD troubleshooting, one must understand its Architecture and components. I have summarized the component architecture and how it is connected.
Readers should keep this architecture diagram in mind. To approach an issue in vCD, for example if you are not able to view the vCloud director UI, it should strike that JAVA OSGI should be completely UP and running to access the UI, likewise the below diagram explains the internal connectivity and its relationship.
CellArchitechture
 
 
I have listed only the required components for troubleshooting, to know more about the vCD architechture review the below VMware KB.
 
Internal Components of vCD:
 

vCloud Cell is a Supported Linux Server with vCloud director software installed.

 

Transfer Service is involved when a user in vCloud director uploads a OVF / Media to their allocated resources

 

Console Proxy is proxy service for VMRC- Virtual Machine Remote Console, this component re-directs the VMRC from the ESXi host to vCloud director UI.

 

VC Proxy / Cell Listener service  is agent which sends / receives updates from the vCenter server, like power on/off VM, Create VM…Etc…

 

Active MQ – Message Bus is communication bus between multiple vCloud cells, it is for synchronization.


vCD log components:

 
If you encounter any issues in vCD you must review the logs  to find the cause and resolve the issue.
 
Login to your vCD cell via SSH (Often Putty) and navigate to vCD installation directory i.e /opt/vmware/vcloud-director/
 
Note: $VCLOUD_HOME is the environment variable for the vCloud director installation folder, use this to go to the location.
 
Example cd $VCLOUD_HOME/logs
 
These are the logs that will be useful in reviewing the vCD issues.

cell.log Start up log.
vcloud-container-debug.log  Debugging log messages from the cell
vcloud-container-info.log Warnings or errors in the cell
vmware-vcd-watchdog.log Log of the Watchdog service – which restarts the vCD service if it hangs or stops
 
Required services for vCloud director
  • vCenter services
  • VMware SSO services (Including all dependent services) (Applies on vCenter 5.1 and above)
  • VMware vSphere Profile-Driven storage Service  (Applies on vCenter 5.1 and above)
  • vShield Manager
  • vCloud services (vmware-vcd)

vCD Troubleshooting Checklist:

These are the common items must take into consideration before we begin troubleshooting

vCD Components:
  • vCenter and its DB
  • vCloud and its DB
  • vShield Manager
Check List:
  • Time Sync – Check if the time is synchronized of all vCD components
  • Name Resolution – Check if the vCD components are resolved by its FQDN
  • Valid SSL certificate on all vCD components
  • Connectivity between all vCD components
    • Perform Ping, telnet, netcat test to validate
  • Synchronization – Check if the synchronization of all vCD components
    • In vCloud director –> System tab –> vSphere resources –> vCenter, see if there is tick mark in the Status bar
    • In vCloud director –> System tab –> Cloud Resources –> Cells, check if the vCenter proxy is running
    • In vShield manager –> Configuration — >vCenter, Check the last inventory sync, it should contain the latest time stamp

 

vCD Issues:

 
Below listed issues are most common issues I have seen in vCloud Director.
  • Service Start-up Issue
  • VMRC Issues
  • Ovf Upload issue
  • Networking issues ..ahem
  • Resource allocation issues
  • Multi Cell and Load balancer
  • Guest Customization
  • Connectivity issues
    • vCenter
    • vShield
PS: I have published only the vCD startup issue, I am working on others and will publish shortly. 
 
This post first appeared on the Virtualization Express blog at virtualizationexpress.com, by Karthic Kumar +.
Copyright © 2013 – VirtualizationExpress +. All rights reserved. Not to be reproduced for commercial purposes without written permission.

How to backup and restore of vCloud Usage Meter DB

Backup / Restore of vCloud Usage Meter DB

In this post, I explained how to backup/restore the vCloud Usage meter DB that I found through surfing, collectively it took me more than 60+ minutes to find the steps.

Any one can use this post regardless of the Usage Meter version.

 

To Backup: 


– Login to Usage Meter appliance as root  and run following commands

#su - postgres 



#cd /opt/vmware/vpostgres/xx/bin/


(xx = Version of the postgres, it varies version to version)

#./pg_dump usage_meter_db >> /tmp/dbbackup


To Restore: 

Take a snapshot of the VM before restoring

Login to Usage Meter appliance as root  and run following commands

su - postgres 



cd /opt/vmware/vpostgres/xx/bin/


(xx = Version of the postgres, it varies version to version)

./dropdb usage_meter_db


(Delete the existing DB

./createdb usage_meter_db


(Create a empty DB)

psql usage_meter_db < /tmp/dbbackup


(Restore DB)

or

sudo -u postgres </span>/opt/vmware/vpostgres/xx/bin/psql usage_meter_db &lt; /tmp/dbbackup<span> usage_meter_db


(xx = Version of the postgres, it varies version to version)

 

This post first appeared on the Virtualization Express blog at virtualizationexpress.com, by Karthic Kumar +.
Copyright © 2013 – VirtualizationExpress +. All rights reserved. Not to be reproduced for commercial purposes without written permission.

Active user sessions in vCloud Director

Unlike user Sessions in vCenter there is no method to check in vCloud GUI, but we can get the information from the vCloud DB.

Requirement: DB Access to the vCloud DB

Query to find the number of Active users: Run the below query against vCloud DB.

select username,fullname,email,date_last_accessed from usr,user_session where usr.user_id = user_session.user_id;

Output:

 

vCloud Director & vShield Training – VMware Free Course Material

Here are some great Training from VMware university for free

Click the below links to register

http://vmwarelearning.com/y79/vcloud-director-concepts-and-architecture/

VMware vCloud Director Fundamentals [V5.5]

vCloud Networking and Security Fundamentals [V5.5]

vCloud Director 1.5

vShield Fundamentals

VMware vShield Edge Fundamentals [V5.X]

VMware vShield App Fundamentals [V5.X]

 

Other great free courses offered by VMware University.

http://mylearn.vmware.com/portals/www/mL.cfm?menu=topfreecourses&p=1

vCloud Director Maximums 1.5 / 5.1 / 5.5

vCloud Director Maximums 1.5 / 5.1 / 5.5

When I troubleshoot issues, multiple customers inquired about vCloud director maximums, usually I refer them KB and Documents. I just decided to do comparision of both vCloud versions and post it here, I believe it should be useful for others and especially me for my own reference.

Please note that you cannot achieve the maximums in all categories at the same time, so make sure to understand how the limits apply to your use cases.

Release
vCloud Director 1.5 vCloud Director 5.1 vCloud Director 5.5
Total Virtual Machines 20000 30,000 50,000
Powered-on Virtual Machines 10000 10,000 30,000
Total vApps ?? 30,000 30,000
Virtual Machines per vApp 128 128 128
ESX/i Hosts 2000 2,000 3,000
vCenter Servers 25 25 20
Total Users 10000 10,000 25,000
Concurrent Users ?? 1,500 1,500
Logged-in Users ?? 5,000 5,000
Total Organizations 10000 10,000 10,000
Users per Organization ?? 1,000 1,000
vApps per Organization 500 3,000 3,000
Virtual Datacenters (VDCs) 5000 10,000 10,000
Resource Pools per VDC ?? 32 32
Datastores 1024 1,000 1,024
Concurrent Virtual Machine Consoles 100 500 500
Logical Networks 10156 10,000 10,000
vApp Networks 2987 1,000 1,000
External Networks 524 512 512
Isolated VDC Networks 2264 2,000 2,000
Direct VDC Networks 2000 10,000 10,000
Routed VDC Networks 2376 2,000 2,000
Gateways NA 1,000 1,000
Network Pools 10 40 40
Catalogs 1000 10,000 10,000
Media 1000 1,000 1,000
Independent Disks NA 1,000 1,000
Storage Classes NA 50 50
Storage Pods NA 100 100