Compartilhar via


How To Publish an Internal Windows App on Azure Remote App

 

image

Today is a important day, Azure Team is officially releasing in General Availability Azure Remote App (ARA), if you like of Remote Desktop Services, you will love ARA. Imagine the following situation : delivery your Windows Apps (LOB), Office or any app that run on Windows Server 2012 R2 to your users from their desktops, tablets Windows, IOS and Android and your cell mobile Windows Phone without to need to implement nothing on premises, basically contract them as a service, friendly we can call them like RDP as a Service. Don’t confuse with VDI (Virtual Desktop Infrastructure), in first wave only publishing apps will be available, you can’t publish a desktop to your thin clients. Microsoft is studying and validating this possible scenario in the future. By the way let’s focus how to publish your Windows App internally on Azure Remote App.

 

You can deploy ARA to two ways : HYBRID and CLOUD

 

HYBRID mode allows you establishing a VPN between Azure Remote App Tenant / Network and you on premises environment and join your virtual machine image with your windows apps installed to your Active Directory Domain. However if your windows app needs to connect to a database or to do a query to any service to your on premises network ( client-server ) , it is possible.

 

CLOUD mode is more simple, less complex comparing to HYBRID scenario, you don’t need establishing VPN and your identity can be provided by Azure Active Directory or ADFS on premises. It resides completely in Azure and is created using the Quick create option in the Azure management portal.

 

TIP : Your subscription for Azure Remote App comes with template image that contain Office 2013 for trial use programs.

 

I am supposing that you already created Remote App service, but you don’t do that yet, create Remote App service. It can take up to 30 minutes to provision your service. After your Remote App service has been created, go to the Remote App quick start page to continue, during your publishing you need do select your custom image including your internal windows app, it is here that begins my article.

 

Azure Remote App uses Virtual Machines Generation 1 to provide publishing applications, VM Generation 2 is not supported so far, by the way you can’t deploy VHDX file, only VHD, it can be Dynamically or Fixed, we suggest Dynamically to accelerate upload and consume less space on Azure Storage, furthermore Encryption File System (EFS) need to be disabled and Remote Desktop Session Host and Desktop Experience installed. So let’s create a virtual machine on Hyper-V ( Hyper-V Server or Hyper-V Client of your Windows 8).

 

I am using my laptop with Windows 8.1 Hyper-V. Open your Disk Management (DISKMGMT.MSC), to Action menu and select Create VHD, select VHD format and Dynamically expanding. Take care to size, VHD must be maximum of 127 GB and multiple of 1024, it is mandatory, if you don’t do that you can have issues when try to do upload to Azure Store Blob. I have create a file of 60 GB of size, so 60 x 1024 = 61440 MB.

Capture

The disk must be initialized using the Master Boot Record (MBR) partitioning style. The GUI partition table (GPT) partition is not supported.

Captur1

Create volume, select NTFS file system and 64K on Allocation unit size to better performance, on Volume label, fill out to your preference name, here is AzureRemoteAppCI.

Capture8

After that, detach VHD to release disk.

Capture9

Open your Hyper-V Manager, create a new virtual machine, chose your preference path folder and select Generation 1 ( be careful, don’t choose Generation 2)

Capture12

Capture15

Select your ISO of Windows Server 2012 R2.

Capture18

Start VM and during installation select Standard version with GUI interface.

Capture19

You can create more than one volume but only one instance of operation system must be installed

Capture20

 

Wait for finishing operation system installation. ( Don’t forget only WS 2012 R2 is supported ).

Take a Log On, don’t join virtual machine on domain and install from Server Manager the following role and feature : Role Remote Desktop Session Host and Feature Desktop Experience

Capture29

Desktop Experience under User Interfaces and Infrastructure

Capture32

Wait for rebooting, after disable EFS, Run the following command at an elevated command windows:

C:\Fsutil behavior set disableencryption 1

Capture39

Now it is time to install your application ( don’t install your windows app before RDSH, Desktop Experience installed ). For testing purpose I have download Project My Screen App, this software project my Windows Phone screen to my monitor, it is a interesting app to do demos for Windows Phone. You can do download it here. Of course here is time to install your Windows App ( .MSI file )

https://www.microsoft.com/en-us/download/details.aspx?id=42536

Capture37

VERY IMPORTANT : Open your OneNote or Notepad and register full PATH and .exe file. Because you will not have access to VM Desktop do browser this file when you want to publish it, you need know it.

In my lab is that below

C:\Program Files (x86)\ProjectMyScreenApp\ProjectMyScreenApp.exe

Capture38

Take all settings that you need like configuration files, database setting and other thinks. All right ? Test your application, run it a lot time to guarantee that all was done, Now it is time to do a system preparation and to do upload VHD to Azure Storage Cloud.

SYSPREP the image. At an elevated command prompt, run the following commando :

C:\Windows\System32\Sysrep\Sysprep.exe /generalize /oobe /shutdown

Note : Don’t use the /mode:vm switch of the SYSPREP command even through this is a virtual machine.

Capture41

Wait for VM is shutdown, open your Azure Portal, select Remote App session and TEMPLATE IMAGES, select Upload a Template Image arrow.

Capture42

Fill out of a friendly name of your custom image in my case ProjectMyScreenApp-TEMPLATE and region that you want to deploy, click to arrow.

Capture43

Download script powershell Upload-AzureRemoteAppTemplateImage.ps1

Capture44

Open your Azure Power Shell as a Administrator, run Add-AzureAccount cmdlet, fill out with your credential of Azure Subscription. Copy and past all command how are in COMMAND TO RUN DIALOG BOX, don't change nothing, after you run a dialog prompt will open to you select your VHD, upload will start, wait for finishing, it can take some minutes if your internet access is not so good. Just wait !!

Capture47

When all are done, you are going to see templates available and Ready to use.

image 

Now we are going to publish our windows app, clique App Services, REMOTE APP, Quick Create, put your Friendly name, select your region and select your template that you have been created

Capture50

Wait for finishing, after click on Dashboard and publish remote app programs

Capture49

Now put your friendly name that remote users will see and full path of your .EXE app

Capture53

Give access permission, select on USER ACCESS and put your e-mail address, in my case my personal email, you have your Active Directory objects synchronized by DIRSYNC or Azure Active Directory Sync, you can grant access for your corporate users like alias@domain.com. Flag should be green. One invite will be sent to users inside.

image

image

https://www.remoteapp.windowsazure.com/

image

When you open Microsoft RemoteApp, you need to put your e-mail, my e-mail address is @outlook.com, it will redirect to authentication page of outlook.com, when I put my e-mail and password will show for us. If you are using your AD users, it will redirect to your Active Directory Federation Service (ADFS) Web Application Proxy ( or ADFS Proxy ) page.

image

Click on your Window App and wait for open. Done Project My Screen App is working and showing for me. 

Capture54

Believe or not, you can access by your Windows Phone too, just download from Windows Store, REMOTE DESKTOP APP, it is available here

https://www.windowsphone.com/pt-br/store/app/microsoft-remote-desktop-preview/299b09ab-207e-441c-9e8e-c8d66c20b76b 

Clique on + button and inform your credentials, done, all apps are available to you connect.

image

All apps are available for me to use.

image

When you click in Paint, it starts and

image

When I click on Project My Screen app I have a Project My Screen inside of my real physical Project My Screen

image

Azure Remote App Rocks ! This is all guys, I hope that this article can help you day by day of IT Pro Azure Admin !

Official document of Cloud Deployment for Azure Remote App is here.

https://azure.microsoft.com/en-us/documentation/articles/remoteapp-create-cloud-deployment/