Skip to main content

Use your own machine with Visual Studio Online

With Visual Studio Online, you get a fully managed development environment in the cloud on demand. Recently they announced that you can also register your own machine and access it remotely through Visual Studio Code or the Visual Studio Online Web Editor.

Why would you want to do that?

Microsoft mentions the following reasons:

This is a great option for developers that want to cloud-connect an already configured work or home machine for anywhere access, or take advantage of the Visual Studio Online developer experience for specialized hardware we don’t currently support.

Let’s try it!

First make sure that you have an existing development plan:

  • Login using your company or Microsoft account
  • Check the top bar.
    • You have an existing plan? Great you can skip to the next step.

    • You don’t have an existing plan? Let’s continue…

  • Click on the Create environment button

  • The Create a new billing plan window appears. Enter the necessary details.

  • Click on Create. Now the Create an Enviroment window appears.

  • As we want to use our own machine, we can skip this step. Just click Cancel.

Now it’s time to register our machine through the CLI. First we have to download and install the CLI:

  • On Windows:
    • Install via Powershell by download and executing our script.
  • On macOS:
    • brew install microsoft/vsonline/vso
  • On Linux:
    • apt install vso

Once the CLI is installed, run ‘VSO start’. During the process, you will be asked to login through your browser.

[2020-04-17 07:09:30.147 CLI I] vso v1.0.2005.59801 (pid: 22936)
[2020-04-17 07:09:30.454 CLI I] Authenticating...
To sign in, use a web browser to open the page
https://microsoft.com/devicelogin and enter the code <CODE> to authenticate.
Would you like to run as a persistent service/daemon? [Y/n]: n
[2020-04-17 07:10:18.108 CLI I] Will run as a process
[2020-04-17 07:10:18.623 CLI I] A VSO plan is required to register your environment.
[2020-04-17 07:10:18.627 CLI I] Using VSO plan: /subscriptions/<subscriptionid>/resourceGroups/vso-rg-a7ff597/providers/Microsoft.VSOnline/plans/vso-plan-westeurope
Enter an environment name or blank to use [<MachineName>]:
[2020-04-17 07:10:27.634 CLI I] Creating your environment...
[2020-04-17 07:10:29.153 CLI I] Saving local configurations...
[2020-04-17 07:10:29.321 CLI I] Authenticating...
[2020-04-17 07:10:31.936 CLI I] Waiting for environment to become available...
[2020-04-17 07:10:38.483 CLI I] All done! Connect: https://online.visualstudio.com/environment/<environmentid>

Now if you open up Visual Studio Online, you should see your own machine:

To remove your machine again, you can use ‘VSO stop’:

[2020-04-17 07:33:47.818 CLI I] vso v1.0.2005.59801 (pid: 8792)
Shared workspace not found: True
[2020-04-17 07:33:48.524 CLI I] Authenticating...
To sign in, use a web browser to open the page
https://microsoft.com/devicelogin and enter the code <CODE> to authenticate.
[2020-04-17 07:34:34.313 CLI I] Authentication successful. Removing your environment.
[2020-04-17 07:34:35.340 CLI I] Sucessfully removed your local environment.

Popular posts from this blog

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.

Kubernetes–Limit your environmental impact

Reducing the carbon footprint and CO2 emission of our (cloud) workloads, is a responsibility of all of us. If you are running a Kubernetes cluster, have a look at Kube-Green . kube-green is a simple Kubernetes operator that automatically shuts down (some of) your pods when you don't need them. A single pod produces about 11 Kg CO2eq per year( here the calculation). Reason enough to give it a try! Installing kube-green in your cluster The easiest way to install the operator in your cluster is through kubectl. We first need to install a cert-manager: kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml Remark: Wait a minute before you continue as it can take some time before the cert-manager is up & running inside your cluster. Now we can install the kube-green operator: kubectl apply -f https://github.com/kube-green/kube-green/releases/latest/download/kube-green.yaml Now in the namespace where we want t...

DevToys–A swiss army knife for developers

As a developer there are a lot of small tasks you need to do as part of your coding, debugging and testing activities.  DevToys is an offline windows app that tries to help you with these tasks. Instead of using different websites you get a fully offline experience offering help for a large list of tasks. Many tools are available. Here is the current list: Converters JSON <> YAML Timestamp Number Base Cron Parser Encoders / Decoders HTML URL Base64 Text & Image GZip JWT Decoder Formatters JSON SQL XML Generators Hash (MD5, SHA1, SHA256, SHA512) UUID 1 and 4 Lorem Ipsum Checksum Text Escape / Unescape Inspector & Case Converter Regex Tester Text Comparer XML Validator Markdown Preview Graphic Col...