How to: Resize virtual machines in #Azure With #Powershell Multiple or Single virtual machines

With the new VM sizes in Azure you may want to change the Size as you get more VM for less money. but remember the VM will restart! so better fi

RDSTWEAKERS.COM

But changing the VM by hand is a time consuming  job So Powershell could be very handy in this case. you can change the Vm size easily with a one-liner

So first we need to login into the azure Subscription.

Login-AzureRmAccount

If you have multiple Subscriptions you need to select the right subscription.

$subscrip=Get-AzureRmSubscription | Out-GridView -OutputMode Single -Title ‘Please select a Azure Subscription.’
Select-AzureRmSubscription -TenantId  $subscrip.TenantId

Get-AzureRmVM

image

 

$vm = Get-AzureRmVM -VMName MVPCB10 -ResourceGroupName RSG-VNET
$vm.HardwareProfile.VmSize = "Standard_D2_v3"
Update-AzureRmVM -VM $vm -ResourceGroupName RSG-VNET

Ok this seems nice but I have 50 VM’s that I like to change

#set new Size to VM
1..5 | % {
$vm = Get-AzureRmVM -ResourceGroupName RSG-VNET -VMName MVPCB1$_
$vm.HardwareProfile.VmSize = "Standard_D13_v2_Promo"
Update-AzureRmVM -VM $vm -ResourceGroupName RSG-VNET

}

Better But if you used random names then the above will not really help you in quick size changing. The next step would be selecting all the VM that needs to be changed and selecting a Size for changing. That sounds great but how to start ?

With the Out-GridView you can do great things. to bad that the price is not available in this.

image

 

The script would be like this :

 

$VMList = Get-AzureRmVm | Out-GridView -OutputMode Multiple -Title ‘Please select an Azure Virtual Machine to resize.’;
$TargetSize = Get-AzureRmVmSize -Location westeurope | Out-GridView -OutputMode Single -Title ‘Please select a target Azure Virtual Machine size.’;
foreach ($VM in $VMList) {
  Write-output "Resizing Microsoft Azure Virtual Machine" $VM.Name "in Resource Group" $VM.ResourceGroupName "to size" $TargetSize
 
  Update-AzureRmVm -VM $VM -ResourceGroupName $VM.ResourceGroupName -Verbose
}
Get-AzureRmVm

After this the VM’s are all changed in a other Size.

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Google Me : https://www.google.nl

Bing Me : http://tinyurl.com/j6ny39w

LMGTFY : http://lmgtfy.com/?q=robert+smit+mvp+blog

https://rdstweakers.com

Posted July 18, 2017 by Robert Smit in Azure

Tagged with

Xenapp Essentials the replacement of Azure Remote App ? or #NoGo #ARA #Citrix #CXE #Cloud #RemoteApp

Well it is here it took some time but now you can start testing with the Xenapp Essentials. Is it any good and Can I use it for production. Well I was a little disappointed  I was charged upfront and the VM image I used was not usable because the Xenapp Essentials can’t handle Azure managed disks, As azure is pushing use managed disk. is Citrix Xenapp Essentials not capable of using managed disk. therefore I had to rebuild a new Image. The look and feel is the same as in Azure RemoteApp the nice thing is you can change sizing and scaling and to save money a time schedule. But for testing in a MSDN subscription I hate the upfront billing and Citrix did not tell this.

But why not build a RDS farm in Azure ? will show this in a the post below and using a Profile Cluster in Azure is also supported.

https://technet.microsoft.com/en-us/windows-server-docs/compute/remote-desktop-services/rds-storage-spaces-direct-deployment

For those who are unfamiliar with Azure Remote App check my blog post below.

https://robertsmit.wordpress.com/2014/06/20/microsoft-azure-hybrid-deployment-of-remoteapp-step-by-step-azure-microsoft-remoteapp-mvpbuzz-rds-hrdaas/

