Akn’s Blog

Open Technology Forum

YUM package installation from DVD

leave a comment »

Q) How to install packages from a DVD using YUM without creating a repository?

1. Ensure yum rpm is installed on the local server.

2.  cd /etc/yum.repos.d

3. Copy the existing template to yum.repo

cp <rhel-debuginfo.repo> yum.repo

4. Edit yum.repo and change the entries as given below. Lets consider that the DVD was mounted under /mnt. Change as per your requirement:

baseurl=file:///mnt/Server

enabled=1

Note: Leave the remaining entries in “yum.repo” as it is. I am also assuming that /mnt/Server has the “repodata” directory as it comes with all default OS images. This directory contains all the repository files that comes along with the OS image thereby helping us avoid creating a repository manually using createrepo.

4. Save the file and run “yum clean all”

5. yum makecache

6. It builds the cache and you can proceed with the rpm installation.

Note: Tested on RHEL 5.x

Written by Anil

August 28, 2009 at 10:16 am

Posted in 1

Tagged with

Re-installing Update Manager with a new database

leave a comment »

What if VMware Update Manager (VUM) database gets corrupted?

The purpose of this post is to showcase creation of a new database for VUM and pointing VUM install to the new database.

1. If SQL 2005 Express Edition is used (in small scale infrastructure) by the Virtual Center, there is no way we could create a new database. Therefore, we need to download Microsoft SQL Server Management Studio Express (below this post is the URL) which is a graphical management tool for managing SQL Server 2005 Express Edition. Using this tool, a new VUM database can be created. In this example, VUM_DB is the database that is created.

2. After database creation, a System DSN ODBC connection is created pointing to the VUM_DB database. In this example, the name of the ODBC connection is VUM_ODBC.

3. Kickstart re-installation of VUM through the Virtual Infrastructure Client msi package (which includes VUM).

4. Enter the new VUM_ODBC name in the DB DSN column during installation.

5. Open Virtual Center and install the VUM plugin

6. After successful re-installation of VUM, open MS SQL Server Management Studio Express and delete the old VUM database which was created by the old install

7. We are good to go!

Click thumbnail for live example.

Download:

MS SQL Server Management Studio Express

http://www.microsoft.com/downloads/details.aspx?FamilyId=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en

Written by Anil

March 4, 2009 at 7:41 pm

Posted in Uncategorized

Tagged with

ESX 4.0(vSphere) Install on VMware Workstation 6.5

with 2 comments

VM installation requirements on VMware Workstation:

  • VMware Workstation 6.5.0 build 118166
  • RAM: 2 GB (Minimum)
  • Storage: 12 GB (Minimum)

Click thumbnail for live example.

ESX 4.0 Version/Release:

[root@localhost ~]# uname -a
Linux localhost 2.6.18-92.ESX #1 Sun Dec 14 23:27:11 PST 2008 x86_64 x86_64 x86_64 GNU/Linux

[root@localhost ~]# vmware -v
VMware ESX 4.0.0 build-140815

Reference:

Please refer to the online whitepaper from xtravirt to configure the initial settings of the VM.

Note: No changes have been made to the .vmx (VM configuration file) as suggested in the whitepaper.

Written by Anil

March 4, 2009 at 12:24 pm

Posted in 1

Tagged with

Mount Windows 2003 NFS shared folder on ESX 3.5

leave a comment »

Setup on Windows 2003:

1. Download Windows Services for Unix (WSFU) from Microsoft portal

2. Unzip the package

3. Ensure ‘PermitRootLogin’ is set to ‘yes’ in ‘/etc/ssh/sshd_config’ file of the ESX 3.5 host and sshd services are restarted (service sshd restart)

4. Download WinSCP and login to the ESX host as root user

5. Browse to /etc/ direcotory and copy ‘/etc/passwd’ and ‘/etc/group’ file to your computers local directory. In the live example, the folder created was User Mapping Dir

6. Install WSFU from the folder where the files were earlier extracted. Choose Custom install and expand Authentication tools for NFS->User Mapping Service

7. During the installation process, enter the path to /etc/passwd and /etc/group files, select Windows domain name and wait for installation to complete

8. Open Microsoft Windows Services for Unix application and select User Name Mapping on the left hand window

9. Select Configuration on the right hand window and verify whether User Password and Group files is selected and path to the passwd and group file is correct

10. Select Maps and click Show User Maps under Advanced Maps

11. Select Windows Domain Name from the drop down and click List Windows Users button. Do the same with List UNIX Users

12. Choose users Administrator on the left window and root on the right  window. Click Add and this will map the users

13. Apply the changes by clicking on the Apply button on the top right of the window

14. Share a folder by right clicking on the folder and selecting Properties

15. Click on NFS Sharing tab and select Share this folder radio button.

16. Click on Permissions button->Change the Type of Access to Read-Write and check Allow root access and apply the changes.

Mounting shared folder created on Windows on ESX host:

1. Login to ESX host as root user

2. Verify whether nfs and portmap services are turned on for runlevels 3 and 5 using the commands:

chkconfig –list | grep -i nfs

chkconfig –list | grep -i portmap

3. If they are turned off, turn them on using the commands:

chkconfig portmap on

chkconfig nfs on

4. Start the services for both portmap and nfs using commands:

service portmap start

service nfs start

5. Verify whether the folder shared on Windows 2003 is shared/exported using the command:

showmount -e <ip address of Windows machine>

6. The above showmount command should throw the below output:

Export list for <ip address of Windows 2003 box>

/<Shared folder name> (everyone)

