Hi Dean, Is there any way to stop being charged for a stateless VM when i am not using it? If i go this route, is the only way to delete then recreate a new one from image?
That is correct. The nature of stateless VMs is like a container if you are not using it, You delete it. When you want to use it again, you create a new one. If you want the VM to be powered off instead of deleted, then don’t do ephemeral disks, because that is the only way to use them
Looking at changing my existing host pools to use ephemeral disks. I have a lot of templates already, but not quite sure where to plug in the appropriate information. It seems like the key code is here: "storageProfile": { "osDisk": { "name": "[concat(variables('VMName'),copyIndex(),'-OSDisk')]", "createOption": "FromImage", "managedDisk": { "storageAccountType": "Standard_LRS" }, "caching": "ReadOnly", "diffDiskSettings": { "option": "Local" } }, Just a little lost as to how I could get that into some of the more basic templates that I've exported from the web gui.
I think I'm seeing part of the issue - I'm trying to deploy new host pools with VMs for the first time, which requires the vmtemplate string. Trying to figure out where to put these storage profile options in that string to get it to create ephemeral disks on VMs from the start.
Yeah, the storage setting for option local is what you need, also keep in mind that the VM SKU you select must also support ephemeral disk or it will fail.
look at my github for the example to help you with the ARM Template code. github.com/DeanCefola/Azure-WVD/blob/master/WVDTemplates/WVD-NewHost/WVD-NewEphemeralHost.json
@@AzureAcademy Thanks - found my trouble - it was pulling a nested template from a place that did not have a template for ephemeral disks. Once I pointed that to a different location where I put an ephemeral disk template, I was good.
Great it's a good feature. I've got few questions: If we use ephemeral disk in WVD, then we can not turn off vms to save the cost? When MSFT is going to release GUI to manage WVD? When MSFT starts supporting a same user can be a part of RemoteApp and Desktop same pool? Actually I'm deploying WVD for bunch of customers and they ask about the above features.
On the new portal....stay tuned! 👍 On the RemoteApp and Desktop group...all I will say is...just wait a little longer 👍 Yes you can't deallocate Stateless VMs, however you can delete them to save $$$ If your Image is up to date and everything you need in WVD is packaged in the Image...and you are using FSLogix, then the VM can be thrown away and reprovisioned without loss. It is just another possibility to manage WVD.
@@AzureAcademy ok thanks for your valuable response. Last question, yesterday I was provisioning host pool from my custom image and I got stuck at domain joining process. I tried 3 times but deployment didn't succeed and it's going on without throwing any error.
normally that means that the domain password you are using is not correct...in some rare cases the account you are using has exceeded the setting in your domain to create / add AD Computer objects to your domain. Check the password first... You can also try and precreate the AD Computer objects first and see if that fixes it If you need the info on the AD Computer issue Open ADSI Edit and right click on your domain folder on the left and select properties check the ms-DS-MachineAccountQuota value. The default is 10 which is generally enough
The scaling Automation solution would not apply to the stateless VMs...Remember we can't deallocate a stateless VM... In the Scaling Automation there is a parameter called "MaintenanceTagName" it is used when you want to exclude a VM from the scaling automation So you can have the stateless and the statefull VMs in the same host pool...add a tag to the stateless VMs, for example TAG NAME = "State" | TAG VALUE = "Stateless" In the Scaling automation Logic App add the word Stateless to the MaintenanceTagName
I dont think joining VM do domain is needed with new WVD portal as we see new the domain and ou option there. When we try to add new session hosts (with new wvd), can we select ephemeral os disk option ? If no, then we have deploy vms separately and join them to domain as you stated in the video right?
All WVD VMs need to be joined to your Active Directory Domain Ganesh S M. When you build the VMs with the WVD Admin Portal the VMs are joined to the domain as part of the process. You cannot select the option or Ephemeral disks today...so you would need to follow the process I showed in the video if you want to use it, which is build the VMs then join them to WVD. I did this with my template which uses a custom script extension.
Can you not make all of the joining to domain and WVD host pool stuff automated so it doesn't have to be done each time you want to scale up or down? Or is this handled when you create the host pool? I believe there are options there for machine name, domain, and OU. Otherwise it seems pretty sweet.
Yes you can...I do this is a VM extension. Each vm you build will separately join the domain as part of the build process. I have it all working in my stateless WVD deployments on My GitHub. Give it a try!
Love your videos Dean they are helping me immensely, and I cannot thank you enough. I wish you could help me stop hitting all the "traps for noobies" that force me to walk away from the computer for a timeout :D I get a generic error of "The selected image is too large for the OS cache and temp disk of the selected instance." I had originally deployed this image and customised it, went to deploy from image definition and realised that I could not select an ephemeral disk. Backtracked all the way to the gallery image of windows multisession image, I believe to be the culprit. Am I mising something, or are the win 10/11 multi session images not supported on ephemeral disks?
The problem is that ephemeral VMs require the size of the image and the OSDisk it deploys to be smaller then the OS Cache on the host. Because the OS runs on that Azure Host cache. So if you have a larger image, you need a different VM size that has a larger OS Disk Cache on it. All the sizes and which support ephemeral VMs are in the Azure docs
@@AzureAcademy I tried the largest possible and none worked. I went back to the "windows 11 multi session + apps" image in the marketplace and was unable to select ephemeral disks. If I changed the image to a ubuntu or windows 2019 smalldisk, then I was able to select ephemeral disk as an option for deployment.
I will check that image…but the main issue in it working is if the VM size has enough disk cache for your image size…Check the docs for a host size that will work for that image
@@AzureAcademy I am using Standard D8s v5 compute. Should be more than enough for the gallery image that was initially used. But as I said even if I try to use that size against the gallery image and choose ephemeral, I still get the message.
This was shown in the video…You need to pick the proper SKU and set the disk type. Then add in AVD agent. You can use my GitHub to do all this easily github.com/DeanCefola/Azure-WVD/tree/master/WVDTemplates/WVD-NewHost
Hello Dean, Very useful video ;) One quick question : the VM joined the domain but no the AVD hostpool. I did it manually by reinstalling Azure Virtual Desktop Agent. Do you know if that part needs to be updated ? Thanks
@@AzureAcademy yep. I tried 3 times with different and new generated tokens. And I did not see any error, I also checked the used tokens in the log in VM temp folder :(
hi, do you know how to configure stateless disk for WVD when using the template via Azure Devops, I do not know which parameter to change, any idea? thanks Marco
It you look at my GitHub template for Ephemeral disks you will see all the values that you need to have. Then you can make those changes in your template…or just use my template in your DevOps raw.githubusercontent.com/DeanCefola/Azure-WVD/master/WVDTemplates/WVD-NewHost/WVD-NewEphemeralHost.json
Yes it can…take my template and add it to either your DevOps pipeline on a schedule to run everyday Then at the end of the day have a script or command to delete all existing ephemeral Hosts Then repeat If you are not into DevOps you can do the same thing in Azure Automation
@@AzureAcademy Is it possible to make this solution to provision a new VM on each Logon? I am looking to build a 'Kiosk' solution that delivers a fresh vm cut from the Gold Image on each logon.
The only way that could work is if you had a management solution that would wipe and build a new VM when a user logs off the kiosk. And if you are hoping it to be as fast as user one clicks log off… Then 10 seconds later user 2 signs in…I know of nothing that is that fast. If you do…please let me know so I can make a video about it ☺️
I don’t recall disk size being the issue because I used a Microsoft market place image for Win 10 multi-session...which is 128GB. The issue that is more important is that the VM SKU supports ephemeral disk
@@AzureAcademy thank you for the advice. I’ll keep trying. The problem I have is when creating a new VM from my custom 2004 marketplace image, when trying to select ephemeral disk is greyed out and it says “my image is too large” no matter which instance size I pick. but I’ll keep trying. Thank you.
Ok I found the difference, I was using a “shared image gallery” which did not work for me. Once I created a “Standard” Image I was now able to select ephemeral disk. Thanks for everything you do.
hey @Mahammad. you don't patch stateless VMs. You have to update the image. Then if you want to deploy those new VMs to your WVD Host Pool, you need to have the image in the Shared Image Gallery. See my video on that here -- th-cam.com/video/2LxvwR9LGWQ/w-d-xo.html
@@AzureAcademy Hi Dean, thank you for this fantastic content :) I've one quick question: Do I even need an Image when I use stateless VMs or could I just rebuild them from the marketplace (e.g. every morning or based on a scaling schedule) and customize them with a custom script extension? Have you ever tried this? I want to keep the "operational footprint" as small as possible. All Applications would then be assigned using MSIX App Attach. Thank you!
You certainly can rebuild from the Azure Marketplace, the only think you need to think about is what you need in the image and can you do all that as part of an image pipeline. In fact in another 2 weeks I will be releasing a video on the Azure Image Builder and how you can do exactly this!
Thanks for your work! Im tried to use your ephermal host template from github but the machines wont join the the hostpool. When im reinstalling the Avd client and register the machine manually everything works fine. Could you help me out here?
@@AzureAcademy Yes thats correct. When i do it manually the VM registers in seconds. The token isn‘t expired and i also tried it with a fresh generated token.
I will need to try this!! Great work!
Awesome, let me know how it goes!
Dean, thanks so much, such a great topic and great idea. I may hit you up on Teams at some point. Thanks for helping me ramp up on WVD.
Happy it was a help to you...Thanks for the feedback!
Hi Dean,
Is there any way to stop being charged for a stateless VM when i am not using it? If i go this route, is the only way to delete then recreate a new one from image?
That is correct. The nature of stateless VMs is like a container if you are not using it, You delete it. When you want to use it again, you create a new one. If you want the VM to be powered off instead of deleted, then don’t do ephemeral disks, because that is the only way to use them
Looking at changing my existing host pools to use ephemeral disks. I have a lot of templates already, but not quite sure where to plug in the appropriate information. It seems like the key code is here:
"storageProfile": {
"osDisk": {
"name": "[concat(variables('VMName'),copyIndex(),'-OSDisk')]",
"createOption": "FromImage",
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"caching": "ReadOnly",
"diffDiskSettings": {
"option": "Local"
}
},
Just a little lost as to how I could get that into some of the more basic templates that I've exported from the web gui.
I think I'm seeing part of the issue - I'm trying to deploy new host pools with VMs for the first time, which requires the vmtemplate string. Trying to figure out where to put these storage profile options in that string to get it to create ephemeral disks on VMs from the start.
Yeah, the storage setting for option local is what you need, also keep in mind that the VM SKU you select must also support ephemeral disk or it will fail.
look at my github for the example to help you with the ARM Template code. github.com/DeanCefola/Azure-WVD/blob/master/WVDTemplates/WVD-NewHost/WVD-NewEphemeralHost.json
@@AzureAcademy Thanks - found my trouble - it was pulling a nested template from a place that did not have a template for ephemeral disks. Once I pointed that to a different location where I put an ephemeral disk template, I was good.
cool
Great it's a good feature. I've got few questions:
If we use ephemeral disk in WVD, then we can not turn off vms to save the cost?
When MSFT is going to release GUI to manage WVD?
When MSFT starts supporting a same user can be a part of RemoteApp and Desktop same pool?
Actually I'm deploying WVD for bunch of customers and they ask about the above features.
On the new portal....stay tuned! 👍
On the RemoteApp and Desktop group...all I will say is...just wait a little longer 👍
Yes you can't deallocate Stateless VMs, however you can delete them to save $$$
If your Image is up to date and everything you need in WVD is packaged in the Image...and you are using FSLogix, then the VM can be thrown away and reprovisioned without loss.
It is just another possibility to manage WVD.
@@AzureAcademy ok thanks for your valuable response.
Last question, yesterday I was provisioning host pool from my custom image and I got stuck at domain joining process. I tried 3 times but deployment didn't succeed and it's going on without throwing any error.
normally that means that the domain password you are using is not correct...in some rare cases the account you are using has exceeded the setting in your domain to create / add AD Computer objects to your domain.
Check the password first...
You can also try and precreate the AD Computer objects first and see if that fixes it
If you need the info on the AD Computer issue Open ADSI Edit and right click on your domain folder on the left and select properties
check the ms-DS-MachineAccountQuota value. The default is 10 which is generally enough
@@AzureAcademy great thank you so much 🙂👍
Anytime adeel!
Very cool video series!
How would those stateless VMs integrate with the scaling runbook you talked about some videos before?
The scaling Automation solution would not apply to the stateless VMs...Remember we can't deallocate a stateless VM...
In the Scaling Automation there is a parameter called "MaintenanceTagName" it is used when you want to exclude a VM from the scaling automation
So you can have the stateless and the statefull VMs in the same host pool...add a tag to the stateless VMs, for example
TAG NAME = "State" | TAG VALUE = "Stateless"
In the Scaling automation Logic App add the word Stateless to the MaintenanceTagName
You are a life saver. Thank you!
Any time...how did I save your life exactly? Let me know if I can save your life again by creating a new video for you!
I dont think joining VM do domain is needed with new WVD portal as we see new the domain and ou option there. When we try to add new session hosts (with new wvd), can we select ephemeral os disk option ? If no, then we have deploy vms separately and join them to domain as you stated in the video right?
All WVD VMs need to be joined to your Active Directory Domain Ganesh S M.
When you build the VMs with the WVD Admin Portal the VMs are joined to the domain as part of the process. You cannot select the option or Ephemeral disks today...so you would need to follow the process I showed in the video if you want to use it, which is build the VMs then join them to WVD. I did this with my template which uses a custom script extension.
Can you not make all of the joining to domain and WVD host pool stuff automated so it doesn't have to be done each time you want to scale up or down? Or is this handled when you create the host pool? I believe there are options there for machine name, domain, and OU. Otherwise it seems pretty sweet.
Yes you can...I do this is a VM extension. Each vm you build will separately join the domain as part of the build process.
I have it all working in my stateless WVD deployments on My GitHub. Give it a try!
Love your videos Dean they are helping me immensely, and I cannot thank you enough. I wish you could help me stop hitting all the "traps for noobies" that force me to walk away from the computer for a timeout :D
I get a generic error of "The selected image is too large for the OS cache and temp disk of the selected instance." I had originally deployed this image and customised it, went to deploy from image definition and realised that I could not select an ephemeral disk. Backtracked all the way to the gallery image of windows multisession image, I believe to be the culprit.
Am I mising something, or are the win 10/11 multi session images not supported on ephemeral disks?
The problem is that ephemeral VMs require the size of the image and the OSDisk it deploys to be smaller then the OS Cache on the host.
Because the OS runs on that Azure Host cache.
So if you have a larger image, you need a different VM size that has a larger OS Disk Cache on it. All the sizes and which support ephemeral VMs are in the Azure docs
@@AzureAcademy I tried the largest possible and none worked. I went back to the "windows 11 multi session + apps" image in the marketplace and was unable to select ephemeral disks. If I changed the image to a ubuntu or windows 2019 smalldisk, then I was able to select ephemeral disk as an option for deployment.
I will check that image…but the main issue in it working is if the VM size has enough disk cache for your image size…Check the docs for a host size that will work for that image
+Grant Joslin what is the VM size you are trying to use?
@@AzureAcademy I am using Standard D8s v5 compute. Should be more than enough for the gallery image that was initially used. But as I said even if I try to use that size against the gallery image and choose ephemeral, I still get the message.
Thanks
Anytime, thanks for your support!
Hello Mr. Dean, Happy New Year! Question, How do I create a hostpool with ephemral disks session hosts?
This was shown in the video…You need to pick the proper SKU and set the disk type. Then add in AVD agent.
You can use my GitHub to do all this easily
github.com/DeanCefola/Azure-WVD/tree/master/WVDTemplates/WVD-NewHost
@@AzureAcademy Thank you much Mr. Dean! I've learnt a lot watching your vids! Awesome Work!
Thanks…much more to come in 2023!
Hello Dean,
Very useful video ;)
One quick question : the VM joined the domain but no the AVD hostpool.
I did it manually by reinstalling Azure Virtual Desktop Agent.
Do you know if that part needs to be updated ?
Thanks
It should not need to be. The one thing to check is that the registration token didn’t expire
@@AzureAcademy yep.
I tried 3 times with different and new generated tokens. And I did not see any error, I also checked the used tokens in the log in VM temp folder :(
Do you have all the required ports open?
If so…uninstall the agents, reboot, reinstall
If still not working, open a support ticket
@@AzureAcademy Hey Dean, it is working when I lunch the RDAgent installer and paste the same HP token key used in the template parameter :)
Awesome!
hi, do you know how to configure stateless disk for WVD when using the template via Azure Devops, I do not know which parameter to change, any idea? thanks Marco
It you look at my GitHub template for Ephemeral disks you will see all the values that you need to have. Then you can make those changes in your template…or just use my template in your DevOps
raw.githubusercontent.com/DeanCefola/Azure-WVD/master/WVDTemplates/WVD-NewHost/WVD-NewEphemeralHost.json
Hello, process of provisioning can be automated? for example I want to have new VM every day
Yes it can…take my template and add it to either your DevOps pipeline on a schedule to run everyday
Then at the end of the day have a script or command to delete all existing ephemeral Hosts
Then repeat
If you are not into DevOps you can do the same thing in Azure Automation
@@AzureAcademy Is it possible to make this solution to provision a new VM on each Logon? I am looking to build a 'Kiosk' solution that delivers a fresh vm cut from the Gold Image on each logon.
The only way that could work is if you had a management solution that would wipe and build a new VM when a user logs off the kiosk. And if you are hoping it to be as fast as user one clicks log off…
Then 10 seconds later user 2 signs in…I know of nothing that is that fast.
If you do…please let me know so I can make a video about it ☺️
What size disk did you use on your original image? The 128 GB default disk is too big for any instance size I pick.
I don’t recall disk size being the issue because I used a Microsoft market place image for Win 10 multi-session...which is 128GB. The issue that is more important is that the VM SKU supports ephemeral disk
@@AzureAcademy thank you for the advice. I’ll keep trying. The problem I have is when creating a new VM from my custom 2004 marketplace image, when trying to select ephemeral disk is greyed out and it says “my image is too large” no matter which instance size I pick. but I’ll keep trying. Thank you.
Ok I found the difference, I was using a “shared image gallery” which did not work for me. Once I created a “Standard” Image I was now able to select ephemeral disk. Thanks for everything you do.
👍👍
🤔
Make the video on Kubernetes, Docker, and service fabric
It is almost done...stay tuned
How we can do patch management for stateless vms
hey @Mahammad. you don't patch stateless VMs. You have to update the image.
Then if you want to deploy those new VMs to your WVD Host Pool, you need to have the image in the Shared Image Gallery. See my video on that here -- th-cam.com/video/2LxvwR9LGWQ/w-d-xo.html
@@AzureAcademy Hi Dean, thank you for this fantastic content :) I've one quick question: Do I even need an Image when I use stateless VMs or could I just rebuild them from the marketplace (e.g. every morning or based on a scaling schedule) and customize them with a custom script extension? Have you ever tried this? I want to keep the "operational footprint" as small as possible. All Applications would then be assigned using MSIX App Attach. Thank you!
You certainly can rebuild from the Azure Marketplace, the only think you need to think about is what you need in the image and can you do all that as part of an image pipeline.
In fact in another 2 weeks I will be releasing a video on the Azure Image Builder and how you can do exactly this!
Thanks for your work! Im tried to use your ephermal host template from github but the machines wont join the the hostpool. When im reinstalling the Avd client and register the machine manually everything works fine. Could you help me out here?
Are you saying that my template isn’t working?
And you generated a new host pool registration token with enough time to complete the builds…correct?
@@AzureAcademy Yes thats correct. When i do it manually the VM registers in seconds. The token isn‘t expired and i also tried it with a fresh generated token.
Ok I will have a look at the template
Thanks for letting me know!
@@AzureAcademy thank you very much. I really appreciate your effort!
Thanks for watching, and for letting me know
can't wait. 27 more hours?
It’s going to be great
hope you enjoy it Richard
I enjoyed our.Great work. Thanks.
Awesome...thanks for letting me know!
@@AzureAcademy Very very cool. followed your WVD playlist to setup POC, and we may go production some time later.