Virtualization Technology (VT) is a set of enhancements to CPU that improve performance for running a virtual machine by offloading some of the work to the new cpu extensions. Both AMD and Intel have CPU that support this technology.

In some cases it will be very usefule to know if your system can handle it.

It will be very simple from a Linux system because you should only take a look to /proc/cpuino looking for one of the following value :

  • vmx – (intel)
  • svm – (amd)

You can use grep to quickly find if either value exists in the file by running the following command:

egrep ‘(vmx|svm)’ /proc/cpuinfo

If your system supports VT, then you’ll see vmx or svm in the list of flags.

My system has four quad core AMD processors, so I’ll find the following repeated from 16 times :

My system has two processors, so there are two separate sections:

flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt

VT technology can still be disabled in your computer’s BIOS, however, so you’ll want to check there to make sure that it hasn’t been disabled. The flags in cpuinfo simply mean that your processor supports it.

VT is required to run 64-bit guests using Hypervisor like VMware Server or others similar products.

Hope this help

Bye
Riccardo

Print This Post Print This Post

This post will explain how to create users and mailboxes for Zarafa.

I’ve tested it with CentOS 5.4 X86_64 and Zarafa 6.30.9 but it will fit with nearly all installation.

First of all you have to create a test file with all the users you want to create, providing the following information :

  • username
  • password
  • email address
  • name
  • surname

For example :

johndoe   password    johndoe@example.com    John    Doe
janedoe    password   janedoe@example.com     Jane     Doe

Save the text file whatever you want.

The following is the shell script that read your text file and create all Zarafa users.

If you use the script, all the users will not be administrator, so you have to create manually and administrator.


#!/bin/bash
# Written by Matteo Predieri - m.predieri_AT_damsistemi_DOT_it
# Written by Riccardo Riva - r.riva_AT_damsistemi_DOT_it
#
# Simple and raw script to create zarafa users and mailboxes from a test file
#
# The full fill-in of the text file is mandatory
# So fill in both "Name" and "Surname" with the following syntax
#
# username    password    email    name    surname
#

USERS_LIST=/tmp/userlists.txt
ZARAFA_CMD=/usr/bin/zarafa-admin
LOGFILE=/tmp/zara_user_creation.log

echo "Zarafa User Creation Log" > $LOGFILE
what="user";

for item in $( cat $USERS_LIST ); do

 if [ $what = "user" ]; then
 user=$item;
 what="passwd";
 else
 if [ $what = "passwd" ]; then
 passwd=$item;
 what="email";
 else
 if [ $what = "email" ]; then
 email=$item;
 what="name";
 else
 if [ $what = "name" ]; then
 name=$item;
 what="surname";
 else
 surname=$item;

 echo "Result in creating User: $user, with password: $passwd, with email address: $email with Full Name: $name $surname :" >> $LOGFILE
 FULLNAME="'$name $surname'"
 $ZARAFA_CMD -c $user -p $passwd -e $email -f "$FULLNAME" -a0 >> $LOGFILE
 echo -ne  "-------------------------------\n" >> $LOGFILE
 what="user";
 fi

 fi
 fi

 fi
done

# --- End of file ---

You’ve done.

Hope this help

Bye
Riccardo

Print This Post Print This Post

The following was MY results !

The Nerd Test Evaluation Report
We’re sorry, but you are not a nerd, you are a geek.

Social:
Taking tests like this is probably the only way you can score.
Health:
The surgeon general warns that high cholesterol may promote arteriosclerosis.
Aptitude:
You don’t seem to have any skills whatsoever.
Career:
You should consider becoming a manager.

You sould find the test here :

http://folk.uio.no/gisle/fun/nerd.html

Bye
Riccardo

If you have a standalone VMware ESX 4 unmanaged or you haven’t yet configured VMware Update Manager, and you want to update it, you should do the following.

Download the update package from VMware Web Site : ESX-4.0.0-update01.zip

Copy it to your ESX Server 4 (i.e. on /tmp).

Connect to your ESX Server with SSH or to a local console.

Execute :


