Showing posts with label vmware. Show all posts
Showing posts with label vmware. Show all posts

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.

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]

Wednesday, November 4, 2009

vmware - esx - tips en vrac

Create the /dev/vmnet* files:


mknod -m 600 /dev/vmnet0 c 119 0
mknod -m 600 /dev/vmnet1 c 119 1
mknod -m 600 /dev/vmnet2 c 119 2
mknod -m 600 /dev/vmnet3 c 119 3
mknod -m 600 /dev/vmnet4 c 119 4
mknod -m 600 /dev/vmnet5 c 119 5
mknod -m 600 /dev/vmnet6 c 119 6
mknod -m 600 /dev/vmnet7 c 119 7
mknod -m 600 /dev/vmnet8 c 119 8
mknod -m 600 /dev/vmnet9 c 119 9

effacer /etc/vmware/not_configured

editer /etc/init.d/vmware


dans la fonction vmware_start_vmnet.

for i in `seq 0 9`; do
    if [ ! -c /dev/vmnet$i ];then
    mknod -m 660 /dev/vmnet$i c 119 $i > /dev/null 2>&1
done

if [ ! -e /dev/vmmon ];then
mknod /dev/vmmon c 10 165 > /dev/null 2>&1
fi



Ma config SA5K:

/usr/bin/vmnet-bridge -d /var/run/vmnet-bridge-0.pid /dev/vmnet0 br1
/usr/bin/vmnet-natd -d /var/run/vmnet-natd-8.pid -m /var/run/vmnet-natd-8.mac -c /etc/vmware/vmnet8/nat/nat.conf
/usr/bin/vmnet-netifup -d /var/run/vmnet-netifup-vmnet1.pid /dev/vmnet1 vmnet1
/usr/bin/vmnet-netifup -d /var/run/vmnet-netifup-vmnet8.pid /dev/vmnet8 vmnet8
/usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet8/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet8/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet8.pid vmnet8
/usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet1/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet1/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet1.pid vmnet1
/usr/bin/vmnet-bridge -d /var/run/vmnet-bridge-2.pid /dev/vmnet2 br0


création de l'interface physique:

/usr/bin/vmnet-netifup -d /var/run/vmnet-netifup-vmnet2.pid /dev/vmnet2 vmnet2
ifconfig vmnet2 up

vmnet0 ==> bridge br1
vmnet1 ==> private lan + nat
vmnet2 ==> bridge br0
vmnet8 ==> private lan ( host only )


##################################################################################################
Comment faire pour ajouter un binding sur une interface physique dans vmware server ???

si l'interface physique est br0, si le vmnet est vmnet2:
ajouter la ligne suivante dans /etc/vmware/locations:
answer VNET_2_INTERFACE br0


##################################################################################################
Comment faire pour ajouter un virtual-switch dans vmware server ???


si le swith sera vmnet3:
ajouter les lignes suivante dans /etc/vmware/locations:
answer VNET_3_HOSTONLY_HOSTADDR 172.16.133.1
answer VNET_3_HOSTONLY_NETMASK 255.255.255.0



##################################################################################################
si vous voulez activer le dhcp sur ce switch:

faire:
mkdir /etc/vmware/vmnet3/dhcpd
cp /etc/vmware/vmnet3/dhcpd/dhcpd.conf /etc/vmware/vmnet1/dhcpd/dhcpd.conf
modifier le fichier /etc/vmware/vmnet3/dhcpd/dhcpd.conf

et ajouter les lignes suivante au fichier /etc/vmware/locations:
directory /etc/vmware/vmnet3
directory /etc/vmware/vmnet3/dhcpd
file /etc/vmware/vmnet3/dhcpd/dhcpd.conf 1222099462
file /etc/vmware/vmnet3/dhcpd/dhcpd.leases


##################################################################################################
si vous voulez activer le NAT sur le switch:
mkdir /etc/vmware/vmnet3/nat


cp /etc/vmware/vmnet8/nat/nat.conf /etc/vmware/vmnet3/nat/nat.conf
modifier le fichier /etc/vmware/vmnet3/nat/nat.conf

et ajouter les lignes suivante au fichier /etc/vmware/locations:
answer VNET_3_NAT yes
directory /etc/vmware/vmnet3/nat
file /etc/vmware/vmnet3/nat/nat.conf 1222099405

##################################################################################################
# /usr/lib/vmware/net-services.sh status
Bridged networking on /dev/vmnet0 is running
Host-only networking on /dev/vmnet1 is running
Bridged networking on /dev/vmnet2 is running
Host-only networking on /dev/vmnet3 is not running
NAT networking on /dev/vmnet3 is not running
Host-only networking on /dev/vmnet8 is running
NAT networking on /dev/vmnet8 is running