Thursday, November 26, 2009

How to enable SSH on ESXi

By default SSH on ESXi is disabled and unsupported.
If you need to access the console of ESXi, follow these steps:

  • At the console of ESXi host, press ALT-F1
  • Type unsupported in the console and then press Enter. (Text typed will not viewed)
  • If you typed correctly, you will see Tech Support Mode warning and a password prompt. Enter the password for the root login.
  • Enter the command “vi /etc/inetd.conf
  • Find the line that begins with #ssh (you can search with pressing “/”) and remove the # (press the “x” on the character #). Save the file by typing “:wq!”
  • Restart the management service “/sbin/services.sh restart”

Friday, August 28, 2009

How to run ESX4 as VM on VMWare Server 2.0

I know that virtualize an hypervisor is so strange. But i needed to understood esx4 functionality. Here are steps to test it on virtual environment. Note that is only for demo or training purpose.

  • Launch VMWare Server Home Page
  • Create New Virtual Machine with following option
        • Name: ESX4
        • Guest Operating System : Linux operating system Other Linux (64-bit)
        • CPU Count: 1
        • Memory Size: 2048MB (minimum requirements)
        • Hard Disk: 100GB
        • Network Adapter: Bridged
        • CD/DVD Drive: Use a Physical Drive
        • Floppy Drive: Don’t Add a Floppy Drive
        • USB Controller: Don’t Add a USB Controller

image

  • Select Advanced tab on Configure VM and add following parameters (for further information about these parameters look at Running Nested VMs by Jim Mattson)

image

  • Select Console tab and start virtual machine
  • When prompting click the console screen to view the virtual machine
  • From Devices menu, select CD/DVD Drive and select disconnect on Server
  • From Devices menu, select CD/DVD Drive and select Connect to Disk Image File (.iso)…

image

  • Select Yes when prompted and connect to the ESX installation ISO file.
  • Click on virtual machine and press enter to start installation process.

image

  • Follow any on-screen instruction to complete installation.
  • Once installation is complete you are able to test your new VMWare ESX4.

Wednesday, August 26, 2009

vSphere Web Access

After installing ESX4, Web Access service isn’t active. The vmware-webAccess service is off by default in ESX4.

To start it run the command

service vmware-webAccess start

Also, to check it run

service vmware-webAccess status

image

To enable VMware webAccess upon reboot, run the command:

chkconfig --level 345 vmware-webAccess on

To check run state, run the command

chkconfig --list vmware-webAccess

The output may be

vmware-webAccess 0:off 1:off 2:off 3:on 4:on 5:on 6:off

Friday, July 24, 2009

Robocopy Exit Codes

Return codes list that are used by the Robocopy utility:

  • 0 No files were copied. No failure was encountered. No files were mismatched. The files already exist in the destination directory; therefore, the copy operation was skipped.
  • 1 All files were copied successfully.
  • 2 There are some additional files in the destination directory that are not present in the source directory. No files were copied.
  • 3 Some files were copied. Additional files were present. No failure was encountered.
  • 5 Some files were copied. Some files were mismatched. No failure was encountered.
  • 6 Additional files and mismatched files exist. No files were copied and no failures were encountered. This means that the files already exist in the destination directory.
  • 7 Files were copied, a file mismatch was present, and additional files were present.
  • 8 Several files did not copy.
  • Any value greater than 8 indicates that there was at least one failure during the copy operation.

Here are a full details of the return codes that could be in a batch file:
if errorlevel 16 echo ***FATAL ERROR*** & goto end
if errorlevel 15 echo FAIL MISM XTRA COPY & goto end
if errorlevel 14 echo FAIL MISM XTRA & goto end
if errorlevel 13 echo FAIL MISM COPY & goto end
if errorlevel 12 echo FAIL MISM & goto end
if errorlevel 11 echo FAIL XTRA COPY & goto end
if errorlevel 10 echo FAIL XTRA & goto end
if errorlevel 9 echo FAIL COPY & goto end
if errorlevel 8 echo FAIL & goto end
if errorlevel 7 echo MISM XTRA COPY & goto end
if errorlevel 6 echo MISM XTRA & goto end
if errorlevel 5 echo MISM COPY & goto end
if errorlevel 4 echo MISM & goto end
if errorlevel 3 echo XTRA COPY & goto end
if errorlevel 2 echo XTRA & goto end
if errorlevel 1 echo COPY & goto end
if errorlevel 0 echo –no change– & goto end
:end

For Robocopy Syntax see http://technet.microsoft.com/en-us/library/cc733145(WS.10).aspx

WSS 3.0 Search cli command