esxupdate --bundle=ESX-4.0.0-update01.zip update

Hope this help

Bye
Riccardo

Print This Post Print This Post

Hi all,

unfortunately I’m trying Windows 7 as my primary notebook OS (obviously on a Virtual Machine) and the main problem I’ve found was the inability to run VMware Vsphere client.

As you can see below, the client was installed correctly without any errors :

Vsphere Client 01

Vsphere Client 01

When attempting to run the client I’ve received the following errors and I was unable to proceed in any way :

“Error parsing the server “<server name” “clients.xml” file.”

Vsphere Client 02

Vsphere Client 02

and “The type initializer for ‘VirtualInfrastructure.Utils.HttpWebRequestProxy’ threw an exception”.

Vsphere Client 03

Vsphere Client 03

Luckily there have been a few good VMware communities forum posts .

Follow these 4 basic steps and you should use the client in a couple of minutes.

Step 1.

Download this DLL called system.dll

*Note:  This DLL is usually found in the  %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\  directory of a non Windows 7 PC with  .NET v3.5 SP1 installed.

Step 2.

Once downloaded copy it in the “C:\Program Files\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\lib” directory.  If the ‘lib’ directory doesn’t exist, create it and copy the dll file into it.

Step 3.

Edit the “VpxClient.exe.config” file which can be found in the “C:\Program Files\VMware\Infrastructure\Virtual Infrastructure Client\Launcher” directory and add the following three lines to it in the location specified in the screenshot below.  Then save the changes.

<runtime>
<developmentMode developerInstallation>
</runtime>
Vsphere Client 04

Vsphere Client 04

Vsphere Client 05

Vsphere Client 05

Step 4.

From the Windows 7 ‘System Properties’ click the ‘Advanced’ tab and then the ‘Environment Variables’ button as we want to add a new ‘System’ variable.

Create a new ‘System’ variable called ‘DEVPATH’ and assign the following variable value:

C:\Program Files\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\Lib

Vsphere Client 06

Vsphere Client 06

Vsphere Client 07

Vsphere Client 07

You are now ready to start using the VMware vSphere Client on your Windows 7 machine!

If you have any problem, try to run it as “Administrator”.

Hope this help

BySome people have reported having to run the client as an ‘Administrator’ so if you are having difficulties it may pay toe

Riccardo

Print This Post Print This Post

From : SevenForums.com

By default Quick Launch is disabled in Windows 7. This will show you how to enable or disable Quick Launch on the taskbar in Windows 7 as a toolbar with small or large icons.

Quick Launch is used to open a program quickly from a shortcut on the taskbar. In this case in a toolbar The Quick Launch folder is located at the hidden system folder location (step 2) of:

C:\Users\(user-name)\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch

read more …

Hope this help

Bye
Riccardo

Karmik Koala is coming …. are you ready ?

for the impatience, you can download the beta from here :

http://www.ubuntu.com/testing/karmic/beta

Bye

Riccardo

This how-to will explain how to use LDAP authentication to Microsoft Active Directory with an IPSEC VPN to a Fortinet device.

I’ve tested it with a Fortigate 60B and a Fortigate 100A with success.
This post assume you have a fully function VPN IPSEC configuration on your fortinet device with authentication based on a Fortigate group.

Connect to your device with SSH (or as you prefer, even with the web browser), and login as “admin”.

From the console insert the following :


config user ldap
 edit "GroupName"
 set server "my.adserver.ip.address"
 set cnid "sAMAccountName"
 set dn "ou=xxx,dc=yyyy,dc=zzzz"
 set type regular
 set username "domain\\Administrator"
 set password ENC *******************************************
 next
end

Where :
- “GroupName” will be a lable of the Auth Group
- cnid will be the common name identifier, with this syntax you check the AD login name
- dn will be your LDAP tree path to reach the Organization Unit on which your users are
- type regular will be the authentication type
- username will be an account who can read your AD ldap tree (you should, and it will be better, use an account different than Administrator).
- password will be the password of tha account above

Then edit your local group with the following command

config user group

locate your VPN group and add the LDAP group created before.

