Upload file via VMware VM Agent – Java

 

Upgrade UCS Performance Manager from 2.0.0 to 2.0.2

UCS Performance Manager is another “wonderful” product of Cisco for monitoring your physical and virtual infrastructure.

Requirements:

  • 8 vCPUs
  • 40 GB of memory

The upgrade should be easy, but it’s not. My upgrade process was stuck due to the process zenmail blocked in running mode. Then to be able to upgrade I had to open 2 shell sessions:

  • 1 with the upgrade process
  • 1 with the root shell

During the process, I have got a quick look at /mnt/cdrom/update-zenoss.sh

The script was hanging every time, it had to stop all services with serviced daemon.

After a quick look, the interesting line was: serviced service status --show-fields 'Status' 2>/dev/null | grep -v "Stopped" | grep -v "Status" | grep -v ^[[:space:]]*$

During 60 retries, the result was “Running” but to go further, it should be “Stopped”.

One service was still running every time: zenmail

To stop the zenmail process:

Select the serviceID and execute the following command:

serviced service stop 6bnlfl5qzog18j4mrnxszllyx

Then wait till the end of the upgrade process and enjoy your upgraded UCS Performance Manager (and thanks Cisco for not providing any kind of document for the upgrade …).

Cisco Prime Service Catalog – Management Console of ServiceCatalog on Active Directory

Instead of passwords managed locally,

It’s time to use an LDAP/Active Directory to be able to manage users without restarting the Prime Service Catalog.

This modification has been done on a Custom Installation of Cisco Prime Service Catalog 11.1.1 Patch 3 and should be compatible with 11.2 (future version) as well.

First, make a backup of your configuration directory (on our environment, we use git with gitlab Community Edition, to keep an history of all our modifications).

Location:  /opt/cisco-psc/wildfly-8.2.0.Final/ServiceCatalogServer/configuration

File to edit:  standalone-full.xml

Edit the section security-realm and change the subsection ManagementRealm like this:

Edith the section security-domains and add a subsection security-domain like this:

And a file AD_GroupsMapping.properties containing the mapping between a specific usersgroup and the management group in Wildfly like this:

Then restart the Service Catalog with  systemctl restart servicecatalog

And you should be able to log in with an user defined on your LDAP/ActiveDIrectory server.

Cisco Prime Service Catalog stop working after JAVA upgrade

Have a look at:  /opt/CiscoPrimeServiceCatalog  and in the directory  bin ,

open the file  setEnv.sh and you should have something like this:

and change the variable  JAVA_HOME with the new path of your JAVA jre.

Tips

Use the command  update-alternatives --display java

Take the value following the Current ‘best’ version  /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.101-2.6.6.1.el7_2.x86_64/jre

Get vmId by vmName in Cloupia Script

How to get the Virtual Machine Identity (vmId) with its name.

Create a custom task with this code:

Inputs:

  • VMname (Virtual machine Name) in a string
  • accountName (vCenter Account Name in UCS Director)

Outputs:

  • vmId (Virtual Machine Identity for UCS Director)

Cisco UCS Director – Hello World in Cloupia script

Cloupia script is THE scripting language from Cisco UCS Director.

Cloupia is a mix between Javascript and Java. The code is interpreted by Nashorn (the Javascript engine from JRE/JDK).

imporPackage has the same role as import from a pure Java code.

import java.lang.*  is in cloupia importPackage(java.lang);

Upgrade Cisco Prime Infrastructure 1.3 to 2.1

I followed this article: https://rscciew.wordpress.com/2014/08/23/prime-infrastructure-1-3-to-2-1-upgrade/

Pay attention:

  • Don’t forget to stop NCS
  • To install a patch use: “patch install”
  • To upgrade use: “application upgrade”
  • Put directly files in /localdisk/defaultRepo
  • Add the repository defaultRepo pointing to “disk: /defaultRepo/”

