Monday, September 3, 2012

NETASQ: ldap export / import without external tools (ie: Ldap Browser)

Hi Folks,

so, everytime you need to manipulate the ldap db you'll find a kb, a mail, a tips saying:

Hey you need and ldap browser tool .

 

Wrong !

 

The netasq have everything inside to do this!

lets see how:

 

where is the conf file:

/var/ldap/slapd.conf

Stop the ldap server:

nstop ldap

Export the db in an ldif format:

slapd -4 -T cat -f /var/ldap/slapd.conf > /tmp/export.ldif

Modify it:

vi /tmp/export.ldif

Move the old db:

cd /data/Main/

mv Ldapbase Ldapbase.old

mkdir Ldapbase

Recreate the DB:

slapd -T add -f /var/ldap/slapd.conf -l /tmp/export.ldif
bdb_monitor_db_open: monitoring disabled; configure monitor database to enable
=> bdb_tool_entry_put: id2entry_add failed: DB_KEYEXIST: Key/data pair already exists (-30996)
=> bdb_tool_entry_put: txn_aborted! DB_KEYEXIST: Key/data pair already exists (-30996)
slapadd: could not add entry dn="o=jnprlabs,dc=cons165.magirus.com" (line=1): txn_aborted! DB_KEYEXIST: Key/data pair already exists (-30996)
_##                    11.06% eta   none elapsed            none spd 368.9 k/s
Closing DB...

Start the ldap server:

nstart ldap

Lets see if the modif is here:

slapd -4 -T cat -f /var/ldap/slapd.conf

Taht's all !!!

Friday, August 24, 2012

VMWARE: How to transform OVA files to OVF files

There is sometimes when you need to transform virtual images from one format to another ones.

There is a tool from vmware named ovftool, simple no ?

you can do with it:

ova2ovf : ova to ovf transformation

ovf2vmx: ovf to vmx transformation

And many many more !

Where to find the tool ?

http://www.vmware.com/support/developer/ovf/

The documentation:

http://www.vmware.com/support/developer/ovf/ovf21/ovftool-210-userguide.pdf

The tool itself:

http://www.vmware.com/downloads/download.do?downloadGroup=OVF-TOOL-2-1

Just a tiny Example:

i just downloaded an ova image file, and i want to publish it to vsphere.

The tool can let you push directly from ova to vsphere, but here i'll stay soft, simple. i will only transform from one format to another.

Just install the package, and add the installation path to your system path, or inside your console:

set PATH="C:\Program Files\VMware\VMware OVF Tool";%PATH%

Then just do it:

ovftool --lax file.ova newfile.ovf

The --lax option is relevant only for OVA-OVF sources files, and here is the doc:

Relax OVF specification conformance and virtual
hardware compliance checks. (For advanced
users only.)

It is a really needed option, because OVA files can have unsupported hardware saved insides (ie: xen, virtualbox...)

Using Converter:

With vmware converter you may want to convert your ova file in a vmx format, which can be a source for the tool.

ovftool --lax file.ova newfile.vmx

And then use converter.

Thursday, July 19, 2012

Traduction en Ligne ??

Bonjour,

peut-on réellement se fier aux outils de traduction qui nous sont proposé un peu partout ?

Surtout quand l'on doit écrire un texte important pour nous, pour notre avenir...

l'exemple ci-dessous vient d'un célèbre outils se basant sur un "poissons de Babel", de plus il s'agit non pas d'une demande de traduction à la volée, mais d'un encart publicitaire:

En lisant ce texte, ma confiance à très... très nettement chuté. Euh....non je ment là, je n'avais déjà pas confiance à l'origine.

For our English speakers: (i'm quite sur you will understand nothing), guys fell like us:

-------------REALLY BAD ON-THE-FLY TRANLATION---------------------------------
Hello

can we really rely on translation tools that we are offered everywhere?

Especially when one must write a text important to us, for our future...

the following example comes from a famous tools based on a "Babel fish", in addition it is not an application of translation on the fly, but an advertising insert:

By reading this text, my confidence at very... very sharply. UH.... no I ment there, I already did not have confidence in the origin.

-------------------------------------------------------------------------------------

Philippe

Tuesday, June 19, 2012

vmware esxi5.0: How to Add a driver for the card QLogic Corp SP232-based 4Gb Fibre Channel to PCI Express HBA

How to Add a driver for the card QLogic Corp SP232-based 4Gb Fibre Channel to PCI Express HBA
i know, there is various post on the net regarding this tips, but my blog is my place to put my tips :-)
So, you requested to your IT if they have a SAN card, to put on one server you just received from another service, and they send you a:
QLogic Corp SP232-based 4Gb Fibre Channel to PCI Express HBA.
No chance, this card is unsupported on the esxi5.0.
But still, you can have access to your san with it, here is howto do:

1 - Activate the card on the BIOS,
2- Connect with ssh to your ssh server
then lspci -v show us this:
000:011:00.0 Fibre Channel Serial bus controller: QLogic Corp SP232-based 4Gb Fibre Channel to PCI Express HBA
         Class 0c04: 1077:5432
And the content of the driver map is:
cd /tmp
cp /bootbank/scsi-qla.v00 /tmp/
vmtar -x scsi-qla.v00 -o  scsi-qla
tar xvf scsi-qla
cat etc/vmware/driver.map.d/qla2xxx.map
regtype=linux,bus=pci,id=1077:2400 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:2422 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:2432 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:2532 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:8001 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:8021 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:8432 0000:0000,driver=qla2xxx,class=storage
edit the file etc/vmware/driver.map.d/qla2xxx.map and add the line
regtype=linux,bus=pci,id=1077:5432 0000:0000,driver=qla2xxx,class=storage
so your qla2xxx.map will be:
cat etc/vmware/driver.map.d/qla2xxx.map
regtype=linux,bus=pci,id=1077:2400 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:2422 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:2432 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:2532 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:5432 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:8001 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:8021 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:8432 0000:0000,driver=qla2xxx,class=storage

rm scsi-qla
mv scsi-qla.v00 scsi-qla.v00.ini
tar -zcvf scsi-qla etc usr
vmtar -v -c scsi-qla -o scsi-qla.v00
cp scsi-qla.v00 /bootbank/scsi-qla.v00
That's all, restart your server and you should see, if all goes well: (note the vmhba at the end):
000:011:00.0 Serial bus controller: QLogic Corp SP232-based 4Gb Fibre Channel to PCI Express HBA [vmhba2]