A shortest list of stsadm to control wss 3.0 search service

  • stsadm -o spsearch -action list
    list of all the current WSS Search service settings
  • stsadm -o spsearch -action stop
    stop WSS Search service
  • stsadm -o spsearch -action stop [-f]
    stop WSS Search service and remove all index files
  • stsadm -o spsearch -action start
    start WSS Search service
  • Stsadm -o spsearch -action fullcrawlstart
    start a full crawl of content
  • Stsadm -o spsearch -action fullcrawlstop
    stop a full crawl of content

Wednesday, July 15, 2009

P-Miner?!?!

General purpose performance analyzer and collector?

SNMP protocol is so interesting. With that you are able to “trap” a lot of parameters about network devices. Generally it used to monitoring servers, switch or any other device that are on classical IT infrastructure or it used to collect performance parameters, too. But…

…but there are a lot of other area (not strictly IT competence) that have a lot of network (and heterogeneous) devices that they expose a lot of interesting parameters to collect.

Generally monitoring and performance tools are designed to collect information for servers, switch, ups, application, …

Well, is there a product that can acquire parameters through SNMP and, at the same time, is flexible and specially is cross “area”?

We needed a product to collect performance parameters (and some value, too) from a lot of different devices. Like servers, applications, network devices, general purpose probes, PLC, and any other devices used in industrial plants.

Market search answer do not satisfied our necessity, and…

We realized that!

We haven’t invented nothing, we have devised “only” a new approach!

What’s P-Miner?

P-Miner is our idea of general purpose performanceuntitled and “value” collector. It’s based on a series of embedded modules that can acquire any type of metrics from any type of SNMP-devices through the lan.

The innovation is that the system contain a special expression language that can permit to acquire, correlate and analyze different kind of data.

image

With this approach the system may read a value (throw SNMP MIB) and afterwards elaborate and represent its in a suitable mode. Also…

With similar regular expression you may set alarms condition on captured data, like this

untitled

All data, alarms, errors and so could be viewed in two graphical mode. The first is a view with value plotted on a various time interval diagram.

untitled
The second view, called “synoptic view”, represents items status.

pminer_synoptic2

Items status are defined with preconfigured rules or personal rules (via regular expressions). With this view, in a single sight, P-Miner show which device are not working properly or is in the state that pay attention. Operators can tag any items to create a small and basically history of device.

Obviously, P-Miner is completely configurable and is Vendor independent. Specific vendor probe are not necessary, you can build your probe simply with SNMP query analyzer and regular expression.

Actually P-Miner is on-line in some customers and collect metrics on Microsoft/Linux servers and Microsoft/java application servers, switches, PLC, UPS and automation applications in critical environment, specially in industrial plants.

http://tinyurl.com/pminerbrochure

Monday, June 15, 2009

CdG

Map picture

Tuesday, June 9, 2009

SQL Mirror Session

Mirroring session consist in the relationships between partner servers and witness. To understand how database mirror session work and states of databases is possible to inspect data from catalog views (sys.database_mirroring for principal or mirror, sys.database_mirroring_witnesses for witness).

The following query return the description of mirror session about principal or mirror databases:
SELECT
    DB_NAME(database_id) AS 'DatabaseName'
    , mirroring_role_desc
    , mirroring_safety_level_desc
    , mirroring_state_desc
    , mirroring_safety_sequence
    , mirroring_role_sequence
    , mirroring_partner_instance
    , mirroring_witness_name
    , mirroring_witness_state_desc
    , mirroring_failover_lsn
FROM sys.database_mirroring
WHERE mirroring_guid IS NOT NULL;

The following query return the description of mirror session about witness instance:
SELECT
    Database_name
    , safety_level_desc
    , safety_sequence_number
    , role_sequence_number
    , is_suspended
    , is_suspended_sequence_number
    , principal_server_name
    , mirror_server_name
FROM sys.database_mirroring_witnesses;

RFID Tag Memorandum

clip_image001

Wednesday, June 3, 2009

CdG

Map picture

Monday, May 18, 2009

Ctrl-Alt-Delete shutdown Linux

Do you know that if you push Ctrl-Alt-Delete on your linux will halt?
without login.

Now you know!

This is write on /etc/inittab file (inittab file describes which processes are started at bootup and during normal operation).

To disable Ctrl-Alt-Delete shutdown, open inittab file

# vi /etc/inittab

Search the line like this

ca:12345:ctrlaltdel:/sbin/shutdown -t3 -r now

