Categories

Showing posts with label VMware ESXI. Show all posts
Showing posts with label VMware ESXI. Show all posts

Friday, 14 November 2014

Command to reset the cpanel account password

Hi,

We can  reset the account password for the cpanel account by using commands. We usually do it by login to WHM interface and then use the modify account section. But this can be done simply using command line.
This post is usefull for some one who doesn't have a cpanel license on the server.


Below is the commands to reset the cpanel account password

1)First we need to change an environment variable in the current shell we are using export command

export ALLOW_PASSWORD_CHANGE=1

2)Then use the command

/scripts/chpass  username password 

This will change the account password

3)But the ftp password won't sync with the new update. So you need to run the below command to update it

/scripts/ftpupdate

Cheers
Syamkumar.M


Tuesday, 12 August 2014

How to install VMware tools and convert kvm disk images to vmware .vmdk disks

Hi,

We had a requirement to move the kvm systems to vmware and for that at first we need to convert existing kvm machine disk images which is either in qemu/raw type to .vmdk images.

First we need to install vmware-tools on the machine where we are going to convert the disk images. Below are the steps to install the vmware tools.

Import the vmware gpg keys using the command
--------------------------------------------
rpm --import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub
rpm --import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub

Add vmware tools repository using the below command
---------------------------------------------
   echo -e "[vmware-tools]\nname=VMware Tools\nbaseurl=http://packages.vmware.com\
   /tools/esx/4.1latest/rhel6/\$basearch\nenabled=1\ngpgcheck=1" > /etc/yum.repos.d/vmware-tools.repo



Update yum and install it using the command
------------------------------------------ 
yum update
yum install vmware-open-vm-tools
yum install vmware-open-vm-dkms

It will install the necessary tools on the machine.

Now use the below command to convert the kvm disk image to vmware one

qemu-img convert machine.img -O vmdk machine.vmdk

It will take some time to convert based on the size of the disk.

Once it is finished. You can scp the converted disk file to the new vmware. Then create a new vmware machine using existing disk image as the convreted file.

That's it

Cheers
Syamkumar.M

Friday, 24 January 2014

"Device eth0 does not seem to be present" After Cloning a Centos machine on Vsphere


Hi,

After cloning or moving a machine in VSphere, On starting the Virtual machine, I got error message as below

"Device eth0 does not seem to be present" Delaying initialization.

On cloning a Virtual machine on Vsphere, we need to edit the MAC adress on the VM settings. This change is recognized by the new VM . But it will list the NIC as eth1 instead of eth0, as eth0 MAC adress(Adress of the VM from which we cloned it) is still in the configuration file of new VM.

The configuration file where the Centos machine stores its NIC information is in

  vi /etc/udev/rules.d/70-persistent-net.rule

This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:02:bf:b5", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:8b:2f:fd", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"


As you can see tat the new MAC Adress is recognized as the adress for eth1. So eth0 won't start.


so we need to edit that file and delete the first entry of in that file.


Then rename the eth1 to eth0  keeping only the second line.


After that start udev configuration using the command below


start_udev

Now restart network services:
service network restart
 
If there is proper configurations are set in the file /etc/sysconfig/network-scripts/ifcfg-eth0, then the eth0 will start.

Cheers
Syam
 


Ad