Test it with a Fortinet VPN Client (http://www.fortinet.com/products/forticlient/)

Hope this help

Bye
Riccardo

Print This Post Print This Post

This is a simple shell script that count all files in a local directory and all subdir. It doesn’t care what extention the file has, it will just recursively go through each directory and count any files within it, plus recurse into any more directories it finds. Give it as a parameter the directory you want to count.


#!/bin/sh
NUMBER=0
count ()
{
for temporary in $1/* ; do
if [ -d "$temporary" ] ; then
count "$temporary"
elif [ -f "$temporary" ] ; then
NUMBER=$(($NUMBER+1))
fi
done
}
count $1
echo "I found $NUMBER files, in the specified folder and all subfolders"

I know you should also did it with

ls -R | wc -l

but it was a shell exercise.

Hope this help

Bye
Riccardo

Print This Post Print This Post

This wuold be a simple reminder for the most common tips for VI or VIM.
It would not be a deep dive on it, simply a memo for the most common feature used by me.

Search and replace a string in a document :
:.,$s/search_string/replacement_string/g

Disabling highlighted patterns :
Type “:nohl” to disable highlighting

Comment out several lines at once (I like that one) :
1. Ctrl + V (visual block)
2. Select the lines you want to be commented out
3. Shift + I (insert mode)
4. Add the “#” character on the first line
5. Press escape

Copy and paste several lines :
1. Shift + V (visual line)
2. Select the lines
3. Press “yyN” (N lines yanked), for example to copy 3 lines use “yy3″
4. Go where you want the block to be pasted and press “p”

Cut and paste several lines :
1. Let’s say you want to cut 3 lines, put your cursor on the first of the 3 lines
2. Type : 3dd
3. Locate your cursor where you want the block to be pasted
4. Type “p”

Some key combinations :
dd : Delete current line
D : Delete from cursor to end of line
d$ : Delete from cursor to end of line
d0 : Delete from cursor to beginning of line
dw : Delete from cursor to end of current word
db : Delete from cursor to beginning of current word
yy : Copy current line (use “p” to paste)

Here’s a great cheatsheet from http://www.worldtimzone.com/res/vi.html

Cursor movement

* h – move left
* j – move down
* k – move up
* l – move right
* w – jump by start of words (punctuation considered words)
* W – jump by words (spaces separate words)
* e – jump to end of words (punctuation considered words)
* E – jump to end of words (no punctuation)
* b – jump backward by words (punctuation considered words)
* B – jump backward by words (no punctuation)
* 0 – (zero) start of line
* ^ – first non-blank character of line
* $ – end of line
* G – Go To command (prefix with number – 5G goes to line 5)

Note: Prefix a cursor movement command with a number to repeat it. For example, 4j moves down 4 lines.
Insert Mode – Inserting/Appending text

* i – start insert mode at cursor
* I – insert at the beginning of the line
* a – append after the cursor
* A – append at the end of the line
* o – open (append) blank line below current line (no need to press return)
* O – open blank line above current line
* ea – append at end of word
* Esc – exit insert mode

Editing

* r – replace a single character (does not use insert mode)
* J – join line below to the current one
* cc – change (replace) an entire line
* cw – change (replace) to the end of word
* c$ – change (replace) to the end of line
* s – delete character at cursor and subsitute text
* S – delete line at cursor and substitute text (same as cc)
* xp – transpose two letters (delete and paste, technically)
* u – undo
* . – repeat last command

Marking text (visual mode)

* v – start visual mode, mark lines, then do command (such as y-yank)
* V – start Linewise visual mode
* o – move to other end of marked area
* Ctrl+v – start visual block mode
* O – move to Other corner of block
* aw – mark a word
* ab – a () block (with braces)
* aB – a {} block (with brackets)
* ib – inner () block
* iB – inner {} block
* Esc – exit visual mode

Visual commands

* > – shift right
* < – shift left
* y – yank (copy) marked text
* d – delete marked text
* ~ – switch case

Cut and Paste

* yy – yank (copy) a line
* 2yy – yank 2 lines
* yw – yank word
* y$ – yank to end of line
* p – put (paste) the clipboard after cursor
* P – put (paste) before cursor
* dd – delete (cut) a line
* dw – delete (cut) the current word
* x – delete (cut) current character

Exiting

* :w – write (save) the file, but don’t exit
* :wq – write (save) and quit
* :q – quit (fails if anything has changed)
* :q! – quit and throw away changes

Search/Replace

* /pattern – search for pattern
* ?pattern – search backward for pattern
* n – repeat search in same direction
* N – repeat search in opposite direction
* :%s/old/new/g – replace all old with new throughout file
* :%s/old/new/gc – replace all old with new throughout file with confirmations

Working with multiple files

* :e filename – Edit a file in a new buffer
* :bnext (or :bn) – go to next buffer
* :bprev (of :bp) – go to previous buffer
* :bd – delete a buffer (close a file)
* :sp filename – Open a file in a new buffer and split window
* ctrl+ws – Split windows
* ctrl+ww – switch between windows
* ctrl+wq – Quit a window
* ctrl+wv – Split windows vertically

Hope this help

Bye
Riccardo

Print This Post Print This Post

The following is a great memo for a lot of bash shortcuts.

Original link : HowToGeek

CTRL Key Bound

Ctrl + a – Jump to the start of the line
Ctrl + b – Move back a char
Ctrl + c – Terminate the command
Ctrl + d – Exit the current shell
Ctrl + e – Jump to the end of the line
Ctrl + f – Move forward a char
Ctrl + h – Same as backspace
Ctrl + k – Delete to EOL
Ctrl + l – Clear the screen
Ctrl + r – Search the history backwards
Ctrl + R – Search the history backwards with multi occurrence
Ctrl + t : Swap the last two characters before the cursor
Ctrl + u – Delete backward from cursor
Ctrl + w : Delete the word before the cursor
Ctrl + xx – Move between EOL and current cursor position
Ctrl + x @ – Show possible hostname completions
Ctrl + z – Suspend/ Stop the command. “fg” restores the suspended command.

ALT Key Bound

Alt + < – Move to the first line in the history
Alt + > – Move to the last line in the history
Alt + ? – Show current completion list
Alt + * – Insert all possible completions
Alt + / – Attempt to complete filename
Alt + . – Yank last argument to previous command
Alt + b – Move backward
Alt + c – Capitalize the word
Alt + d – Delete word
Alt + f – Move forward
Alt + l – Make word lowercase
Alt + n – Search the history forwards non-incremental
Alt + p – Search the history backwards non-incremental
Alt + r – Recall command
Alt + t – Move words around
Alt + u – Make word uppercase
Alt + back-space – Delete backward from cursor

More Special Keybindings

$ 2T – All available commands(common) (2T means press the TAB twice)
$ (string)2T – All available commands starting with (string)
$ /2T – Entire directory structure including Hidden one
$ 2T – Only Sub Dirs inside including Hidden one
$ *2T – Only Sub Dirs inside without Hidden one
$ ~2T – All Present Users on system from “/etc/passwd”
$ $2T – All Sys variables
$ @2T – Entries from “/etc/hosts”
$ =2T – Output like ls or dir

Hope this help

Bye
Riccardo

Print This Post Print This Post

The following is a simple memo on how to use the three powerful tools above.
It will not be a complete guide, and you should find only a small part of the possible use, but this would be a review only for the most common use (for me) and would not go a deep dive.

Grep

grep : print lines matching a pattern (equals “grep -G” which is the default)
egrep : equals grep -E (interpret extended regexp)

grep -n : line numbered
grep -i : ignore case
grep -c : count matches
grep -v : print non-matching lines
grep -r : recursivity, read all files under each directory

grep pattern file.txt

Will display the lines containing the pattern

grep -c pattern file.txt

Will display how many lines contain the pattern

grep -i pattern file.txt

Will display the lines containing the pattern regardless of the case

grep -A 1 -B 1 pattern output.txt

Will print the one line before (-B) and one line after (-A) the matching pattern

Awk

awk '{ print $0 }' file

Output the content of the file

awk '{ print $2 }' file

Output the second field of data of the file, space is the default separator

awk -F ':' '{ print $2 }' file

Same but separator is “:”

Sed

cat file | sed -e 's/old_pattern/new_pattern/g'

sed would replace old_pattern by new_pattern in the output

cat file | sed -e '4,10s/old_pattern/new_pattern/g'

sed would replace old_pattern by new_pattern in the output between line 4 and 10

cat file | sed '/pattern/d'

Delete a pattern

cat file | sed '/pattern/!d'

Delete everything but the pattern (this equals grep “string_to_remove”)

Hope this help

Bye
Riccardo

Print This Post Print This Post

This would be another little memo of all the most used (by me) Input/output redirections and pipes.
As other times this would not be a complete guide, and would not go into the deep.

The base :

Standard input (stdin) : 0
Standard output (stdout) : 1
Error output (stderr) : 2

> : output redirection
< : input redirection
>> : append output
| : pass the output to the next utility
|| : execute the next command if the previous failed
&& : execute the next command only if the previous has succeded

Examples :

cat file.txt > /tmp/file.txt

If file.txt exists, the output will be written in /tmp/file.txt
If file.txt doesn’t exist, the error message will be output to the screen while nothing will be written to /tmp/file.txt (but the file will be created if not existing)

cat file.txt 2> /tmp/error_file.txt > /tmp/file.txt

In this case the error message would be written to /tmp/error_file.txt if the file doesn’t exist

cat file.txt 2> /tmp/error_file.txt >> /tmp/file.txt

The error output would still go in error_file.txt while the standard output would be APPENDED to file.txt

cat file1 > file2

Will copy the content of file1 to file2

 cat &gt; file3

Hello world

Will write “Hello world” to file3

[/bash]wc < file.txt > count_file.txt[/bash]

This would count the number of lines, words and bytes in file.txt (”wc < file.txt”) and output the result to count_file.txt

Several ways of counting lines etc. :
$ wc file.txt
7 2 17 file.txt
$ wc < file.txt
7 2 17
$ cat file.txt | wc
7 2 17

ls -l test10 > file.txt 2>&1

This would output anything under file.txt

<code>ls -l test10 2>&1 | mail -s “output in a mail” address@domain.com
Any output in a mail

Hope this help

Bye
Riccardo

Print This Post Print This Post

This post is not for a sort of “religion war” between Microsoft and VMware.

I’m using daily both Microsoft products with satisfaction (not every time) and VMware.

I love VMware products, and this is not a secret, but before today, I’ve read everything about Microsoft Hyper-V, so I’ve decided to download it and test it.

The following is my opinion about VMware ESXi and Hyper-V comparison, this because Microsoft trying to tell us that his Hypervisor is similar (or better) than VMware one, and because I don’t think so, you can read here the main reasons.

Read the rest of this entry »

I started using VMware Update Manager almost immediately after its release.
In my opinion another patching software for Microsoft Windows wasn’t needed when WSUS already existed and does a great job at Windows patching.
For the above reason I’m using VMware Update Manager only for patching esx hosts.
One of the most important feauture of Update Manager is that is fully integrated with VMware DRS, so patching an ESX host cause zero-downtime because the host will be put into Maintenance Mode for patching and than become available again.

This process details the Patching of an ESX host. The remediation process involves Migrating Virtual Machines off the host using vMotion, patching and then redistributing workloads via DRS.

1) First of all connect to Virtualcenter and you must enable the Update Manager plugin.

2) Download and install the Plug-in, and enabled it.

3) When you have the plugin enables, you should see another task button and another Tab at cluster level and at host level.

4) The next step is to attach a baseline to cluster (best practice) or to host. It would be better to attach the baseline to cluster because with thi solution you will have all the hosts at the same patchlevel.
A baseline is a collection of patch, defined by some policy, baselines could be “fixed” or “dynamic”, the first one are a manually selected update lists, the second one is an update lists defined by some dynamic choice. Every baseline should be divided “Non Critical” and “Critical” classifications.

5) When you attach a baseline to an object (a cluster or an host) you should select “SCAN FOR UPDATES” and UpdateManager will check the object patchlevel do define which update should be applied to it.

6) When the task has been finished, you should choose “REMEDIATE”, and consider to run this on one host at a time.

7) Choose from the defined baselines which ones you want to apply to the selected host, and define all options requested.

After the above operations, the host will go into “Maintenance Mode” and all running Virtual Machines will be evacuated to other hosts, Update Manager will apply all needed patches rebooting the host if necessary and at the end the host will exit from “Maintenance Mode”.

Hope this help

Bye
Riccardo
Print This Post Print This Post

Recently I was trying to move VMware VirtualCenter database from one server to another and found that for 250MB database I have about more than 30GB of transaction log (LDF) files. I wanted to get rid of this file. There are 2-3 methods but the method I’ve used was thew following :

1) Open SQL Management Studio Express

2) Detach the database from the SQL Server Management Studio.

3) Go to the location of transaction log and rename it (don’t delete the file yet!!)

4) Attach the database without the log file. When you do this step make sure you highlight the log file entry in the wizard and remove it. (Final attach would happen only with one file i.e. with the MDF file).

At this point there would be a new log file created by the SQL Server.

5) Edit the database properties, and select the preferred increment policy of your newly created log file, enabling automtic grow, define increment step and also define maximum dimension to avoid the problem above.

4) Delete the log file once the database is attached and you have verified it.

You can save a lot of space with above steps.
I’ve tested this procedure with VMware VirtualCenter 2.5 Update4, Microsoft SQL 2005 Express with the latest service pack, Microsoft Management Studio Express, and all works fine.
If i remeber well, this would work even with SQL 2000.

Hope this help

Bye
Riccardo

Print This Post Print This Post

Which Linux distribution is more suitable for you regarding your experience and preferences ?

find it at :

http://www.zegeniestudios.net/ldc/index.php?lang=en

Mine was 100% Debian / 100% Ubuntu

No surprises on that !

Bye
Riccardo

This post will explain how to disable IPv6 in a system running Debian GNU/Linux or Ubuntu Linux.

You should want to disable IPv6 for compatibility reason or if you not plan to use it for speed up your system and/or to avoid loading of unuseful modules on system start up.

For disable the protocol you have to edit

/etc/modprobe.d/aliases

file and change two lines as follow :

#alias net-pf-10 ipv6
net-pf-10 off

You should also tell to your kernel to not load IPv6 module by blacklisting it at the boot, for doing so edit

/etc/modprobe.d/blacklist 

file adding the following line :

blacklist ipv6

Reboot your system and check with the following command if the module ipv6 is not present :

lsmod |grep ipv6

You’ve done

Hope this help

Bye
Riccardo

Print This Post Print This Post

This is a VERY CLEAR reference from Massimo Re Ferrè (not so strange ….) about Storage Configuration in a VMware Site Recovery Manager Installation.

You could find it here.

Thank you Massimo for the great job

Bye

Riccardo

The following is a list of MySQL useful commands.

# To setup root password (first execution)
mysqladmin -u root password 'new_password'

# To login to MySQL
mysql -u root -p

# To create a database
create database dbname;

# To change database
use dbname;

# To create a user and assign to it permission to database
# Grant permission only from localhost connections
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

# Grant permission on all connections
GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

# Manage MySQL export
# Copy all db1 content to /backup-db/db1 folder
mysqlhotcopy db1 /backup-db/db1

# Create a DB dump to a file
mysqldump db1 &gt; db1_dump_db.sql -u root -p

Hope this help

Bye
Riccardo

Print This Post Print This Post
Contacts
Look at me at Linkedin Follow me on Twitter
My Flickr Albums My Facebook profile My YouTube Videos
SkypeMe My Linux Counter GMail me
Search
Google Search
Categories
Tag Cloud 3D
FeedBurner RSS

Visitors
Locations of visitors to this page
VMware related Blogs
The following are Blog sites with feeds I personally follow. When I'll have some spare time I will complete all Feed and Twitter links.