Comment out the line with hash mark (#). Save the file end exit.

reboot the system to take effect or type command

# init q

Friday, May 15, 2009

FQDN error message during SQL2005 Mirroring Setup

Starting Mirroring after GUI configuration you receive the error “One or more of server network addresses lack a fully qualified domain name (FQDN). Specify the FQDN for each server, and click Start Mirroring again.”

This error occur because server cannot qualify computername (example 2 server on workgroup without dns configured).
In this case when you reach the following dialogbox

StartingMirroring

click on 'DO NOT START MIRRORING' and than edit this three fields.untitled Replace value with the IP address.

At the end if you start mirroring will function correctly.

PS forcing FQDN with host file resolution don’t function.

Thursday, May 7, 2009

CdG

Map picture

Robocopy & /fft parameter

Robocopy is very powerful utility with a lot of cli switch. Especially /MIR.

/MIR option activates mirror mode (i.e. deleting files in the destination that are not present in the source).

In some case may be necessary to use /FFT (FAT File Times) switch combined to /MIR.

Some third-party operating systems say that their volumes are NTFS, but only implement FAT-style file times with a 2 second granularity. When copying to such a destination from a true NTFS volume, file time rounding may occur, along with unnecessary copying of file data in subsequent jobs. If you encounter this situation, you can use the /FFT (FAT File Times) switch to tell Robocopy to consider file times to be identical if they are within 2 seconds of each other, even though both source and destination appear to be NTFS. This eliminates unnecessary copying in this scenario.

Snippet from http://www.readynas.com/forum

Wednesday, March 4, 2009

TiQ Speach

Don’t forget our TiQ speach at Microsoft ALM Day!

We’ll show our experience on Visual Studio Team System and Team Foundation Server in industrial environment.

Info at http://www.microsoft.com/italy/alm/eventi/almday.mspx

Wednesday, January 21, 2009

Configure MOSS 2007 FBA with LDAP Provider

In SharePoint 2003 only Active Directory authentication method was supported. MOSS2007 allow a range of authentication types.
The authentication types available on MOSS2007 are:
Windows
Kerberos
NTLM
Forms
Active Directory Provider
Active Directory Application Mode (ADAM)
SQL Membership Provider
LDAP Provider
Custom Provider
Web Single Sign-On
Active Directory Federation Services (ADFS)
3rd part Identity Management Systems

In these scenario I will use LDAPMembershipProvider to configure Forms authentication.
Follow these steps:

- Identify the subdirectory that is associated with the Central Administration site and associated with your site
- Open web.config files of both sites (the provider information must be added on both files)
- Above the tag <system.web> add following section to define a connection to LDAP

<membership defaultProvider="LdapMembership"> 
      <providers>
        <add name="LdapMembership" type="Microsoft.Office.Server.Security.LDAPMembershipProvider, Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" server="ldap_srv1.cadario.biz" port="389" useSSL="false" userDNAttribute="distinguishedName" userNameAttribute="cn" userContainer="ou=cadauser,dc=cadario,dc=biz" userObjectClass="user" userFilter="(ObjectClass=user)" scope="Subtree" otherRequiredUserAttributes="sn,givenname,cn" connectionUsername="cn=test_conn,ou=cadauser,dc=cadario,dc=biz" connectionPassword="mypwd&9876" />
      <providers>
      </membership>

- Save and close both files
- On command prompt execute iisreset
- Open Central Administration site and click on Application Management tab
- Under the Application Security section, click on Authentication Providers
- Be sure that correct web application in selected
- On the Authentication Providers page, click the link associated with the zone
- In the Edit Authentication page, on Authentication Type section select Forms
- In Membership Provider Name section type Membership Provider Name (LdapMembership is the name of the provider that I wrote in the web.config file)
- Click on save button
- Click on Application Management tab
- Under the Application Security section, click on Policy for Web application
- Be sure that correct web application in selected
- Click on Add User
- Select the zone that you previously modify (in the Authentication Providers page)
- In the next page add user (test_conn) and click on check name (note that account name displayed is LdapMembership:test_conn)
- Choose Full Control in the Choose Permission section
- Click on Finish button

Saturday, January 17, 2009

Changing SharePoint Central Administration port

SharePoint 2007 chooses a random port for Central Administration Site.
With stsadm command is possible to change Central Administration port number on MOSS 2007/WSS 3.0.
To change port, go to
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
Enter command
stsadm -o setadminport -port <<port_number>>
After a bit of time you will receive on command prompt
Operation completed successfully.

That's all!

Friday, January 9, 2009

Sharepoint Query String

Sometimes, during Sharepoint administration, the Edit Page button won't appear.
In this case is possible to insert, directly in the URLs, the parameters listed below:
Edit Mode -> Mode=Edit
View Mode -> Mode=View
Personal Mode -> PageView=Personal
Shared Mode -> PageView=Shared
Add Web Parts/Browse -> ToolPaneView=2
Add Web Parts/Search -> ToolPaneView=3
For example:
http://mysite/default.aspx?mode=edit&PageView=Shared
http://mysite/default.aspx?ToolPaneView=2&PageView=Personal

Also, to go on Site Settings insert in the URLs _layouts/settings.aspx
http://mysite/_layouts/settings.aspx
http://mysite/subsite/_layouts/settings.aspx