- Fixing Linux-Cloud-Tools-Common in Ubuntu on Azure
- The Long Term Fix: Cloud-Tools-Common On Ubuntu 14.04 LTS
As part as our our continual efforts to improve the services and products we offer at Code Clinic Web Design we recently undertook the process of moving from our current VPS provider to the Azure Cloud Network operated by Microsoft.
As part of this process we set-up several Ubuntu Linux servers on Virtual Machines. On top of this we installed and configured the Webmin / Virtualmin / Usermin combination of server management tools, so as to simplify the process of adding new virtual server environments on which to host our clients websites and applications.
After a period of time we started running into errors such as this:
Setting up linux-cloud-tools-common (3.13.0-36.63) ... start: Job failed to start invoke-rc.d: initscript HV-kvp daemon, action "start" failed. dpkg: error processing linux package cloud-tools-common (--configure): subprocess installed post-installation script Returned error exit status 1 dpkg: dependency problems preventinfo configuration or linux-cloud-tools-3.13.0-34: linux-cloud-tools-3.13.0-34 depends on linux-cloud tools-common; HOWEVER: Package linux-cloud-tools-common is not configured yet.
Unable to fix this issue, we sought help from the Linux and Server communities, but received either no response or a lack of any suggestions that helped. Whilst there wasn’t and still isn’t many examples of others experiencing this problem, we did notice that in all cases this was a problem with Ubuntu on the Azure Network.
Within a short period of time we were experiencing further issues when trying to update or install other packages. This compounding of issues meant we were unable to restart Apache on the most seriously affected machine, and thus we had an emergency situation.
Fortunately, the flexibility of the Azure network and our use of Virtualmin, meant we were able to quickly create a new Virtual Machine on Azure and then install Virtualmin. Next we created backups of the websites(Virtual Servers) in Virtualmin, and uploaded them to the new VM Server.
Finally it was simply a case of updating the DNS records in Cloudflare CDN to point to the new Web Server, and all the sites were back online within a matter of minutes rather than hours. However, this was far from ideal.
With the new server and our other VM’s we were careful to monitor all future updates and installations to ensure this didn’t happen again. However, despite our best efforts we eventually ran into the issue again. Fortunately we were now sure that the issue resided with the upgrade process of the linux-cloud-tools-common package upgrade process.
Again, further calls to the community failed to provide any significant developments. So, after much research we stumbled on a number of similar issues, all of which appeared to have been left unresolved. That was until we eventually stumbled upon a forum thread posted in Dutch.
With a little help from Google Translate and fair bit of trial and error, we were able to determine that the problem was with the attempts by the Server to start the ‘HV-kvp daemon’. It’s not immediately clear what this daemon does and why it fails, but it was suggested that removing the call to initalise this daemon during the upgrade process would be enough to allow it to complete.
To do this it is necessary to open a terminal directly on the server or via a remote tool such as Putty. Once you are connected move to the /etc/init directory with
Now open the hv-kvp-daemon.conf file with your editor of choice eg:
sudo nano hv-kvp-daemon.conf
Now scroll to the last line in the file and comment it out, which should look like this:
Now add the following new line:
Now save and close the hv-kvp-daemon.conf file and you should now be able to perform the upgrade of your linux-cloud-tools-common package without issue. Just to be on the safe side we’d recommend re-diting your hv-kvp-daemon.conf to return it to its original state before performing any other upgrades or installations.