7. Use the mount command to mount the Windows 2003 shared folder to the /mnt directory of the ESX host using:

e.g. mount <ip add/FQDN>:/<shared folder name> /mnt

mount 192.168.1.112:/Sharing_Folder /mnt

If the mount was successful, you will be back to the prompt.

8. Verify whether the mount is successful using commands:

cd /mnt

ls -lh

9. The above commands should give you a long list of files in the shared folder

Click thumbnail for live example.

Written by Anil

March 3, 2009 at 8:17 pm

Posted in Uncategorized

Tagged with

Cold Migration with VC 2.5

leave a comment »

Cold Migration: To migrate powered off VM’s on the same host or different hosts or across datastores.

In the animated gif, the Win2k3 VM’s files are moved from iscsi storage to a local storage. After the migration process, the VM’s home directory which includes configuration file (.vmx), discriptor file (.vmdk) and flat files (.vmdk data files) are migrated from iscsi storage to the local storage.

Click thumbnail for live example.

Written by Anil

March 3, 2009 at 4:12 am

Posted in Uncategorized

Tagged with

Self-VMotion in VC 2.5

leave a comment »

Self-VMotion: What could this be? Well, VMotion a powered on VM on the same ESX host.

Any benefits: None. There is no change in the VM’s configuration files or vmdk’s. Neither does the VM’s home directory move to another datastore. It stays on the same datastore where it originally is.

This VM’s home directory Win2k3 was stored on an iscsi storage. After performing a self-vmotion, the VM’s configuration files (vmx, vmdk and others) still remain on the same data store and on the same home directory of the VM.

Click thumbnail for live example.

Written by Anil

March 2, 2009 at 9:44 pm

Posted in Uncategorized

Tagged with

Install Update Manager Plugin in VC 2.5

leave a comment »

The image in my blog shows installing VMware Update Manager Plugin on Virtual Center 2.5.

1. Click on Plugins on the Menu bar and click on Download and Install button of the Plugin Manager window.

2. After completion of the install, click on the installed tab in the Plugin Manager window and check VMware Update Manager Client.

3. After enabling the plugin, an Update Manager icon appears on the toolbar of VC,  and appropriate Update Manager tabs will be added to all the VC objects (Datacenter, Cluster, Folder, ESX host, VM).

4. The resource pool is the only object to which the Update Manger tab is not added and therefore a scan or remediation for this object is not possible.

Click thumbnail for live example.

Written by Anil

March 2, 2009 at 12:01 am

Posted in Uncategorized

Tagged with

Software iscsi initiator against target “openfiler”

leave a comment »

Title: Setting up iscsi software inititator against target “openfiler”

OS: RHEL 5

Release: 2.6.18-8.el5 #1 smp

rpm: iscsi-initiator-utils-6.2.0.742-0.5.el5


iSCSI Configuration

There are three steps needed to set up a system to use iSCSI storage:

  1. iSCSI startup using the init script or manual startup. You need to edit and configure iSCSI via /etc/iscsi/iscsid.conf file
  2. Discover targets.
  3. Automate target logins for future system reboots.
  4. You also need to obtain iSCSI username, password and storage server IP address (target host)

Step # 1: Configure iSCSI

Open /etc/iscsi/iscsid.conf with vi text editor:
# vi /etc/iscsi/iscsid.conf
Setup username and password:
node.session.auth.username = My_ISCSI_USR_NAME
node.session.auth.password = MyPassword
discovery.sendtargets.auth.username = My_ISCSI_USR_NAME
discovery.sendtargets.auth.password = MyPassword

Where,

  • node.session.* is used to set a CHAP username and password for initiator authentication by the target(s).
  • discovery.sendtargets.* is used to set a discovery session CHAP username and password for the initiator authentication by the target(s)

You may also need to tweak and set other options. Refer to man page for more information. Now start the iscsi service:
# /etc/init.d/iscsi start

or

service iscsi start

Step # 2: Discover targets

Now use iscsiadm command, which is a command-line tool allowing discovery and login to iSCSI targets, as well as access and management of the open-iscsi database. If your storage server IP address is 192.168.1.251, enter:

Discover targets at a given IP address:

iscsiadm –mode discovery –type sendtargets –portal 192.168.1.251

Login, must use a node record id found by the discovery:

iscsiadm –mode node –targetname iqn.2001-05.com.doe:test –portal 192.168.1.251:3260 –login

Logout:

iscsiadm –mode node –targetname iqn.2001-05.com.doe:test –portal 192.168.1.251:3260 –logout

List node records:

iscsiadm –mode node

Display all data for a given node record:

iscsiadm –mode node –targetname iqn.2001-05.com.doe:test –portal 192.168.1.251:3260

After discovering the target, there should be a block device under /dev directory. To obtain new device name, type:
# fdisk -l
or
# tail -f /var/log/messages

Step # 3: Format and Mount iSCSI Volume

You can now partition and create a filesystem on the target using usual fdisk and mkfs.ext3 commands:
# fdisk /dev/sd*
OR
# mkfs.ext3 /dev/sd*

Mount new partition:
# mkdir /mnt/iscsi
# mount /dev/sdd1 /mnt/iscsi

Step #4: Mount iSCSI drive automatically at boot time

First make sure iscsi service turned on at boot time:
# chkconfig iscsi on
Open /etc/fstab file and append config directive:
/dev/sd* /mnt/iscsi ext3 _netdev 0 0

Written by Anil

January 19, 2009 at 1:03 pm

Posted in Uncategorized

Tagged with