An Azure service that is used to provision Windows and Linux virtual machines.
Hello pierre shiraziefard,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you would like moving VMs to a new reservation.
Moving your current Pay-As-You-Go Standard_B4ms VM workload to a new Standard_B4as_v2 Reserved VM Instance without manually reinstalling applications, and you also want the reserved resources to be fully utilized. Know this that an Azure Reserved VM Instance does not contain or host a VM. It is only a billing discount that automatically applies to matching running VM compute usage based on the reservation’s region, scope, VM size/flexibility group, and quantity. You do not move a VM into a reservation; instead, you must run the VM on a SKU that matches the reservation. - https://learn.microsoft.com/en-us/azure/virtual-machines/prepay-reserved-vm-instances, and https://learn.microsoft.com/en-us/azure/virtual-machines/reserved-vm-instance-size-flexibility gives more insight.
What you can do is to:
- First, resize the existing
Standard_B4msVM toStandard_B4as_v2- (subjected to normal resize requirements). - If direct resize is not available or fails, recreate the VM from the existing managed OS disk or snapshot so the installed applications remain intact.
- Validate the VM runs correctly as
Standard_B4as_v2. - Only then purchase the
Standard_B4as_v2reservation in the same region and scope. - Confirm reservation utilization after purchase.
This avoids unnecessary reinstalling and ensures the reservation is only purchased after the target VM size is confirmed to be usable.
Use the below Microsoft resources for more reading and steps:
- https://learn.microsoft.com/azure/virtual-machines/sizes/resize-vm
- https://learn.microsoft.com/azure/virtual-machines/scripts/create-vm-from-managed-os-disks
- https://learn.microsoft.com/azure/virtual-machines/prepay-reserved-vm-instances
- https://learn.microsoft.com/azure/virtual-machines/reserved-vm-instance-size-flexibility
- https://learn.microsoft.com/azure/cost-management-billing/reservations/reservation-utilization
- https://learn.microsoft.com/azure/virtual-machines/states-billing
I hope this is helpful. Please! Do not hesitate to let me know if you have any other questions, steps or clarifications.
Please do not close the thread by upvoting and accepting the answer if any part of it is helpful.