If one needs to create an nfs server to test esxi, all one needs is a linux nfs server.
Some people prefer freenas or openfiler, others simply use solaris, hpux and so forth.
Here, I prepared an nfs server using ubuntu linux. Plain ubuntu linux, desktop edition.
Steps:
1. Install the nfs server packages to turn your desktop into an nfs server.
$ sudo apt-get update
$ sudo apt-get install nfs-kernel-server
2. Prepare a directory to be shared. For testing, allow anybody to mount it and write into it.
$ sudo mkdir /share1
$ sudo chmod 777 /share1
3. Edit the /etc/exports file to share the directory share1 with everybody
$ sudo echo /share1 * >> /etc/exports
$ cat /etc/fstab
4. Start the nfs daemons and verify that nfs is working
$ sudo /etc/init.d/nfs-kernel-server start
$ sudo showmount -e
That is it; this is all it takes.
Wednesday, March 14, 2012
Wednesday, January 4, 2012
VAAI -- VMware vSphere vStorage APIs
Manipulating the Hardware Acceleration VAAI primitives
There are two new vaai primitives available in vsphere 5.0. These provide hardware
acceleration for NAS and Thin Provisioning. Using these primitives offload certain
operations to the array, hence reducing cpu overhead on the host and improving cold
migrations and cloning duration.
From the VMA:
List all plugins installed:
# esxcli --server 10.1.1.1 software vib list
Install a vaai vib:
# esxcli --server 10.1.1.1 software vib install -v | --viburl=url_here
Uninstall a vaai vib:
# esxcli --server =10.1.1.1 software vib remove -v| --vibname=name
Additional local commands:
# esxcfg-scsidevs -l | egrep "Display Name:VAAI Status"
# esxcli storage core dvice vaai status get
There are two new vaai primitives available in vsphere 5.0. These provide hardware
acceleration for NAS and Thin Provisioning. Using these primitives offload certain
operations to the array, hence reducing cpu overhead on the host and improving cold
migrations and cloning duration.
From the VMA:
List all plugins installed:
# esxcli --server 10.1.1.1 software vib list
Install a vaai vib:
# esxcli --server 10.1.1.1 software vib install -v | --viburl=url_here
Uninstall a vaai vib:
# esxcli --server =10.1.1.1 software vib remove -v| --vibname=name
Additional local commands:
# esxcfg-scsidevs -l | egrep "Display Name:VAAI Status"
# esxcli storage core dvice vaai status get
Wednesday, December 21, 2011
How to create a vmfs file system with ESXI 5.0
Starting with 5.0, a new utility/command called partedUtil is used to partition disks. GPT allows the extent to exceed the 2TB limitation found in previous versions of esxi with older versions of vmfs.
What follows are the instructions on how to partition a lun and create a file system.
Step # 1: Type the command with the -h option to learn about the syntax.
partedUtil -h
Step # 2: Access the directory with the disks and get the attributes of a particular disk
cd /vmfs/devices/disks ; ls
partedUtil get naa.device_name_here
Note: The output should be a set of four numbers. For example: 1044 255 63 16777216
These numbers represent the number of cylinders, the head cound, the number of sectors per track
and the total number of sectors of the device
Step # 3: Partition the disk
partedUtil set naa.device_name_here "1 2048 16700000 251 128"
Note: These numbers represent the partition number (1), the starting sector (2048),
the last sector(16700000), the partition type (251=vmfs) and an attribute (128=bootable).
Step # 4: Create a file system using that first partition
vmkfstools -C vmfs5 -S myfs -b 1M naa.device_name_here:1 <- 1=partition number to use
What follows are the instructions on how to partition a lun and create a file system.
Step # 1: Type the command with the -h option to learn about the syntax.
partedUtil -h
Step # 2: Access the directory with the disks and get the attributes of a particular disk
cd /vmfs/devices/disks ; ls
partedUtil get naa.device_name_here
Note: The output should be a set of four numbers. For example: 1044 255 63 16777216
These numbers represent the number of cylinders, the head cound, the number of sectors per track
and the total number of sectors of the device
Step # 3: Partition the disk
partedUtil set naa.device_name_here "1 2048 16700000 251 128"
Note: These numbers represent the partition number (1), the starting sector (2048),
the last sector(16700000), the partition type (251=vmfs) and an attribute (128=bootable).
Step # 4: Create a file system using that first partition
vmkfstools -C vmfs5 -S myfs -b 1M naa.device_name_here:1 <- 1=partition number to use
Wednesday, September 7, 2011
The new esxi firewall
Esxi introduces a brand new service oriented firewall (not based on iptables).
It can be manipulated with the gui or the cli. It also allows new rules to be added if necessary via the implementation of xml files.
Demo:
# grep firewall /etc/vmware/esx.conf
# more /var/log/esxcli.log
# esxcli network firewall get
# esxcli network firewall ruleset list
# vi /etc/vmware/firewall/fake-ftp.xml
<configroot>
<service>
<id>fake-ftp</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<port>21</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
</configroot>
# esxcli network firewall refresh
# esxcli network firewall ruleset list
# esxcli network firewall ruleset rule list | grep fake-ftp
Note:
If you prefer to edit the default file, back it up first and add a sticky bit to it.
# chmod 1777 service.xml
It can be manipulated with the gui or the cli. It also allows new rules to be added if necessary via the implementation of xml files.
Demo:
# grep firewall /etc/vmware/esx.conf
# more /var/log/esxcli.log
# esxcli network firewall get
# esxcli network firewall ruleset list
# vi /etc/vmware/firewall/fake-ftp.xml
<configroot>
<service>
<id>fake-ftp</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<port>21</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
</configroot>
# esxcli network firewall refresh
# esxcli network firewall ruleset list
# esxcli network firewall ruleset rule list | grep fake-ftp
Note:
If you prefer to edit the default file, back it up first and add a sticky bit to it.
# chmod 1777 service.xml
How to Install and Use the Vsphere 5 Syslog Collector
10 Steps to configure the Syslog Collector
01. Using the vcenter server cd, install the syslog collector
02. Connect to your vcenter server and click on Home
03. Click on the new Syslog Collector icon to verify its installation
04. Go to Hosts and Clusters
05. Select your esxi host
06. Go to the Configuration tab
07. Under Software, click on Advanced Settings
08. Click on Syslog, select Remote
09. Input the ip address of the syslog collector (ex: tcp://10.1.1.1:514)
10. Go to home, click on the syslog icon and verify functionality
01. Using the vcenter server cd, install the syslog collector
02. Connect to your vcenter server and click on Home
03. Click on the new Syslog Collector icon to verify its installation
04. Go to Hosts and Clusters
05. Select your esxi host
06. Go to the Configuration tab
07. Under Software, click on Advanced Settings
08. Click on Syslog, select Remote
09. Input the ip address of the syslog collector (ex: tcp://10.1.1.1:514)
10. Go to home, click on the syslog icon and verify functionality
Using Image Builder
What it can do:
Image Builder allows the administrator to create unique esxi iso images that can contain additional vibs (software packages with extra drivers) or remove some of the default packages if they are not needed. Since additional vibs are usually provided by third party vendors, this demo removes drivers not needed in this particular server. Vibs typically contains a descriptor xml, a digital signature file and the actual package of software with additional drivers.
How to create your own iso image:
Step # 1: Connect to the vcenter server using powercli
set-executionpolicy unrestricted
connect-viserver vcenter.acme.com
Step # 2: Add a software depot and verify the results
add-esxsoftwaredepot C:\Depot\mydepot.zip
get-esxsoftwaredepot
Step # 3: Clone the original iso image and modify the new one by removing the vib called net-bnx2 (for broadcom nics)
get-esximageprofile
new-esximageprofile -cloneprofile "Name of Standard Image from Previous Command" -name myprofile
get-esxsoftwarepackage
remove-esxsoftwarepackage -imageprofile myprofile -softwarepackage net-bnx2
Step # 4: Create a new, modified iso image
export-esximageprofile -imageprofile myprofile -exporttoiso -filepath C:\Depot\myprofile.iso
Image Builder allows the administrator to create unique esxi iso images that can contain additional vibs (software packages with extra drivers) or remove some of the default packages if they are not needed. Since additional vibs are usually provided by third party vendors, this demo removes drivers not needed in this particular server. Vibs typically contains a descriptor xml, a digital signature file and the actual package of software with additional drivers.
How to create your own iso image:
Step # 1: Connect to the vcenter server using powercli
set-executionpolicy unrestricted
connect-viserver vcenter.acme.com
Step # 2: Add a software depot and verify the results
add-esxsoftwaredepot C:\Depot\mydepot.zip
get-esxsoftwaredepot
Step # 3: Clone the original iso image and modify the new one by removing the vib called net-bnx2 (for broadcom nics)
get-esximageprofile
new-esximageprofile -cloneprofile "Name of Standard Image from Previous Command" -name myprofile
get-esxsoftwarepackage
remove-esxsoftwarepackage -imageprofile myprofile -softwarepackage net-bnx2
Step # 4: Create a new, modified iso image
export-esximageprofile -imageprofile myprofile -exporttoiso -filepath C:\Depot\myprofile.iso
Wednesday, July 20, 2011
vscsiStats in action
How to enable vscsiStats for data gathering:
List all running virtual machines and their world numbers.
vscsistats -l
Start gathering statistics for a particular world.
vscsistats -s -t -w 20560
Print output to the console.
vscsistats -p all -w 20560
Redirect output to a file.
vscsiStats -p all -c -w 20560 > /tmp/vmstasts.csv
Stop gathering statistics.
vscsiStats -x -w 20560
List all running virtual machines and their world numbers.
vscsistats -l
Start gathering statistics for a particular world.
vscsistats -s -t -w 20560
Print output to the console.
vscsistats -p all -w 20560
Redirect output to a file.
vscsiStats -p all -c -w 20560 > /tmp/vmstasts.csv
Stop gathering statistics.
vscsiStats -x -w 20560
Subscribe to:
Posts (Atom)