Unable to apply DRS resource settings on host. The available memory resources in the parent pool are insufficient for the operation.

Recently I needed to decrease the memory reservation from one VM, but after I did that, I received the follow alert in my ESXi host:

Unable to apply DRS resource settings on host. The available memory 
resources in the parent pool are insufficient for the operation.

Verifying the swap file of the VM, I observed that the swap file not increased. In this case the expected behavior after decrease the memory reservation was, the increase of the swap file, but it did not happen.

When the Virtual Machine was powered off and powered on again, the alert disappeared and swap file grow up, but I needed do the same process in others VMs which I could not turn off.

Solution:

After some searches on Google I found the solution in the KB2136186. This is a known issue and the fix is in the ESXi 6.0 build 3825889. In my case, my version was ESXi 6.0 U1 build 3380124, then I decided performed update in my ESXi host and after update I did some tests and the issue not occurred again. The problem was solved! 🙂

Reference:

KB2136186

How to create a new Docker image?

maxresdefaultIn this article we’re going to build one new docker image with Apache and PHP installed and one php file for test.

Create a directory called “build”:

# mkdir Ëś/build

Change to directory “build”:

# cd Ëś/build

Create a new file called Dockerfile with the following content:

FROM centos
MAINTAINER Daniel Nascimento
RUN yum update -y
RUN yum install httpd php -y
ADD index.php /var/www/html/
CMD /usr/sbin/apachectl -D FOREGROUND
EXPOSE 80

In the same directory create another file called index.php with the following content:

<?php
phpinfo();
?>

Finally it’s time of build our new image.

# docker build -t user/httpd .

Now we have a new image with apache and php installed. Then let’s create a new container using this image:

# docker run -t -i -p 80:80 user/httpd

To access our new container in your browser type the URL:

http://your-host-ip/

That’s it! 🙂

How to create a new OpenShift Origin user?

Basic Auth is used by default by the OpenShift Origin. So to create a new user account using the below command:

#htpasswd /etc/openshift/htpasswd username

Environment:

  • OpenShift V2
  • Centos 6 – 64Bits

Reference:

http://docs.openshift.org/origin-m4/oo_deployment_guide_comprehensive.html#configure-an-authentication-plugin

How to Install and set up GitHub on Centos 7

First let’s install Git:

# yum install git -y

Use the follow commands to add in the required information:

$ git config --global user.name "NewUser"
$ git config --global user.email newuser@example.com

Create a directory called myproject for our workspace environment:

$ mkdir myproject/

Change to directory myproject/.

$ cd myproject/

Create a new file called teste.txt

$ touch teste.txt

Initialized a new empty repository:

$ git init

Add the file created early called teste.txt to the new created repository:

$ git add teste.txt (Add only file teste.txt)

or

$ git add . (Add all files)

To commit the changes, use the command:

$ git commit -m “Explaining the changes” -a (To commit all files)

or

$ git commit -m “Explaining the changes” teste.txt (To commit only file teste.txt)

Pushing changes to a remote server

To add a new remote repository, use the command:

$ git remote add origin git@github.com:user/myproject.git

To push your local repository to a remote repository use the command:

$ git push origin master

Reference: https://github.com/

How to disable telnet in AIX

By default the TELNET service is enabled in AIX (6.1 and 7.1) and the SSH service is not installed, but if you already installed the SSH service, then you can to disable the TELNET service following the steps below:

Open the file /etc/inetd.conf:

#vi /etc/inetd.conf

Comment out the line below to disable telnet service:

#telnet  stream  tcp6    nowait  root    /usr/sbin/telnetd      telnetd -a

Save it and reload inetd:

#refresh -s inetd

LVM – How to migrate data between disks?

Environment:

Red Hat Enterprise Linux Server 6.0

Case:

You have a server connected in storage A and need migrate the data to new storage B.

How to migrate data between disks with the server online?

In this article I will explain how migration of data between the disks, without unavailability, remember that in our example we’re using LVM.

This article assumes that the new disk has been installed on the system and is visible to the operating system as /dev/sdb.

Create a new partition of type LVM in new disk:

Create a new PV:

# pvcreate /dev/sdb1

Add the new PV to VG:

# vgextend VG_NAME /dev/sdb1

Move data between disks with command:

# pvmove -v /dev/sda1

The command pvmove will move data from disk sda1 to sdb1:

Check if the PV was released with command:

# pvs

Now remove the old disk from the VG with command:

# vgreduce -a

The option -a remove from VG all the PV free. In our exemple the disk sda1.

Now the disk can be removed from the server.

AIX – How to install ProFTP in AIX

This article I explain how to install ProFTP in AIX 6.1, limiting the access only to user home directory.

Environment

AIX 6.1
ProFTP 1.2.8
FileUtils 4.1.4

Download

The package needed can be downloaded in link below:

ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/proftpd/proftpd-1.2.8-1.aix5.1.ppc.rpm

The package File Utils is required to install ProFTP, below the link to downloaded if not installed:

ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/fileutils/fileutils-4.1-4.aix4.3.ppc.rpm

Install

Install FileUtils if required:

# rpm -ivh fileutils-4.1-4.aix4.3.ppc.rpm fileutils ##################################################

Install ProFTP:

# rpm -ivh proftpd-1.2.8-1.aix5.1.ppc.rpm proftpd ##################################################

Configure

Now, let’s configure proftp.

To create jail for users uncomment the line “#DefaultRoot ~” in the file /etc/proftpd.conf to:

DefaultRoot ~

To start ProFTP by inetd, change the line “ServerType standalone” in the file /etc/proftpd.conf to:

ServerType inetd

Then, in file /etc/inetd.conf change the line below:

From:

ftp stream tcp6 nowait root /usr/sbin/ftpd ftpd

To:

ftp stream tcp nowait root /usr/sbin/proftpd proftpd -p enable

Make sure that the User “nobody” and the group “nogroup” exist on your system. In my case I changed  the group to “staff”.

In the file /etc/proftpd.conf change the group to:

Group staff

Now, let’s start the ProFTPD with command:

#startsrc -t ‘ftp’

Linux – How to find duplicate IP address?

This is a quick tip to find duplicate IP address in your local LAN network.

To find duplicate IP address, you can use arping command under linux.

Example:

#arping -D 192.168.0.10

Output:

# arping -D 192.168.0.10 132

ARPING 192.168.0.10 from 192.168.0.2 eth0

Unicast reply from 192.168.0.10 [00:0C:29:2A:3C:C7]  0.896ms

Unicast reply from 192.168.0.10 [00:0C:29:55:B7:DB]  0.923ms

Where the option -D mean: duplicate address detection mode.

In our example there is duplicate IP address in local LAN network.