Category Archives: Linux

VMware VSAN delete/purge inaccessible objects

Sometimes it could happen, that you get inaccessible files on your ESXi Cluster with VSAN.
Here are the Steps to clean up inaccessible files with vCenter Server on Windows 2012R2:

Connect to vcenter server with rvc.bat in C:\Program Files\VMware\vCenter Server\rvc

login with administrator@vsphere.local@localhost:

C:\Program Files\VMware\vCenter Server\rvc>rvc.bat administrator@vsphere.local@localhost
 password:
 0 /
 1 localhost/
 >

Check command: vsan.check_state “pathToYourCluster”

> vsan.check_state /localhost/myDatacenter/computers/Cluster01/
 2016-07-14 07:34:49 +0200: Step 1: Check for inaccessible VSAN objects
 Detected 1 objects to be inaccessible
 Detected bf9c6a57-9cc3-d20c-ccb3-a0369f89ecac on 192.168.1.4 to be inaccessible

2016-07-14 07:34:50 +0200: Step 2: Check for invalid/inaccessible VMs

2016-07-14 07:34:50 +0200: Step 3: Check for VMs for which VC/hostd/vmx are out
 of sync
 Did not find VMs for which VC/hostd/vmx are out of sync

Delete inaccessible VSWP Objects command:
vsan.purge_inaccessible_vswp_objects /localhost/myDatacenter/computers/Cluster01/

vsan.purge_inaccessible_vswp_objects /localhost/myDatacenter/computers/Cluster01/
 2016-07-14 07:35:00 +0200: Collecting all inaccessible Virtual SAN objects...
 2016-07-14 07:35:00 +0200: Found 1 inaccessbile objects.
 2016-07-14 07:35:00 +0200: Selecting vswp objects from inaccessible objects by c
 hecking their extended attributes...
 2016-07-14 07:35:00 +0200: Found 0 inaccessible vswp objects.

Delete other inaccessible objects:
Connect to ESXi Server and issue the following command, which should show you the related objects:

/usr/lib/vmware/osfs/bin/objtool getAttr --bypassDom -u bf
9c6a57-9cc3-d20c-ccb3-a0369f89ecac -c

Check the output of the related object and make sure you can delete this file.

Delete the file with:

/usr/lib/vmware/osfs/bin/objtool delete -u bf9c6a57-9cc3-d
20c-ccb3-a0369f89ecac -f -v 10

Run check in vSphere Web Client on “Cluster” -> “Monitor” -> “Virtual SAN” -> “Health” -> Click on “Retest”.
Everything should be ok now.

LetsEncrypt on CentOS 6 – Free SSL certificate for everyone!

This is a short manual how to use Let’s Encrypt on CentOS 6 with Apache Webserver:

1. Install dependencies:

Download, unzip and install Python:

wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz
tar -xvpzf Python-2.7.11.tgz
cd Python-2.7.11
./configure
make altinstall

Install Git:

yum install git
git clone https://github.com/letsencrypt/letsencrypt

2. Stop apache:

Continue reading LetsEncrypt on CentOS 6 – Free SSL certificate for everyone!

Renew a self signed SSL-Certificate on CentOS

I recieved this e-mail from my webserver:

################# SSL Certificate Warning ################

  Certificate for hostname 'yourservername.com', in file (or by nickname):
     /etc/pki/tls/certs/localhost.crt

  The certificate needs to be renewed; this can be done
  using the 'genkey' program.

  Browsers will not be able to correctly connect to this
  web site using SSL until the certificate is renewed.

 ##########################################################
                                  Generated by certwatch(1)

So I had to renew this certificate on my CentOS Server. I found this blog-entry from Steve Jenkins.

All you have to do is to enter this command:

openssl req -new -days 365 -x509 -nodes -newkey rsa:2048 -out /etc/pki/tls/certs/localhost.crt -keyout /etc/pki/tls/private/localhost.key

And then restart the web server, in my case it’s apache:

apachectl restart

After this, you can check with your webbrowser if the new certificate is active. Check the new expire date. With mozilla firefox it’s “Extra” -> “Site information” -> “Security” -> “Show certificate”.

I know I have to do that again in one year, so I wrote it down here 🙂

VMware Player on CentOS if vmmon failed to start

Recently I updated the kernel of CentOS, after this update, I was not able to start any Virtual Machines in VMware Player. The following steps solved my problem:

1. Stop the VMware service with:

service vmware stop

2. Remove the kernel Module:

rm /lib/modules/$(uname -r)/misc/vmmon.ko

3. Build a new kernel module for the running kernel:
The variable $(uname -r) gives you the running kernel version.
If you get an error, make sure you have the package “kernel-devel” installed (yum install kernel-devel).

vmware-modconfig --console --build-mod vmmon /usr/bin/gcc /lib/modules/$(uname -r)/build/include/

4. Load Kernel Module:

depmod -a

5. Start the Service again:

service vmware start

The vmmon service should now start and You’re able to start the VM’s again. Good luck 😉

MiniBar

Mein aktuelles Projekt: Eine Bar aus einem Classic Mini-Heck!

Folgendes soll die Bar mit Hilfe eines Raspberry Pi’s sowie ein paar Relais können:

  • Lichter mit einer WebApp schalten
  • Musik ĂŒber AirPlay abspielen
  • Und natĂŒrlich unsere alkoholischen GetrĂ€nke aufbewahren 😉

Angefangen hat das ganze damit, dass meine Frau mir einen Schweisskurs geschenkt hat.  Von einem Kollegen im Berner Mini Club habe ich das passende Mini-Heck bekommen, gleichzeitig habe ich mit dem Entwurf der Relaissteuerung angefangen. Das sah dann so aus:

MiniBar-3-klein MiniBar-7

Danach bin ich damit zum Schweisskurs und habe unter Anderem der MiniBar vier höhenverstellbare FĂŒsse verpasst. Nun steht sie auf eigenen FĂŒssen.

Continue reading MiniBar