Usually you don’t need remote desktop or VNC on Linux servers running in the cloud. But as I wanted to try some scenarios with a Linux desktop and I actually don’t have a physical machine loaded with any Linux OS, I ended up setting up a Ubuntu server on Azure and enabling the remote desktop on it.
Obviously, I am not the first one who want to use remote desktop on servers running on cloud. There are plenty of posts on the internet talking about how to do it. Most of them are about using xrdp + xcfe4, including this one for Azure VMs. I am using Ubuntu 15.10 image. The only gotcha is that running the following command could uninstall the waagent service.
$sudo apt-get install ubuntu-desktop
This is a known issue that you can track on the github.com. To get waagent back, you have to reinstall it with the following:
$sudo apt-get install --reinstall walinuxagent
I ended up not installing the Ubuntu-desktop. Without it, you also avoid installing applications that you don’t need, such as those Office software.
Although xcfe4 is good enough as a lightweight window management system, I am more used to a GNOME like desktop environment. So I decided to try the MATE desktop. The configuration of it is very easy. Just run the following:
Recently I have to move my Ubuntu VM to another Windows Azure subscription. In order to do it, I have to move the blobs of vhds to the storage of that subscription. At the beginning, I thought it was simple, just all I need would be copying the blobs to my local disk and then uploading them to the new storage account. But when I tried to do it, it appeared unachievable because the downloading and uploading would spend too much time that I cannot afford. So I searched on the web to find if there is any other better way to do it.
After searching on the web for a while, I think the simplest way I can figure out is to use AzCopy, a tool from Windows Azure Storage team. This tool leverages the Asynchronous Cross-Account Copy feature which was introduced in Windows Azure in June 2012. It is a very easy to use command line tool. For example, to copy all blobs in the source container to the destination container, you just need the following command.
The best part is all copying happens on Windows Azure server side. It is very fast. The speed could go up to more than 100MB/s. It really saves a lot time and effort comparing to the copying to local way. Give it a try if you need to copy or move blobs between different azure storage account.
Windows Azure的虚拟机目前没有备份或快照整个虚拟机的功能。文档里关于capture image的文章并不是备份的方法，capture image会unprovision整个虚拟机。官方的备份方法是，对storage里的.vhd做快照。当虚拟机有问题的时候，就恢复.vhd的快照，然后重建虚拟机。我的快照还没做，要找时间做一下。
Update: 一个可以用来给.vhd做快照的免费的Windows Azure storage explore工具：Azure Explorer
初步体验，Windows Azure对开源系统的支持挺不错的。我从Gallery里直接选的Ubuntu Server 13.04，然后apt-get安装APH，配置apache，MySql和WordPress，一切顺利，顺带还把以前在DigiCert申请的SSL证书也用上了，目前看来一切正常。剩下的一个小问题是媒体文件的管理。我倾向于使用公开的媒体文件服务，比如flickr和YouTube，而不是把文件存储在WordPress里。不过，使用那些服务，上传和写文章就变得比较麻烦，不知道有没有好的编辑器插件可以解决这个上传的问题。或者试一下Windows Azure Storage for WordPress也说不定。
昨天blog页面打开突然变成空的了，post无法显示，但是tags和comments列表是正常的。这说明不是数据库连接的问题。我连上Windows Azure的管理页面看了一下，两台WebRole的机器昨天被重启了。Windows Azure的机器重启之后，系统会被重置，应用会重新部署。我在前面的post里说过，WordPress for SQL的plug-in有一个bug，以前我是通过手工上传更新后的文件解决的，并没有更新安装包。应用重新部署后，就的文件又回来了，bug就又出现了。