In this part I show you how to set things up. there are multiple ways and each has is own choices. Citrix is delivering a default Image and this is a Windows 2012 Image, well I’m not going for a default image but a custom. this need some work. This will be a log blog post and tons of pictures in it, As I tried to do step by step but some items you just need to know in Azure. Else it is gonna be a real long blog. But If you need more info on any item just ping me.

Well first I thought lets do this and writ a quick blog on hoe great this is. The amount off steps it took to get thing running is more than I expected. but it is not a bad thing. But be prepared it takes time!

The interesting part is should I use the Same Image or is there an easy migration path. Well it all depends as most things in IT.

The Deployment Xenapp Essentials workflow in just 7 tiles you are done. but some tiles takes several other little steps.

localized image

Do you want to stay on Windows server 2012R2 ? Well I don’t think so but there are good reasons to migrate as is but will this work. As this blog post is just on how to setup the Citrix Xenapp Essentials, the next post would be this integration and migration

As the Citrix Xenapp Essentials is in the Azure market place we also need a Citrix Account.

You can easily create a new Citrix Cloud by going to the following site: https://onboarding.cloud.com

there are a couple of questions and then you are ready to use the account.

imageimage

In case you have an issue with your account just open a support ticket and the Citrix Support will fix your issue quickly.

So In the Azure portal you can add the Citrix to the menu and go from there.

image

image

You can only manage from here and not add any this, so go to the Azure Marketplace (click NEW or  +)  do a Citrix search.

image

Select the Citrix XenApp Essentials

image

Do Create. and pick a name for the resource and use or create a resource group.

image

Give it a name and create or use an existing Resource Group.

image

As things are default you can change it and read the Text. Default it creates 25 users  Cost Estimate : $456.25 per month

Well for my demo I don’t need 25 users In need just 1.

image

Oh the minimum usage is 25 Ok then I need 25 users.

Pricing

$12.00 per user per month for XenApp Essentials Service, including Citrix NetScaler Gateway Service for secure access and 1 GB data transfer per user per month.

Users added today will be charged at the a prorated rate of $11.60 for the remainder of the current month. This amount will be charged immediately.

$6.25 per user per month for Microsoft Remote Access fee to use XenApp Essentials Service without purchasing a separate RDS CAL for this workload. Contact your Microsoft representative to bring your own RDS CAL.

Users added today will be charged at the a prorated rate of $6.04 for the remainder of the current month. This amount will be charged immediately.

You can purchase additional 25 GB Data Transfer Add-on. The cost is $12.00 per add-on per month

When you add users and data transfer add-on to the service, the new charges apply immediately. You can change the number of users and data transfer add-on each month. Your subscription renews automatically at the end of each month unless canceled.

image

Well the deployment took 6 seconds. that is the Place holder and not the VM’s self An order may take up to 4 hours to provision your service.

image

Shown from the Azure Portal

image

Visit Citrix Cloud to simplify the provisioning, on-going management and monitoring of Windows apps hosted on Azure. Here in the Azure portal, purchase additional seats and data transfer add-ons on-demand to meet the needs of a dynamic workforce.

Manage through Citrix Cloud

An order may take up to 4 hours to provision your service, and you will receive an email from the Citrix Cloud when your service is ready. If you do not receive an email within this time, please contact Citrix Support

Log into the XA Essentials Portal https://essentials.apps.cloud.com/

image

If you need more users you can add them in Azure.

Log into the XA Essentials Portal https://essentials.apps.cloud.com/

imageimage

image

An order may take up to 4 hours to provision your service, and you will receive an email from the Citrix Cloud when your service is ready. If you do not receive an email within this time, please contact Citrix Support

In almost 4 hours I got the email  image

image

Your Citrix product has been shipped via electronic delivery on April 01, 2017, to the email specified on your
purchase order.
Your Citrix order is completely fulfilled. All items on your purchase order have been shipped to the requested
address.

image 

Depending on your other Citrix product you choose the Xenapp Service.

image

There are 3 steps needed Linking the Subscription and upload a master Image and last create your catalog.

 

image image

The Microsoft login dialog box us prompting for credentials . You mus use an account that has admin privileges to your Azure Subscription.

