Create Classic VM from VHD in Azure - azure

I have a server in Classic ASM which I want to move to another subscription.
I tried using the move feature on the portal but it throws error that target subscription is not empty.
Are there any way that I can recreate the classic VM from its VHDs and also migrate its IP address to the new Subscription.
I don't want the Generalise the VM.
Thanks.

I tried using the move feature on the portal but it throws error that target subscription is not empty.
If you want to move ASM resources to a new subscription, you should note:
All classic resources in the subscription must be moved in the same operation.
The target subscription must not contain any other classic resources.
The move can only be requested through a separate REST API for classic moves. The standard Resource Manager move commands don't work when moving classic resources to a new subscription.
To move classic resources to a new subscription, use the REST operations that are specific to classic resources, refer to this link.
Besides, if it is possible, I recommend you to use ARM nowadays, Microsoft released a new management model called Azure Resource Manager (ARM) which provides many new capabilities to manage, and control Azure resources. You could migrate the VM from ASM to ARM, refer to this link. And move it to another subscription, refer to this link.

The client does not plan to migrate to ARM currently.
To migrate the VM to another subscription, I followed the below steps and it worked well.
1- Copy the VM's VHDs to the destination storage account.
2- Create VM Image (Classic) using the VHD which was copied and then create VM out of it.
3- Unfortunately, I was unable to find a way to migrate the public IP address to another subscription.

Related

how to export/move my Azure Machine Learning Workspace to different subscription?

I am using azure machine learning services. I have created an experiment and deployed as a webservice on Azure Machine Learning Workspace.
My problem Is my subscription has expired and now I want to export/move my Azure Machine Learning Workspace to different subscription so I can reuse its all content(model, experiment etc.) without losing.
How can I save my all important work and export or move Azure Machine Learning Workspace with all working functionalities in different subscription?
Thank you
Regards,
Ahmad
The following document demonstrates how to migrate Azure resources across subscriptions. You should be able to migrate your workspace as indicated here.
As highlighted in the document above, if the tenant IDs for the source and destination subscriptions aren't the same, use the following methods to reconcile the tenant IDs:
Transfer ownership of an Azure subscription to another account
How to associate or add an Azure subscription to Azure Active Directory
The source and destination subscriptions must be active. If you have trouble enabling an account that has been disabled, create an Azure support request. Select Subscription Management for the issue type.
This document says that moving an AML workspace is currently not supported:
https://learn.microsoft.com/en-us/azure/machine-learning/how-to-manage-workspace
In this doc referenced in a previous answer, .MachineLearning refers to the classic ML studio. You should be looking for .MachineLearningServices which refers to the new AML studio which clearly states that moving between resource groups or subscriptions is not supported.
I'm looking to do this myself but I haven't found a complete solution.

How to assign existing NIC/Vnet to VM on Azure portal while creating a VM?

When creating a VM, as we can see in the image below, we cannot choose an existing VNet. The solution I found is to create using ARM template and specify an existing VM. More over it is stated "When creating a virtual machine, a network interface will be created for you."
Is there a better way to do this on portal? (even though it is a combo box, we really cannot select an existing vnet)
Why is Azure not allowing it when the same functionality is available for storage accounts (choosing existing network)?
Unfortunately, you cannot select the existing NIC in the way you used as the screenshot shows, but you can select the existing Vnet in the same region. As you see, Azure will create the nic itself for you.
In the Azure portal, you can only use the template to create a VM with both existing NIC and Vnet as I know. And you can also achieve what you want using the Azure CLI locally. Also does the PowerShell and REST API and etc.

Migrating blobs from Classic subscription to v6 subscription

I wantd to know whether there is a way to migrate the storage blobs from Classic subscription to V6 subscription on Azure as we can do for the VMs.
Thank you.
Do you mean you want to move classic azure storage to a new subscription as an ARM resource? At currently, Azure storage services is supported to move to a new resources or a new subscription. We could find this information at this article. In that article, we could find that there will be some limitations for moving classic deployment to a new subscription. Here is a snippet of that article:
All classic resources in the subscription must be moved in the same
operation.
The target subscription must not contain any other classic
resources.
The move can only be requested through a separate REST API for
classic moves. The standard Resource Manager move commands do not work when moving classic resources to a new subscription.
It also provide detailed steps about how to move Classic Compute to a new subscription. If you want to move classic storage. Please try to use "ClassicStorage" instead of "ClassicCompute"
We could find the provider in Azure resource portal. for example. I want to move "jaml" to a new subscription. I search "jaml" in Azure resource portal. then I will find below information:

Azure Resource Manager: Restore VM from existing disk

