October 3, 2017

Satellite and Vmware Sync

Posted in Redhat Satellite at 9:20 am by alessiodini

In these days I’m working a lot on Vmware 6x environment and Redhat Satellite 6.2.9

Both products must be in “sync”, otherwise customer could face subscription issues. What I’m speaking about?

For example:
[Time 0]
– A single farm with 4 esx host is added to Satellite.
– Sattelite side, all hosts are licensed with “Virtual Datacanter” subscription

[Time 1]
– ESX side one hypervisor is left out from the cluster and dismissed.
– Satellite still has 4 hosts licensed.
In this scenario the products are not in sync; for this purpose I wrote a perl script called vsync.pl.
This script will contact Satellite and Vmware obtaining both sides the ESX list and comparing them obtaining any difference. The check is double: Vmware->Satellite and Satellite->Vmware

I’m thinking about to open a GIT account uploading the script there.
This is an extract of the last run log:

Connection to host lxrp-capsule-pippo.it established
Capsule lxrp-capsule-pippo.it contains 1 farm.
ATTENTION: vcpodpippo.it is not IP address format, , the powercli query could face some error!!

Processing vcpodpippo.it
ESX podesx15.pippo.it is missing on Satellite
ESX podesx16.pippo.it is missing on Satellite
ESX podesx17.pippo.it is missing on Satellite


From the output is clear the current condition: Satellite knows three hosts less than Vmware actually has.
This is due because during the time, Vmware side the hosts number was increased and no one said anything about this task.

I was so funny to develop thi script! 😀


September 21, 2017

idrac_pwd.pl – Script for iDRAC root password change

Posted in Perl tagged , , , at 12:22 pm by alessiodini

The customer I’m working for in these days, asked me to reset a hunderd of iDRAC consoles root password because they were still using the default root/calvin credentials.

Having fun for this request, I wrote a perl script using Net::OpenSSH module. This script checks for root account index, and it changes the password using this index. If something does not work as expected, the script will let u know on which host it faced the issue.

It’s very easy to use, for example:

$ perl idrac_pwd.pl

Connection to host
Reset password succesfully executed on – index 2

That’s all!
You can download the script here.

Have fun 😀

September 12, 2017

Solaris and SPARC are dead. No more words

Posted in Solaris at 10:27 am by alessiodini

Today I’m so depressed about this…

My young dream was to work for Oracle company and with SPARC/Solaris environments.
Bye bye… 😦

September 5, 2017

How to install ansible on CentOS 7 system

Posted in Ansible tagged , , , at 8:04 am by alessiodini

Starting from a minimal CentOS installation, following I share the steps I did for ansible installation:

1) System update
# yum -y update
# init 6

2) Epel repository configuration and ansible pkg installation
# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -ivh epel-release-latest-7.noarch.rpm
# yum -y install ansible vim

3)In my case I’m using ansible for working on Vmware ESX environment so I also installed a python module:
# yum install python-pip
# pip install --upgrade pip
# pip install pyVmomi
# pip install --upgrade pyVmomi

4) On a user home directory I created .ansible.cfg for any local customization
$ touch .ansible.cfg
$ ansible --version
config file = /home/alex/.ansible.cfg
...output omitted...

5) On the same directory I created a .vimrc file automating the yaml indent spaces
$ cat .vimrc
autocmd FileType yaml setlocal ai ts=2 sw=2 et

Ansible now is ready to fire! 😀

September 4, 2017

Changing Company!

Posted in News at 1:05 pm by alessiodini

Today I resigned from my company, Assembly Data System.
Starting from 16 November I will begin to work for Sinergy and I hope to learn everything possible about storage, mixing for any project: operating systems, cloud and also storage knowledge!
At same time I’m studying for taking the next Redhat exam, I’m still planning to get RHCA level.
Let’s study more harder!! 😀

August 22, 2017

Ansible and Vmware ESX

Posted in Ansible at 8:29 am by alessiodini

In these days I’m writing a couple of playbooks using vmware_guest module.
The goal is to deliver new virtual machines and to customize them.

I faced a strange issue during my tests:

[root@ansible ~]# ansible-playbook delivery.yaml
[WARNING]: provided hosts list is empty, only localhost is available

