How to add Python Path in Windows Environment Variables

I got to do this when I need to migrate my customer's Nexus 1000v to the VMWare vDS. Go through the migration documents, first step is to install Python and add the python to the Windows Environment Variable.

Python version is 2.7.
My Windows Version = Windows Server 2008 R2 Enterprise

To add python into the Windows environment variable and then start the python from command prompt.

Go to the
  1. Go to Control Panel>System and Security>System.
  2. Select Advanced system settings.
  3. Select Environment Variables as shown in following figure.
  4. Under system variable, Click New
  5. Add first variable as 
    1. Variable Name = PATH
    2. Variable Value = C:\Python27;%PATH%
  6. Add second variable as
    1. Variable Name = PYTHONPATH
    2. Variable Value = %PYTHONPATH%;C:\Python27
Click OK to save newly added two variables, open command prompt window and type python and you should be on the Python prompt. 



vDS operation failed on host xxxxxxx.domainname, got (vmodl.fault.SystemError) exception

This error occurs repeatedly while adding ESXi host to the Nexus 1000v. The problem seems with the VMWare Update Manager (VUM) that it doesn't initiate the required VEM module for the installation on the ESXi host we are adding to the Nexus 1000v.

I solved my problem by manually installing the .vib file on the ESXi host. And here are the steps to follow.

Go to the Nexus 1000v through web browser

You get list of links to download files, download your required .vib file from there. for me it was Cisco_bootbank_cisco-vem-v340-esx_5.2.1.3.2.8.0-6.0.1.vib

Upload that vib file to the ESXi host with WinSCP, say in the /tmp folder

Run following command to install the .vib file .i.e. the vem module.

esxcli software vib install -v /tmp/Cisco_bootbank_cisco-vem-v340-esx_5.2.1.3.2.8.0-6.0.1.vib

After the .vib file has been installed successfully, add the ESXi host to the Nexus 1000v.

Unable to See and add new ESXi hosts in Nexus 1000v


After the VMWare upgrade from 5.x to 6.x and Nexus 1000v upgrade from 4.2 to 5.2 you are unable to add new hosts into the Nexus 1000v distributed switch, although the older hosts are seed added to the N1Kv distributed switch and running fine without any issues.

This happens because Nexus 1000v has no knowledge of new versions of vCenter Server in its postgress database.

You have to manually add the new version in the vCenter database to support the new Version.

First you need to log in the the VCDB on command line, and for that you need to find the userID and password.

To get the userID and password, open C:\ProgramData\VMware\vCenterServer\cfg\vmware-vpx\vcdb.properties

vcdb.properties file contents should look like this

driver = org.postgresql.Driverdbtype = PostgreSQLurl = jdbc:postgresql://localhost:5432/VCDB
username = vcpassword = {FNr2Aad>ws8Xo<Qpassword.encrypted = false

Grab the username and password (default userID happend to be "vc" and the password

To add the new version

Go to this Path on DOS Prompot
C:\Program Files\VMware\vCenter Server\vPostgres\bin\

Run Command
C:\Program Files\VMware\vCenter Server\vPostgres\bin>psql -U vc VCDB
Enter password as found above in the the file at C:\ProgramData\VMware\vCenterServer\cfg\vmware-vpx\vcdb.properties
Password for user vc:

Show database
SELECT * FROM VPX_DVS_COMPATIBLE;

Insert the new version into the database with follwoing command
insert into VPX_DVS_COMPATIBLE VALUES
(42,'esx','6.0+');
(42,'embeddedEsx','6.0+');

Here 42 is the device ID and can be seen in the first column of the output of command
SELECT * FROM VPX_DVS_COMPATIBLE;

Again show the database bases, it should now list the support for vCenter 6.0+ version.

Show database
SELECT * FROM VPX_DVS_COMPATIBLE;

You should see the New vCenter version has been added to the database.

Exit the Database command prompt by typing \q

Restart the vCenter Server and add the hosts to Nexus 1000v normally.

Reset multiple User passwords in iRedmail with Python Script

Just found a built in python script for resetting passwords of multiple mail users with one go. This python script came with the installation of iRedmail.
You can find the python scrip at this path 

/etc/www/iredadmin/tools/update_password_with_csv.py

All you have to do is to create a csv file in excel and put username+domain and password in plain text, as per below

postmaster@networkpcworld.com 12345678

Put the password in same cell with space and DO NOT put the password in another cell, otherwise the script wouldn't run. 

Save the CSV file with any name, here we put the name as new_passwords.csv 

Now upload the CSV to ired mail server on same path /var/www/iredadmin/tools/

Run the python scrip with the uploaded file with below command.

python /var/www/iredadmin/tools/update_password_with_csv.py new_passwords.csv

You have successfully reset the password for all required email user account.

Unable to Increase Screen Size (Pixels) Ubuntu

I have installed Ubuntu Desktop 16.04.4 on ESXi 6.0.
Tried to increase the pixel density so that i can view the big Screen on my other 27 inch screen through VMWare client.

I tried installing open-vmtools but remained unsuccessful.

Then installed VMWare tools by mounting through VMWare client (tools that come with ESXi 6.0 but again remained unsuccessfull.

The third try was to download latest VMtools from VMWare website, uploaded to uploaded to the /tmp folder of ubuntu through WinSCP server and then installed as per given procedure on VMWare website.

I shut down the Ubuntu VM

Increase the Video Card Memory from Default to 16 MB.

Restarted Virtual Machine, this time I was getting bunch of options for increasing screen size of the Ubuntu Display and successfully running my VM at  resolution of 1440x900 (16:10).


gns3 error --- cannot start console applications

cannot start console applications: [WinError 2] The system cannot find the file specified.


I got this error, upon checking I found that I had not installed wireshark during installing gns3. Installed wireshark separately and the error is gone. I did no configuration except installing wireshark. 
I can see and capture traffic on gns3 device's interfaces by just right clicking any interface and then clicking "start wireshark".

what is transparent bridging

The term bridging refers to a technology in which a device known as a bridge connects two or more LAN segments. Bridges are OSI Data Link layer, or Layer 2, devices that were originally designed to connect two network segments. Multiport bridges were introduced later to connect more than two network segments, these devices analyze the frames as they come in and make forwarding decisions based on information in the frames themselves.

Bridges learn the location of the network stations without any intervention from a network administrator or any manual configuration of the bridge software. This process is commonly referred to as self−learning.

When a bridge is turned on and begins to operate, it examines the MAC addresses located in the headers of frames passed through the network. As the traffic passes through the bridge, the bridge builds a table of known source addresses, assuming the port from which the bridge received the frame is the port to which the device is a sending device is attached.

Bridges are called transparent bridges because their presence and operation are transparent to network hosts. Transparent bridges learn and forward packets in the transparent manner as described above.
·

Unable to Perform Image Update on the Adapter 2 Intel Corp UCSC-PCIE-ID10GF

While applying Service Profile to newly discovered UCS Rack Servers (UCSC-220M5L)  getting this error " Unable to Perform Image Update ...