I have a storage account with as OS-disk blob and would like to redeploy the VM.
Under the classic deployment system I could simply choose from disk when creating a new VM, but I cant find that functionality on the new portal, it only offers the marketplace. The disk is in the new format so I cant use the classic portal.
Thanks
As noted in the comments, you can't do this end-to-end in the new portal yet.
Here's an Azure Resource Manager template to deploy a VM from an OS-disk blob: https://github.com/Azure/azure-quickstart-templates/tree/master/201-vm-specialized-vhd-new-or-existing-vnet
Using the "Deploy to Azure" button takes you to the new portal to enter parameters. The readme also includes PowerShell instructions.
This write-up also covers capturing an image, and links to some of the options for creating the image using different versions of PowerShell.. http://www.codeisahighway.com/how-to-capture-your-own-custom-virtual-machine-image-under-azure-resource-manager-api/

what is the difference between virtual machine classic and virtual machine in azure?

In Azure there are 2 options available to create virtual machines.
A. normal VM
B. Classic VM
Does anybody know what is the difference between both option? When do we use one over other?
Short answer to your question is Normal VM or Virtual Machines is the new way of deploying your Virtual Machines whereas Classic VM or Virtual Machines (Classic) is the old way of deploying them. Azure is pushing towards the new way of deploying resources so the recommendation would be to use it instead of old way. However please keep in mind that there're some features which are available in the old way that have not been ported on to the new way so you just have to compare the features offered and only if something that you need is not available in new way, you use the old way.
Now comes the long answer :)
Essentially there's a REST API using which you interact with Azure Infrastructure.
When Azure started out, this API was called Service Management API (SMAPI) which served its purpose quite well at that time (and to some extent today). However as Azure grew, so does the requirements of users and that's where SMAPI was found limiting. A good example is access control. In SMAPI, there was access control but it was more like all-or-none kind of access control. It lacked the granularity asked by users.
Instead of patching SMAPI to meet user's requirement, Azure team decided to rewrite the entire API which was much simpler, more robust and feature rich. This API is called Azure Resource Manager API (ARM). ARM has many features that are not there in SMAPI (my personal favorite is Role-based access control - RBAC).
If you have noticed that there are two Azure portals today - https://manage.windowsazure.com (old) and https://portal.azure.com (new). Old portal supports SMAPI whereas new portal supports ARM. In order to surface resources created via old portal into new portal (so that you can have a unified experience), Azure team ended up creating a resource provider for old stuff and their names will always end with (Classic) so you will see Virtual Machines (Classic), Storage Accounts (Classic) etc. So the resources you create in old portal can be seen in the new portal (provided the new portal supports them) but any resources you create in the new portal using ARM are not shown in the old portal.
The Azure Virtual Machine (classic) is based on the old Azure Service Management Model (ASM). Which revolved around the concept of a cloud service. Everything was contained inside a cloud service, and that was the gateway to the internet. While it is still used (extensively) Azure is now moving over to the Azure Resource Management Model (ARM).
ARM uses the concept of declarative templates to configure an entire solution (rather than individual components) So you can create an entire Sharepoint stack, rather than just a singular machine.
ARM also has a much more logical approach to networking. Instead of having a monolithic VM in an obscure cloud service. You have a VM, that you attach a network card to. You can then put the Network card into a VNet and attach a public IP (if you need one)
Unless you have a compelling reason to use ASM (classic) You should create your solution using ARM. As this is the MS recommendation going forward (todo find a link to that) It also means that you can create templates for your deployments, so you can have a repeatable solution.
On the negative, the old portal manage.windowsazure.com can not manage anything that is deployed using ARM, and there are still parts of ASM that haven't been migrated over to ARM yet. For instance you cannot configure Azure VM backup, since Azure backup is ASM and it can't 'see' ARM VMs
It very largely depends on your circumstances though, what it is you are planning for, the method you are going to deploy with. If you are just looking to stand a machine up to do a single task, it makes very little difference. If you are looking to deploy into an environment that will have some concepts of DevOps going forward, then ARM is the way to go.
The one big differences is for resource management. For that new version is called Azure Resource Manager VM (ARM VM).
ARM VM is better in terms of;
Classic VM must be tied with Cloud Service, and Cloud Service consumes resource limitation and not-so-flexible network configuration.
ARM VM is managed under Azure Resource Manager (ARM) which can be organized with/without other Azure services. ARM is like a folder of Azure services, and it gives you more fine-grained resource management.
Classic VM can be migrated to ARM VM version, but you have to afford service downtime. To migrate from classic VM, read the official article: Considerations for Virtual Machines.
Azure provides two deploy models now: Azure Resource Manager(Normal) and Azure Service Management(Classic) and some important considerations you should care when working Virtual Machines.
Virtual machines deployed with the classic deployment model cannot be included in a virtual network deployed with Resource Manager.
Virtual machines deployed with the Resource Manager deployment model must be included in a virtual network.
Virtual machines deployed with the classic deployment model don't have to be included in a virtual network.

Resources