Answered by:
how can we get customized VHD's for VM roles.

Question
-
HI,
I am about to upload my VHD (VM) to azure.
i downloaded a base image (VHD) of Win server 2008 R2 of size 6 GB.
I want to run my project (my website made through a web role) on that virtual machine.
First i thought about installing VS 2010 & SQL Server 2008 & other s/w to my vm on premise & then upload it to azure.
But the size of that image has grown now to about 27 GB, It will make no sense to upload it on azure.
can i do this by any other way, just to upload my Base image to azure consisting OS image.
Then later i upload the VS2010 & SQL Server installed on different VHDs.
Also if it is possible, how can i do it?
Not just this, how would i add my application & my databse to that VHD?
i've absolutely no idea of how am i going to achieve what i want to!!1
please help me...
thank you.
Thursday, July 14, 2011 6:53 AM
Answers
-
Hi,
I'm sorry to break this to you, but it's not a good idea to install VS2010 and SQL Server in a VMRole and use that as a development machine. You must remember that at any given time the VM instance can be recycled and you loose all your state on the machine. This means all the unsaved work you have (if you even save your work to a CloudDrive, otherwise you loose it all). You also loose your database (including logfiles, content, settings etc.). This is because the VHD stored by the Fabric Controller is not changed when you make a change on you VMRole instance. So when it recycles it just gets the fresh VHD as you uploaded it initially.
If it's just your goal to run your project in a WebRole, you shouldn't even consider using a VMRole ;-). Just develop a WebRole locally, use the Compute Emulator to debug it and publish it into Windows Azure.
Bottom line is that you should use a WebRole for web application and only use a VMRole in the following circumstances:
- You need to install custom software where the installation process takes longer than 20 minutes
- You need to install custom software where the installation process is very complicated, error prone and therefore hard (or even impossible) to script
- You need to install custom software where the installation process requires manual input and thus can't be scripted
If the above reasons don't apply, you should use a WorkerRole with startup tasks to install custom software.
But, that said, here's some nice articles on how you create and deploy a VMRole. I believe an image of 27GB is not extraordanairy, by the way, but I've never found a good reason yet to use a VMRole ;-)
With regards,
Patriek
www.patriekvandorp.net
If this reply is of help to you, please don't forget to mark it as an answer.- Proposed as answer by Michael S. CollierMicrosoft employee Thursday, July 14, 2011 12:21 PM
- Marked as answer by Wenchao Zeng Thursday, July 21, 2011 5:54 AM
Thursday, July 14, 2011 7:49 AM -
Hi shreyasAzure,
> can i do this by any other way, just to upload my Base image to azure consisting OS image.
The recommended way is to install all softwares and components in the virtual machine and prepare & upload its VHD to Azure as a ready to run image. The second way is to upload the very basic image (the 6GB one for your case) to Azure and deploy a RDP enabled VM Role based on that image. If you choose the second way, when the VM Role is running on cloud, you can open a remote desktop to one of its instances and download & install any softwares in it.
To use VM Role, I'd suggest you keep in mind these points:
1. If you configure two or more instances (virtual machines) for a VM Role, the data in the hard disks (file system) is not synchronized between these instances.
2. The requests from the ourside world will be routed by a round-robin load balancer. That means sometimes a request will reach to a instance, sometimes a request will reach to another instance.
3. When a running instance is reimaged/recreated for some unexpected reasons (hardware failure, Azure internal issue etc.), the running instance will rollback to the original base image that you uploaded.
Thanks.
Wenchao Zeng
Please mark the replies as answers if they help or unmark if not.
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework- Marked as answer by Wenchao Zeng Thursday, July 21, 2011 5:54 AM
Monday, July 18, 2011 7:01 AM
All replies
-
Hi,
I'm sorry to break this to you, but it's not a good idea to install VS2010 and SQL Server in a VMRole and use that as a development machine. You must remember that at any given time the VM instance can be recycled and you loose all your state on the machine. This means all the unsaved work you have (if you even save your work to a CloudDrive, otherwise you loose it all). You also loose your database (including logfiles, content, settings etc.). This is because the VHD stored by the Fabric Controller is not changed when you make a change on you VMRole instance. So when it recycles it just gets the fresh VHD as you uploaded it initially.
If it's just your goal to run your project in a WebRole, you shouldn't even consider using a VMRole ;-). Just develop a WebRole locally, use the Compute Emulator to debug it and publish it into Windows Azure.
Bottom line is that you should use a WebRole for web application and only use a VMRole in the following circumstances:
- You need to install custom software where the installation process takes longer than 20 minutes
- You need to install custom software where the installation process is very complicated, error prone and therefore hard (or even impossible) to script
- You need to install custom software where the installation process requires manual input and thus can't be scripted
If the above reasons don't apply, you should use a WorkerRole with startup tasks to install custom software.
But, that said, here's some nice articles on how you create and deploy a VMRole. I believe an image of 27GB is not extraordanairy, by the way, but I've never found a good reason yet to use a VMRole ;-)
With regards,
Patriek
www.patriekvandorp.net
If this reply is of help to you, please don't forget to mark it as an answer.- Proposed as answer by Michael S. CollierMicrosoft employee Thursday, July 14, 2011 12:21 PM
- Marked as answer by Wenchao Zeng Thursday, July 21, 2011 5:54 AM
Thursday, July 14, 2011 7:49 AM -
Hi Patriek,
No doubt you've given me a good suggestion & explanation.
But i am not concerned with what we should do or should not do with VM role.
My question was whether we can do it or not?
i am fully aware of advantages & disadvantages of VM role, & how to deploy a vm role on azure, But i want to see it my self my VM running on azure with custom components installed & running.
So if we can do that custom VHD stuff that i've asked, then please guide me, how to do that, because i am still lacking the necessary knowledge about deploying VM's an easy way.
thank you.
waiting for your reply..
Friday, July 15, 2011 6:20 AM -
Hi shreyasAzure,
> can i do this by any other way, just to upload my Base image to azure consisting OS image.
The recommended way is to install all softwares and components in the virtual machine and prepare & upload its VHD to Azure as a ready to run image. The second way is to upload the very basic image (the 6GB one for your case) to Azure and deploy a RDP enabled VM Role based on that image. If you choose the second way, when the VM Role is running on cloud, you can open a remote desktop to one of its instances and download & install any softwares in it.
To use VM Role, I'd suggest you keep in mind these points:
1. If you configure two or more instances (virtual machines) for a VM Role, the data in the hard disks (file system) is not synchronized between these instances.
2. The requests from the ourside world will be routed by a round-robin load balancer. That means sometimes a request will reach to a instance, sometimes a request will reach to another instance.
3. When a running instance is reimaged/recreated for some unexpected reasons (hardware failure, Azure internal issue etc.), the running instance will rollback to the original base image that you uploaded.
Thanks.
Wenchao Zeng
Please mark the replies as answers if they help or unmark if not.
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework- Marked as answer by Wenchao Zeng Thursday, July 21, 2011 5:54 AM
Monday, July 18, 2011 7:01 AM -
yes, It is possible and you can do that.
BUT, As suggested it is *not* recommended.
Have a look at below msdn links. This explain you full story..
http://msdn.microsoft.com/en-us/library/gg465406.aspx
http://technet.microsoft.com/en-us/library/cc720381(WS.10).aspx
Sudheer KMonday, July 18, 2011 8:05 AM -
Hi,
I will mark the reply as answer. If you find it no help, please feel free to unmark it and follow up.
Thanks.
Wenchao Zeng
Please mark the replies as answers if they help or unmark if not.
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code FrameworkThursday, July 21, 2011 5:54 AM