Reputation: 33080
I have an instance medium in windows azure.
I need an image to make new instance large, so when I create an image, It say you must delete it as part of operation.
So, how can i make image instance medium without deleting current virtual machine??
note: Amazon cloud service can make image without deleting instance. That includes microsoft server.
Actually how to do create image with minimum downtime. That's the true purpose of this question.
Upvotes: 1
Views: 4516
Reputation: 1989
There is VHD blob container which contains your VM OS disk and VM data disks. You can copy the data disks and attach to any VM.
When you are creating the image, you need to do sysprep which deletes everything from your VM even login. So anyways your VM is of no use. Now once the image is there you can create your VM selecting the image which you have created and data disk if you want old data to be there also. And you can create as many copies as you want.
Upvotes: 0
Reputation: 125
There are two types of images: Specialized and Generalized. You can check the detail in VM Image.
For your scenario, you want to change the size of your vm. So you'll need a Generalized image which has been removed the original provision data, such as vm size, the admin user password, etc.
But in order to capture a Generalized image, you have to do deprovision on the original running vm.
For Windows in Azure:
%windir%\system32\sysprep\sysprep.exe /generalize /shutdown /oobe
For Linux in Azure:
$ sudo waagent –force –deprovision
$ shutdown –h now
Note: After deprovison, the original VM is useless for you and just like an orphan, and you lost the control for it since it has been removed a lots of original provision data. That's why Azure deletes the vm automatically after capturing image successfully.
I agree with you AWS EC2 is more powershell than Azure. A lot of services are inconvenient in Azure.
Upvotes: 1
Reputation: 11246
There are a couple of objectives I read from this. The first is that you want to make a medium instance large. You can change the size of a virtual machine without deleting it. Go to the configure tab for the VM and change the size. This will require a reboot, but it will keep your virtual machine in tact.
The second is to create an image with minimum downtime. As you know, this is not possible without destroying your existing VM. The details of sysprepping a machine are the reason (won't go into those details here). You could create a new virtual machine from your existing one and sysprep that copy though. At least that way you're not losing any downtime while you're creating the image. Not sure how helpful that is for your scenario. Personally, I would just re-size your existing VM if that's all you need. Regardless, here are the steps.
This will get you an image without impacting your existing VM.
Upvotes: 3