Fix resolution for VMware Fusion Unity

LOGO1

Fix resolution for VMware Fusion Unity

This is for VMware Fusion version 7.1 however it might work *not tested with other versions.

I’m just doing a quick write up about how to fix the annoying resolution problem when running applications in Unity on VMware Fusion. This issue just keeps coming back (after installing VMware Fusion) and I can never remember how to fix it. It’s obvious when you see it but it isn’t when you are in a panic trying to fix it!

Under the virtual machine, click settings

Click on Display

vmware fusion virtual machine settings

Click on “Use full resolution for Retina display”

vmware fusion ful resolution retina unity

VMTools will prompt you to log off

VMtools change user interface size settings log off

Now go into Unity view and you will now see things without a microscope!

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.

Creating a software RAID on Ubuntu/Debian

linux-logo-300x300

Creating a software raid of disks is quite easy in Ubuntu, I will assume the disks are attached (physically or virtually) to the guest operating system.

Currently Ubuntu supports the following raid levels:

  • RAID level 0
  • RAID level 1
  • RAID level 2
  • RAID level 3
  • RAID level 4
  • RAID level 5
  • RAID level 6
  • RAID level 10
  • RAID level 50
  • RAID level 0+1

In this example I am using sdb1 and sdc1 disks and settings the raid to a mirror (1) with a total mirrored size of 4TB (3906885440K)

  • Install mdadm (if not already installed)

  • Run mdadm to create the mirror

mdadm_create_raid1
  • Run mkfs.ext3 to create a ext3 filesystem on the mirror volume

mkfs.ext3_dev_md0
  • Mount the mirror by creating a mount point and running mount to mount the md0 volume

mount_raid1
  • Check to see if you can see the mirror

df_h_raid1
  • Check the status of the build

mdadm_raid_build_cat_proc
  • Add to fstab to auto mount on startup

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.

VMware Creating RDMs from Locally Attached SATA Disks

LOGO1

I recently had to connect two 4TB sata disks to a server to provide some raw storage to the network. Going on past experiences I didn’t want to virtualise the disks but rather present them to the virtual machine guest as a raw device mapping (RDM).

You will need a separate datastore that is separate to the ones you are attaching. It will have to be VMFS5 to get around the 2TB limit with VMFS3.

Note: This is not supported by VMware to the best of my knowledge.

Procedure

  1. Start a SSH session to the VMware ESX host (or if on the physical server, drop to console)
  2. Run fdisk to see the disk layout.

vmware_esx_fdisk_list
  1. You will need to find the vml identifier, you need to match that to the drive.

VMware_ESX_ls_dev_disks

In my example, the two I am interested in are:

vml.01000000002020202020202020202020205a33303346325742535434303030

vml.01000000002020202020202020202020205a33303351523246535434303030

  1. Now browse to the VMFS5 datastore you will be creating the RDM’s

Browse to RDM location
  1. Best practise would be to create a folder for the RDM’s to sit in

  1. Create the RDM’s by running the vmkfstools command (use the vml. location that you found in previous steps)

VMware_ESX_vmkfstools_RDM
  1. Verify you have the files created

VMware_ESX_RDM
  1. Attach to virtual machine
VMware_Use_Exisiting_Virtual_DiskVMware Select RDMVMware_RDM_AttachedVMware RDM_Physcial_LUN

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.

Limit SSH connections geographically

linux-logo-300x300

There is a real security risk to leaving your shell connection ports exposed to the internet especially if you don’t ever intend on connecting from Zimbabwe as well as other random countries.

This can limit brute force attack exposure and also save valuable resources and bandwidth by rejecting a packets before a tcp handshake.

Install GeoIP

You will need to implement a database that can be queried locally that stores IP ranges to countries.

Query GeoIP database

The script

Past the following in:

Enable script

Lock down SSH

Setup a deny all for the ssh daemon

Add the following into the deny file

Enable the script in the allow ssh file

Add the following into the allow file

Testing

Test the script by inputting the script name and then an IP afterwards

Should output something like the following:

Update GeoIP

There is only one constant with the world and that is change, IP addresses are no exception.

Create a new file called update_geo.sh in /scripts

Add the following into the file

Change the script to execute

Edit the crontab

Paste the following at the bottom of the crontab

Adding Colour to Linux Bash Shell

linux-logo-300x300

If the standard black and grey makes you feel uninspired, you can change this by adding two lines to your .bashrc file in the users profile.

1. Edit the .bashrc file

2. Add the following lines

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.