Using a Surface 2 (RT/ARM) to get actual work done + Remote Desktop + Visual Studio + Azure
I'm using just a Surface 2 today for work. Remember that the Surface 2 runs Office plus any apps in the Microsoft Store. It doesn't support installing desktop apps like Visual Studio or QuickBooks. It comes with Outlook, PowerPoint, Word, Excel, etc.
I didn't plan on this experiment this morning. In fact, I was supposed to go on a field trip with my son but the bus was full. Because I was going to be out all day I didn't bring my laptop. I had only my Surface 2 in the car, so when I wasn't able to go on the field trip, it was either go home and get a "real" computer or see what I could get done on the Surface.
NOTE: If I had my iPad and a Bluetooth keyboard and a stand, plus a remote desktop client for iOS I could do something similar.
I use it for Hulu, Netflix, Halo, email, Twitter, Facebook, Trello, Calendaring, etc and for that it's great. Split screen is cool, as I did email while watching a show on the plane yesterday. (What I really want is a full Surface 2 Pro but with the same exact size and weight of the Surface 2 proper.)
Anyway, I went to a bagel shop and figured I'd be limited to email today. I had my heart set on working on an project today (hacking on Project Kudu in Azure) and that was nagging at me. I also forgot my power adapter so I had only the battery life that I started with in order to get a day's work done.
I remembered that the Azure team recently added Visual Studio 2013 Virtual Machines to Azure accounts that are hooked up to MSDN. If you connect your Azure to your MSDN you get as much as US$150 in Azure Credits, and I never use all mine.
REMINDER: There are lots of Linux Virtual Machines (hundreds, in fact, if you include the VMDepot gallery of images) as well as a number of good SSH clients in the Windows Store that work on Surface. I use the "Remote Terminal" app. Here is a screenshot of me running htop on my Ubuntu machine where my mailing system runs in Azure. It's usually full screen, but I have the menus open here.
Here's some of the VMs to pick from. Soon the MSDN ones will move into an MSDN section on the left.
e
You can pick a VM from a small shared-core with less than a gig to a crazy 8 core 56 gig machine. I picked a "Medium" because it seemed similar to my laptop. It's got 2 dedicated cores and 3.5 gigs of RAM. There's also a 4 core 7 gig one, but since I'm not going to run Outlook or anything BUT Visual Studio (and some other small tools) I figured it would save money if I went a little small.
I named it "VSinTheSky" and noted that both PowerShell and RDP (Remote Desktop Protocol) ports were open in the firewall. I also put the new VM in a datacenter near me, so in the Western US region.
NOTE: Virtual Machines are billed when they are running, and you only pay for storage when they are shut down. Make sure to shut them down if you're not using them.
My friend Javier uses a Large VM for 10 hours a day and says it costs him about $3.60. I am cheap, so I'm using a Medium, so at 18 cents an hour, that will be $1.80 for the day if I work for 10 hours.
Remoting into Azure from a Surface 2 (RT/ARM)
There's a full-screen Remote Desktop client in the Windows Store that works nicely, but I like the sense of control I get from the "MSTSC.exe" desktop client, plus I can resize it a little more. You can run this on a Surface 2/RT with WindowsKey+R, then "mstsc" and enter. You can also save RDP files, as I have, on the desktop of my Surface 2. You can see in the screenshot at the top that there's a "Connect" button that lets you launch your Remote Desktop session directly from within the browser. It'll download and open the RDP there as well.
Optimizing the Azure VM for Performance
Azure Virtual Machines are allocated, I'm told, 500 IOPs (IO operations) per second, per disk. However, a great (and important) optimization is to add a data disk (or several) which gives you 500 more IOPS since each disk gets its own.
In the Azure Portal, click Attach Empty Disk.
TIP: To save time, if you have a lot of files, a large data disk, or a large project, make a VHD locally on your machine, mount it as a disk (you DID know that was built into Windows since Windows 7, right?) and get it ready. Then upload it to a Storage Blob in Azure and attach it to your VM.
When asked how big you want the disk, pick a large size. Some size you wouldn't think you'd need. Why? Turns out that Azure VHDs are "sparse." You are only billed for actual usage. If you make a 1TB disk but it only has 5 gigs used up, you're only charged for 5 gigs. I made my data disk 64 gigs since I'm just putting code on it for building in Visual Studio.
Remote into your Azure VM now, log in, and hit WindowsKey+X. Click Disk Management and partition and format your new drive. It may end up being your F drive as C is the system and D is for temp space. That temp disk is where the Windows swapfile goes,etc. That disk may go away so don't put anything on Temporary Storage.
I also moved my %TEMP% environment variable to D:\TEMP. I haven't measured if this was useful, but it feels more correct.
Here's "My PC" on the remote machine now:
It came with Visual Studio installed, I also pinned IE to the Taskbar, installed Github for Windows, Chrome, and VS Web Essentials, as well as Windows Live Writer that I'm typing in right now.
Speed, both Local and Remote
The Surface 2 is just SO much faster than the original. At least twice as fast, to me. It has a 1920x1080 screen plus I was remoted into a VM running also at 1920x1080 and I often forgot which was the host and which was local. There's really no lag when connecting to this machine in Azure. Perhaps it's because I'm using the Windows 8.x Remote Desktop client to connect to a Windows 2012R2 Server? I don't know. It's fast and clear, and I'm doing this from a café. SpeedTest.net says this café has 16Mbs down measured running on the Surface. I get 7Mbs on my LTE device it was also fast, so this tells me that if the VM is near you (the one I made in Azure is just one state over from where I live) then you should see similar speeds.
I thought perhaps the Azure VM had slow internet. Um. No.
Not Just a Dumb Terminal
I didn't use the Surface 2 exclusively as a dumb-ish terminal. Since it has IE11 and Outlook, I also did email while builds happened in the Remote Session. In this screenshot I'm setting up the remote machine, and installing Chrome after installing GitHub for Windows. I've got Outlook running there, The Verge, plus Twitter docked to the right. The remote session is the window in the middle. It was also cool to run Music in the background tethered over bluetooth to my new headphones.
Important Productivity Tips for using Remote Desktop on a Surface 2 (RT/ARM)
There's a number of small but extremely useful things to remember when using RDP on a Surface.
- You aren't limited to the Remote Desktop app that’s in the Microsoft Store.
- Run mstsc.exe and you’ll get the full desktop version of the Remote Desktop Client.
- This means you can use .RDP files and keep them on your desktop.
- You can copy/paste files (like I have with the images in this blog post) between your remote session and your host session. For example, I took screenshots from "outside" and pasted them to the desktop of my remote session.
- The Surface Type Cover has a row of Function keys that are also Charms keys. Invert their function to speed up your hotkey usage.
- However, if you want to do something like ALT-F4, you're expected to FN+ALT+F4 which is unacceptable to a keyboard focused developer like myself. You can toggle (invert) FN usage with FN+CAPS on a Type Cover.
- Know your basic hotkeys. Keep calm and use your keyboard.
- Win+X is something you'll use a lot in both the Remote and Local sessions. You can run command prompts, check device manager, setup disks in disk management, launch apps, and much more. Use it.
- Find a balance between your touchscreen and keyboard. If you haven’t brought an actual mouse, accept that you'll never be fast on the Surface Touchpad. It’s just too small and too felt-y. It's there for emergencies.
- Move quickly between touching the screen and your keyboard. Most times – even over a remote desktop session – using touch to drag a file or click an icon will be faster than the touchpad. Touch isn’t a replacement for input, it's an augmentation for what you’re already using.
- I have found that touch is the fastest way to get the text insert cursor (I-bar) pretty close to where I want it when editing text. I touch, then move one or two to the left or right. I've found this is WAY faster than using the mouse and WAY faster than cursor-ing around with the keyboard.
- While I made it through the day without a mouse, I think having an Arc Mouse or some small bluetooth mouse would have made things nicer. That said, it wasn't a huge deal as I'm mostly a keyboard + touch person. YMMV.
All in all, I'm impressed. I'm going to keep this VM around. This isn't a setup I will use every day as I have an X1 Carbon Touch, but it's comforting to know that I can go 7+ hours with a Surface in a café if it comes to that.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
If I had my iPad and a Bluetooth keyboard and a stand, plus a remote desktop client for iOS I could do something similar.
Splitting the screen is a big advantage. I tried to use my iPad for that purpose and every time I wanted to use browser to Google something or check my twitter, or email I lost focus. That is frustrating.
One thing I've tried and has worked pretty well is using Dropbox as a sync for code along with using Git. As you've shown, the Internet connection is pretty awesome, so the "heavy" use of Dropbox just works. I can make changes to projects, settings, etc. and know that it will get synced. So when I pull the code in a different VM, it just works.
Its a pity you have to put caveats everywhere (like the iPad one) but I understand why.
1) It would be nice to have a link to the Azure pricing calculator from the dashboard, so that you can gauge what you're considering might cost at that time. I know it's counter intuitive to sales, but as a non-millionaire consumer, I like seeing the price tag of what I'm shopping for.
2) When reviewing VM costs in the bandwidth calculator, it made me wonder what impact does remote desktop access have on bandwidth, and VHD on storage costs? Or any other services that may be needed?
It's worth noting that Microsoft recently released an official remote desktop client for iOS.
https://itunes.apple.com/us/app/microsoft-remote-desktop/id714464092
Have you tried - or know if it's possible - to set up software striping on two attached VHDs?
http://stackoverflow.com/questions/16597416/cant-create-multiple-striped-disk-volume-in-azure-vm
http://blogs.msdn.com/b/hakaneren/archive/2012/08/07/tuning-windows-azure-performance-more-thoughts.aspx
http://blogs.msdn.com/b/davidmcg/archive/2012/10/29/ye-olde-automated-16tb-windows-azure-virtual-machine-demo.aspx
As a side note does Azure have a solely based VM environment that is handled from a browser? I guess what I am asking is this. Does azure allow for a HTML5 interface to access the cloud VMs? if not this would be a solid for them to create.
I'm asking not just for myself, but because we utilize a lot of off-shore developers that currently use VM's that we provision in our data center. And we get charged out the WAZOO for the storage and maintenance. Some of these VM's are set up with very specific parameters and pre-loaded with the apps and code that the devs will work on.
We also have a few legacy applications that require some old third-party tools and apps be installed (Crystal Reports ugh.) and it would be nice to have a small VM's in Azure that we could spin up.
Great tip, really love it and already have a beautiful Dev environment in Azure.
One question. You moved the %Temp% to point to the temporary drive. However, you are not sure what happens there, so azure could as well remove the Temp folder. What happens if you have your %Temp% point to that location and after a reboot this location is gone?
Thanks!
Erik
For Windows 8, you can configure a Windows Server 2012 VM with Visual Studio 2012, as outlined in this post by Keith Mayer.
MSDN has some info on powershell commandlets that may shed some light on what you want to do.
I was wondering if it were possible to have two profiles for the same VHD. Meaning can I create a Medium instance for use when I don't care about speed...but create a large one for when I do...but only have one OS disk configured...
Think this is the soonest that an article went from publish to "outdated" that I've ever seen.
Referencing VS Online, that is.
http://www.windowsazure.com/en-us/pricing/details/virtual-machines/
For details, have a look at "FAQ How can I check that I have properly stopped a VM and that I am not being billed for it?"
This caught me out when playing with a config at work, £64 later :(
I'm pretty sure that is NOT true.
Although I had shut down my 1 VM, "Compute Hours" continued to accrue @48 / day (Medium VM).
You must make sure your VM's staus is "Stopped(deallocated)", not merely "Stopped".
See here: http://www.windowsazure.com/en-us/pricing/details/virtual-machines/#
One thing that is seriously missing on the Surface, and WinRT in general, is a blogging client. Microsoft would do well to port LiveWriter. It's exactly enough blogging platform. Word is too big (and doesn't upload images to Community Server blogs), Notepad is too small, Internet Explorer editing over the web is too remote - inconvenient on the bus, which is where most of my ideas seem to come.
But... Would you like to tell me how much per month I should pay for dev environment like above in Azure?
Comments are closed.