Remember : If your user account is not working. the Account MUST be an Azure AD Account.

image

image

Next step is creating the XA Essentials Catalog. In these steps the Image will be mounted ,AD connections ,Network,Applications.

A important step with full of options. To setup XA Essentials you need:

  • Azure Subscription
  • Resource Group’s for Cloud connector,Images,etc but you can also use just one Resource Group
  • Domain Controller with Active Directory Domain Services and DNS
  • Virtual Network configured for domain usage
  • A Subnet with free IP addresses

Click Create Catalog.

image    image

Select the Network and the Resource group

image 

As I need some extra resources for creating Image I’ll use Extra Storage accounts

Image Requirements

Use the following requirements to create a custom image:

  • Create the image by using Azure Resource Manager.
  • Configure the image to use standard (not premium) storage.
  • Select Windows Server 2012 R2 or later.
  • Install and configure your apps
  • Install the Server OS VDA. You can download the VDA by using the Downloads link on the navigation bar.
  • Shut down the virtual machine and note the VHD location. Do not Sysprep the image.

And DON’T use Managed Storage accounts for a Custom Image in Xenapp Essentials Can’t use this in the Citrix Images #Fail.

and a good thing there is a brake on my Azure credits. Not for the blog. Seems Citrix is charging upfront. another Failure #Fail but this is only on my MSDN subscription. at this point I can’t finish my blog post #GRRRRR

image

So but the nice thing are picking my machine type like an G5 just for fun or needed.

image

Using a default VM as a D2 and for a default of 25 users. Think again and see your Perf resources right now. the cost will be at least the double for 25 users.

image

image

Scale settings For my Current Costumers we had a custom script in place for Automatic Scaling of Remote Desktop Session Hosts in Azure Virtual Machines

https://gallery.technet.microsoft.com/scriptcenter/Automatic-Scaling-of-9b4f5e76/view/Discussions

but in Citrix it is all there Currently it is maximized to 200 users but If I build more collections I can scale up even in the test environment

yes there are flaws in it but it is a replacement for ARA. second building this could take up some time but as you already paid for a month that renewing every month! 

the pricing is as described on the citrix site

xa-essentials-faq

Requires 25 user minimum. Includes NetScaler Gateway Service with 1 GB Data transfer per user per month.  Additional NetScaler Gateway Service 25 GB Data transfer Add-on available for $12 per pack per month
Available from Azure Marketplace when purchasing XenApp Essentials. Please consult your Microsoft representative to bring your own RDS CAL.

 

So there are now a couple options build a RDS farm in Azure good for large Company’s  or who are in need of more flexibility or using Citrix XenApp essentials and will microsoft come with an replacement for Azure remote App, when checking my blog post I see a huge hit on Azure RDS. the Citrix solution isn’t that cheap and has a minimum of 25 users. but building it you self it could be done on 1 server but the price will be more than $486 but who wants to run >2 users on a D2. when using SaaS applications or other Webbase stuff the 3 Gb memory and 14% or more CPU usage is not uncommon

image

Cheap No use full yes and an Azure Remote App Replacement yes Perfect absolutely NOT

In my next post I will do a dive deep into some configuration issues. see this like Azure RDS vs CXE.

 

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Google Me : https://www.google.nl

Bing Me : http://tinyurl.com/j6ny39w

LMGTFY : http://lmgtfy.com/?q=robert+smit+mvp+blog

Posted April 4, 2017 by Robert Smit in Windows Server 2012

Tagged with

Are you ready for TechDays 2016?

TechDays is een 2-daags topevenement voor developers en ops- of data-engineers die werken met de bekendste Open Source en Microsoft technologieën. Je maakt kennis met beproefde én nieuwe mogelijkheden om de ontwikkeling, implementatie en het beheer van applicaties op grote schaal te verbeteren en te versnellen. Op TechDays zie je welke processen, tools en technieken de wereld van IT transformeren.

techdays2016-logo

http://www.techdays.nl/

Posted September 27, 2016 by Robert Smit in TechDays

Tagged with

  • Tag