PLAY [devops rhel creation] ************************************************************************************************************************************

TASK [rhel cloning] ******************************************************************************************************************************
fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “Network ‘1000 – – TEST (dvSwitch-Production)’ does not exists”}
to retry, use: –limit @/root/first.retry

PLAY RECAP *****************************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1

I was surprised because I got that name browsing Vmware with my Vsphere Client.
I tried again and again changing the playbook code, but finally I was able to discover the real issue.
Vmware uses special characters!!
I found this detail trying to manually add a new network interface from Vsphere Client:

Here it is the network name as I passed to playbook:

Finally the solution!

I spoke about this with my colleagues and they said me Vmware also use special characters for his internal database.

June 1, 2017

Redhat Satellite 6.2.9

Posted in Redhat Satellite at 8:10 am by alessiodini

From the last week I’m working for a new customer. Actually I mainly work on Redhat Satellite 6.2, Redhat Cluster and I hope to also work with more and more things!
I have the opportunity to work in an english speaking environment, I finally can improve my poor english!!!
Soon I will share some satellite note and procedure 😀

May 9, 2017

RHEV: How to connect to guest’s console without administration portal

Posted in Redhat Enterprise Virtualization at 11:26 am by alessiodini

Today I’m playing a bit with RHEV, and I was curious about how to connect to guests console without using web portal.
Looking on the web I found this link and it’s useful but at same time not that clear.

So, following the ticket method I was able to use the console without rhevm:

1) You need a system where u can use X. In my case I have a vm called nfs.ads.local
2) on nfs.ads.local:
# scp root@hypervisor:/etc/pki/vdsm/libvirt-spice/ca-cert.pem /root/ca-cert.pem
# yum install -y virt-viewer

3) on the hypervisor where the vm is running:
# vdsClient -s 0 list table | awk '{ print $1,$3 }'
b0718db7-308c-4631-8a34-dee367c984cf centos2
11329426-2b7e-4b02-a1de-534a745d7df5 centos1

# openssl x509 -in /etc/pki/vdsm/libvirt-spice/server-cert.pem -noout -text | grep Subject:
Subject: O=ads.local, CN=rhevh3.ads.local

# vdsClient -s 0 setVmTicket UUID PASSWORD VALIDITY
# vdsClient -s 0 setVmTicket b0718db7-308c-4631-8a34-dee367c984cf pippo 3600

4) Verify under RHEV which logical network is configured as “display”
5) Check on the hypervisor the port to connect with:

# ps -ef | grep centos2 ( look for tls-port argument )
-spice tls-port=5901,addr=

From nfs.ads.local I run:
# remote-viewer --spice-ca-file=ca-cert.pem spice://rhevh3.ads.local?tls-port=5901 --spice-host-subject="O=ads.local, CN=rhevh3.ads.local" <– these fields are from the step 3!

The password is pippo, have fun!

April 21, 2017

How to use nested virtualization under Vmware ESX 5.5

Posted in VMware at 9:59 am by alessiodini

Do you wanna play using RHEV inside ESX?
You have to verify a couple of things:

1) To enable promiscous mode ( promiscous mode is explained here )
2) To enable nested virtualization. In my case selecting option “Use Intel VT-X/AMD-V” was not enough.
I had to manually edit the vmx file adding a couple of options. You have to:

– stop the vms
– go to “Datastore and Datastore Clusters” section
– browse the datastore where you have your vms files.
– download the .vmx file
– append the options: vhv.enable = “TRUE” and vmx.allowNested = “TRUE”
– upload the .vmx file overwriting the old one
– start the vm
– connect to vm and check for /proc/cpuinfo lines

In my case I’m playing with RHEV under ESX, and after this procedure, when I ran hosted-engine –deploy I can see:

[ INFO ] Hardware supports virtualization

Nice! 😀

April 19, 2017

Got Certified!!!

Posted in Linux at 9:06 am by alessiodini

I passed the exam Redhat EX318!
Now I’m certified on RHEV as “RHCVA” – Redhat Certified Virtualization Administrator.
I have to thank a couple of friends: Giovanni Mancuso and Davide Giannlivigni, they helped me studying for the exam ( I did not take the course )

Thank you both!!!

Previous page · Next page