But before realizing this upgrade, I got several problems:

  • Not enough space on the virtual machine
    • Solved by adding a disk and playing with LVM tools.
  • Not enough memory:

  • No access to a FTP server, only SSH was available to upload files
    • So, I activated the root account (I’m pretty sure, it’s just a “sudo”) via enable_root
    • Added “PermitRootLogin Yes” in sshd_config
    • Changed the password of the root account via “passwd”
    • Restarted the sshd process via “/etc/init.d/sshd restart”
    • Launched my session via SecureCRT and uploaded patches via the SFTP tab.
  • Rollback my modifications in the sshd_config

Take a cup of coffee and wait till the upgrade is finished.

Configuration d’un téléphone 7962G en SIP

Pour mon usage personnel,

J’ai réparé un téléphone Cisco 7962G, pour ensuite le mettre sur mon PBX personnel.

Pour se faire, il y a quelques étapes à respecter:

  • Utiliser le firmware SIP42.9-1-1SR1S (Les firmwares supérieurs ne fonctionnent pas avec le fichier de configuration).
  • Ajouter la ligne suivante dans XMLDefault.cnf.xml: <loadInformation404 model=”Cisco 7962″>SIP42.9-1-1SR1S</loadInformation404>.
  • Utiliser le fichier de configuration que je vais fournir ici en modifiant les valeurs en fonction de votre environement.

Liens utiles:

  • http://adis.ca/post/using-cisco-ip-phones-with-asterisk/
  • http://www.voip-info.org/wiki/view/Asterisk+Presence+for+Cisco+79×1+Phones
  • http://forums.asterisk.org/viewtopic.php?p=166124
  • http://www.dslreports.com/forum/r26632503-Voip.ms-Cisco-7942-configuration-files
  • https://supportforums.cisco.com/docs/DOC-15799
  • http://www.voip-info.org/wiki/view/Asterisk+phone+cisco+79xx
  • https://sites.google.com/site/seppsbrainoverload/cisco-corner/cisco-voice/cp-7941g-sip-setup
  • http://www.cisco.com/en/US/products/hw/phones/ps379/products_tech_note09186a0080094584.shtml#issue5

Concepts de PAT/NAT avec Cisco ASA OS 8.3 et supérieur

Le concept de “NAT-Control” est mort, paix à son âme.
Les uns râleront, les autres seront heureux de son départ, mais ce n’est pas le but de cet article.

Je vais essayer d’être le plus clair possible quand à mes explications sur le NAT/PAT de l’ASA OS 8.3 et supérieur.

Les articles de référence sont:

La suite va suivre.

Comment sauvegarder la configuration d’un Cisco Wireless Lan Controller

En entreprise,
Il est obligatoire de faire des sauvegardes des équipements réseaux.
Cependant, les outils de sauvegarde sont souvent limités ou demandent une licence tellement exorbitante que votre patron vous demande de trouver un autre logiciel.

La configuration d’un WLC ne peut pas être sauvegardé via la console comme on pourrait le faire pour un routeur (router), un commutateur (switch) ou un pare-feu (firewall). Dans le cas du controlleur, il faut avoir à disposition un serveur FTP ou TFTP et définir un certain nombre de paramètres en console pour ensuite lancer une sauvegarde.

Voici les commandes à passer au contrôleur pour effectuer la sauvegarde sur un serveur FTP:

  • transfer upload datatype config
  • transfer upload filename <filename>
  • transfer upload path <path>
  • transfer upload mode ftp
  • transfer upload username <username>
  • transfer upload password <password>
  • transfer upload serverip <serveraddress>
  • transfer upload start
  • Y

Une fois la commande “transfer upload start” vaidée, le Y confirmera notre volonté de faire la sauvegarde, et dès que dans la console, nous recevrons le message confirmant la bonne exécution de la sauvegarde, nous pourront aller chercher le fichier dans le dossier réservé au contrôleur.