Search

Void Technology

IT Recipes

Redirect one port number to another ip using firewallD

hi,


# firewall-cmd --zone=public --add-masquerade --permanent
# firewall-cmd --zone=public --add-forward-port=port=PORTNUMBER:proto=[tcp/udp]:toaddr=X.X.X.X --permanent
# firewall-cmd --reload

Get your list of plugins and version installed in a plugins.txt format (for docker)

Go to your Jenkins instance and run this Script

Jenkins.instance.pluginManager.plugins.each{
  plugin -> 
    println ("${plugin.getShortName()}:${plugin.getVersion()}")
}

Enable “Boot After Power Failure” in a Mac Mini 2010 Late with Ubuntu

In a Mac Mini late 2010 you need to execute the following command on each reboot (because the configuration is flashed in every boot)
sudo setpci -s 00:03.0 0x7b.b=19

So you can add this to your /etc/rc.local

How to test?

Reboot, and remove the power cable, connect again… and your Mac Mini should Boot

Docker: Fix aufs failed to remove root filesystem

Hi all,

To remember how to fix this problem when you try to remove a container (usually I’m facing this using docker compose because creates and destroy many containers in a row) i visit this link https://coderwall.com/p/h24pgw/fix-leftover-docker-mounts but sometimes I found that the coderwall server is down, so, i will paste the code that solve my problems

but before, I usually do

sudo service docker restart

then, executes the code

sudo umount -l $(grep 'aufs' /proc/mounts | awk '{print$2}' | sort -r)

Hope it helps

Handle docker containers like services in Unix: init.d way

Hi all,

I have been working in a skeleton script to handle docker containers as a services (boot with the box, start|stop via command line with docker commands abstraction).

So, the first result is a skeleton service file for InitD that you can find in the github repository.

Instructions about how to use, config, etc. are in the repo itself.

Hope it helps!

Install Latest NVIDIA drivers in Ubuntu based OS

Hi,

In order to use your NVIDIA card with ubuntu based OS, just


sudo add-apt-repository ppa:xorg-edgers/ppa -y
sudo apt-get update
sudo apt-get install nvidia-current

To Check if the driver is in use:
lspci -vnn | grep -i VGA -A 10
Check the output for this line:
Kernel driver in use: nvidia

Hope it helps!

Add USB Disk As DataStore in ESXI 6.0

Hi All,

just follow this link steps
http://www.virten.net/2015/10/usb-devices-as-vmfs-datastore-in-vsphere-esxi-6-0/

I will copy quickly the steps because sometimes people delete posts and I lost the information…


# /etc/init.d/usbarbitrator stop
# chkconfig usbarbitrator off
Plug in the USB Device to your ESXi host
# ls /dev/disks/
Disks starts with mpx...
# partedUtil mklabel /dev/disks/mpx.DISKHASH gpt
To create a partition you need to know the start sector, end sector, which depends on the device size and the GUID.
The GUID for VMFS is AA31E02A400F11DB9590000C2911D1B8
calculate the endsector with the following command:
# eval expr $(partedUtil getptbl /dev/disks/mpx.DISKHASH | tail -1 | awk '{print $1 " \\* " $2 " \\* " $3}') - 1
31278554 <- take this result
Create the VMFS partition (Replace with your endsector)
# partedUtil setptbl /dev/disks/mpx..DISKHASH gpt "1 2048 previous-result AA31E02A400F11DB9590000C2911D1B8 0"
Format the partition with VMFS5
~ # vmkfstools -C vmfs5 -S USB-Stick mpx..DISKHASH:1

And then, in the ESXI app you can see the Disks as DataStore available.

Hope it helps

FIX: Linux in UK Keyboard when type @ is typing Ω

Hi,

today when i was trying to type @ my keyboard was always typing Ω.
Locales were OK, and using all the variants for UK keyboard I was giving the same result.

To fix this issue just check your map in the key 24, and probably should appears as:
xmodmap -pk
>> 24 0x0071 (q) 0x0051 (Q) 0x0071 (q) 0x0051 (Q) 0x0040 (at) 0x07d9 (Greek_OMEGA)

Then, basically you need to map the “at” in the spaces where isn’t
xmodmap -e "keycode 24 = q Q q Q at at"

And now, you can type again your at key properly

Hope it helps!

Fix for Gtk-WARNING **: Unable to locate theme engine in module_path: “murrine” in Ubuntu

Hi,

Under my System:


Ubuntu 14.04 LTS 64-bit

When I tried to install VMWare Workstation PRO although it’s run properly, in the Console appears the following message


(vmware-installer.py:3650): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(vmware-installer.py:3650): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine", Gtk-Message: Failed to load module "canberra-gtk-module": libcanberra-gtk-module.so: cannot open shared object file: No such file or directory

If you want remove these messages just install the murrine gtk2 engine doing

sudo apt-get install gtk2-engines-murrine

Could happen that you already have this package installed on your system, then, the problem is that the installer bundle is an x86 application, so you need the librearies for i386 so

sudo apt-get install gtk2-engines-murrine:i386

this should fix the warnings.

Cheers!

Blog at WordPress.com.

Up ↑