3

I have a working resource manager based VM. (Ubuntu) Now I customized it in several way, and would like to have it as a start template in the future when creating new VMs.

Basically I would like to as easily create a new VM from my customized VM as I created it from initially via Azure portal by picking a LAMP VM by bitnami.

Please note, I am aware the Linux/Windows provisioning/deprovisioning process. In fact I can accept and use scenario where the machine was not deprovisioned and simply "cloned" (if this is possible at all in resource manager based VMs)

Unfortunately all articles I've found (even 2016 "updated" ones) is about "classic" VMs

So this question is about my doubt is it possible at all with NON "classic" VMs?

For example for my classic VMs there is a Capture button on Azure Portal, but my new resource manager based VM has no capture button.

I am aware that many things are not available in the portal GUI, so doing it with Azure Powershell also fine by me.

juvchan
  • 6,113
  • 2
  • 22
  • 35
g.pickardou
  • 32,346
  • 36
  • 123
  • 268

1 Answers1

2

The process for cloning an ARM Vm is much less contrived (or more so, depending on your view!) than an ASM (Classic) Vm.

Instead of having a blob, that a disk attaches to, that Vm attaches to as was the way in ASM, in ARM the blob is the disk and the VM reads it directly from storage.

In this case if you want to clone a VM you simply need to copy the disk to a new location, and build a machine from there.

You can use Start-AzureStorageBlobCopy to copy the disk (if running Windows, you can run sysprep beforehand)

Michael B
  • 11,887
  • 6
  • 38
  • 74
  • Michael thanks for clearing some things up. I am going to try the 2 steps, 1) copy and 2) "build a machine from there". Just to make sure: No deprovisioning/provisioning envolved this case, is it true? (fortunatelly I am glad with the lack of that) – g.pickardou Mar 07 '16 at 11:30
  • If you run sysprep (obviously not relevant if you're linux) you don't need any of the provisioning you just use the `Set-AzureRmVMOSDisk -CreateOption attach` (with other parameters of course) – Michael B Mar 07 '16 at 11:38
  • Although theoretically all works I am still stucked full script is here: http://stackoverflow.com/q/35862848/1157814 – g.pickardou Mar 08 '16 at 11:17