Expanding an unmanaged disk on Azure linux VM

I have been working on a new project where our VMs are hosted on Microsoft Azure cloud. The default OS disk size for most Linux distros in Azure is 30GB. We needed more space so instead of adding a new virtual disk I ‘ve found out that it is possible to expand the OS disk. When the VMs were initially launched they were launched with unmanaged disks.

You should have in mind that if you need to resize the OS disk that:

  • You will need to stop the VM in order to resize the disk
  • You can not shrink the disk once you had it expand. Disk size reduction is not supported

In the following example the disk of VM will be resized from 30GB to 300GB.

Continue reading

Advertisements

KVM guests and synhronizing clock

I was launching a couple of Ubuntu 14.04 KVM guests and I ve noticed that time was wrong. OK I thought, a simple ntpdate command and ntp service enabled will fix the issue. Made a reboot of the guest host and show that the time was ok. Then I destroyed the guest and when I checked the time it was wrong. This can’t be right, I thought, and started researching what might be the issue. What I found is that KVM guests should always consider their hardware clock in UTC time while my guests configuration was in local time.

Continue reading

Unset/Remove apache’s X-Powered-By header in ubuntu

When a browser send a request to an apache web server, apache will send back the response data as well as response headers. You can check what kind of headers are send back with curl command.

$ curl -I http://mysite/

or if the site is on https

$ curl -Ik https://mysite/
Date: Mon, 07 Dec 2015 10:12:52 GMT
Server: Apache
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) X.X.XX
Cache-Control: no-cache

Continue reading