Posted on Leave a comment

Configure Postfix to Send Mail Using an External SMTP Server

Sometimes due to network configuration you cannot use your SMTP server and you want to send emails through a proxy/relay. Below you can find how to configure a linux machine so that to act as an SMTP relay and forward emails to one SMTP server.

First if not installed you should install postfix package for your linux server depending on the distribution. For example on a RedHat server you should do:

sudo yum install postfix

Then you should edit the below postfix configuration lines. Postfix configuration is handled by /etc/postfix/main.cf

  • Change inet_interfaces from localhsot to all
inet_interfaces = all

Configure the source from which the emails will be sent. For example you can use a specific host or a subnet of hosts. In my case I chose a subnet so the second line should be uncommented.

#mynetworks_style = class
mynetworks_style = subnet
#mynetworks_style = host
  • Configure your subnet source Address and mask.
You can also specify the absolute pathname of a pattern file instead
of listing the patterns here. Specify type:table for table-based lookups
(the value on the table right-hand side is not used).

mynetworks = 192.168.0.0/16, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table
  • Add your SMTP server address in the latest line
#relayhost = $mydomain
#relayhost = [gateway.my.domain]
#relayhost = [mailserver.isp.tld]
#relayhost = uucphost
relayhost = [IP_Address]

Finally test your configuration by a powershell command to verify the functionality.

Send-MailMessage -From "sender@mail.com" -To "recipient@mail.com" -Subject "test email" -Body "test subject" -SMTPServer IP_Address
Posted on Leave a comment

Veeam Backup fails with log message: CBT Data is Invalid

Having your backup jobs fail is really a frustrating experience. 99,5% of the time, i’m experiencing successful backups, either over TSM, or Veeam Backup.

However, there were more than a handful of times that the CBT (Change Block Tracking) stopped working, generally causing backup jobs to fail.

The message listed in the Action log is the following:

CBT data is invalid, failing over to legacy incremental backup. No action is required, next job run should start using CBT again.
If CBT data remains invalid follow KB1113 to perform CBT reset. Usual cause is power loss.

I’ve tried to narrow the reasons this happens, to mostly being Datastore capacity outage or the speed of snapshots being removed during the backup process.

Luckily, there is a solution and it lurks in the VMWare KB2139574 (Resetting Changed Block Tracking for VMware vSphere virtual machines) .

You can generally follow one of the two recommended actions according to VMWare:

  • Power off the VM and reset CBT
  • Run the provided script to reset CBT on all VMs, which uses a snapshot method to save having to power the VMs off.

Personally, although i have tried both actions, i prefer the second approach, as most of the virtual Infrastructures contain VMs that are not easy to power off, or have different maintenance windows.

In any case, after reattempting to execute the Veeam backup job, the error is no longer there, and Change Block Tracking is back in use.

Posted on Leave a comment

Update standalone ESXi host with esxcli

There are multiple ways available to patch a VMware Infrastructure. Two of the very common ones are through Update Manager or esxcli.

Update Manager enables centralized, automated patch and version management for VMware vSphere and offers support for VMware ESXi hosts, and virtual machines. Unfortunately it is available only on vCenter deployments and you cannot use it on standalone hosts.

When you need to update a standalone host you can follow the procedure described below.

In my case I wanted to patch an ESXi host from 6.7 Build 8941472 to 6.7 Build 9484548.

First you download the patch definitions from VMware site. In my case I needed to download the below bundle package:

Then, the package should be uploaded to the local or any available datastore so that host can access it. Also ssh should be enabled so that one can connect on the host with root account.

file upload can be performed from the available esx host GUI

change directory and find the location of the file

Lastly execute the below command, and reboot the host

esxcli software vib update --depot filePath

The version available after the reboot, should be the new one

Posted on Leave a comment

How to install Windows 10 Technical Preview on Microsoft Hyper V (Windows 8.1 pro)

Here are the steps that you need to follow in order to install Windows 10 tech preview on Microsoft Hyper-V.

First of all go and download the .iso from

http://windows.microsoft.com/en-us/windows/preview-download

  1. Run hyper-v and click New -> Virtual Machine start-step
  2. Press next step1
  3. Give a name for the new virtual machine 
  4. Click Generation 1step3
  5. Provide ram size (suggest: 2 GB and more)step4
  6. Choose Not Connected for now.We will change that laterstep5
  7. Give your hard disk a size. You can store your virtual hard disc anywhere you want.You can also select one that already exists.step6
  8. Choose the bootable iso that you have downloaded from the windows insider pagestep7
  9. Press finishstep8
  10. Go to virtual switch managerstart-step
  11. New virtual network switch -> External
  12. Choose your network adapter and give virtual switch a namestep11
  13. Then select Settings -> Network Adapter -> and choose that you created on the previous stepstep12
  14. You are ready to rock!windows10-screenshot