Create Azure VM from image created under different subscription - image

Is there a way to take a backup of a VM (image capture following the sysprep method) and then make that image in the gallery visible to someone under their subscription. For example, I create a VM, archive it off to the image gallery, then my colleague comes along and wants to create a VM from that image (the colleague cannot be a co-administrator on my subscription).
Alternatively, is there just a way to move the VM to a different subscription without archving it off and recreating?
Have found the following but this is a bit convoluted and requires purchase of third party software
http://gauravmantri.com/2012/07/04/how-to-move-windows-azure-virtual-machines-from-one-subscription-to-another/
Many thanks
Richard Clarke

I don't think you can use images created in one subscription to create VMs in another subscription. You would need to copy those images into your subscription. Since images are nothing but Page Blobs in your storage account, you would need to copy them into a storage account in your target subscription, create images off of them and then deploy VMs. I'm not aware of any other way around it.
Regarding your comment about requires purchase of third party software, that's not really true. You don't have to buy 3rd party software. The main thing is to move your VHDs (which are page blobs) from one subscription to another. Do take a look at Step 1 - Copy Blobs in that blog post. It has a link to console application with source code that you can use to copy blob across. I used Cloud Storage Studio to explore my blob storage. You can use any other storage explorer to check the contents of blob storage (including Windows Azure portal). Cerebrata recently released a free blob storage explorer which you may want to check out: http://www.cerebrata.com/labs/azure-explorer.
Unfortunately that's the only way that I know of to create Azure VMs from images created under different subscriptions.

This is now possible using Azure Shared Image Galleries
Edit:
#Shanky the subscription ID is part of the resource ID for the image version. It will look like this:
/subscriptions/$subscriptionId/resourceGroups/$resourceGroup/providers/Microsoft.Compute/galleries/$galleryName/images/$galleryImageDefinition/versions/$imageVersion
You pass that as the ImageReference.id when creating a VM. It's similar to creating a VM from a marketplace image but you just pass the ImageReference ID instead of the publisher/sku/etc.

Related

Xamarin - How to render list in backend

Currently I have an application which displays a list of items that when selected by a user it opens said item in the default browser on the mobile device they're using.
Currently because the items are hardcoded into the mobile app using the Xamarin platform then a new version of the app is needed to be released/deployed to every device when wanting to update.
I was wondering if anyone could provide me with any documentation/ideas on how I would be able to carry out adding more items to the list (preferably in a better UI than just a standard list) without having to release a new update.
Some ideas which I have thought about:
Using a CMS - to control the links that need to be open
SQL Lite - Create simple db with item name + url then call the url in the table (then somehow when I update the db its pushed into the app)
Using a cloud service such as Azure to do a similar function as above.
This question is vague, but if someone can point me in the correct direction.
That would be fantastic.
Depending on your knowledge, i would go with Azure or Parse Server and deploy the url's there. Each time you open the app it will fetch the links from the remote server. Both Azure and Parse provides caching so you wont incur any network traffic.
It will also depend how frequently you update the links, if you update them often then go setup Azure and Parse. If you rarely update the links then you can setup a local SQLite database and have a way to check from a remote server if there are any new links available, it they are there then you can pull them into your local SQLite database.

How to copy existing Blob into Azure Media Services using the CLI

I'm looking for a way to copy an existing Blob from an Azure "Storage account" to an Azure "Media Services account" using the CLI or the portal.
There seems to be plenty of documentation for Windows centric platforms- but nothing for 'nix or Mac users.
Side note: Why is there an assumption that I would want to do this via code? (which btw also seems to require a Windows platform)? I've got a large video (e.g., larger then the 200MB limit for portal upload) - I want to load it into media service - why is that so difficult?
I'm not an expert on this, but from a quick glance at the portal and testing it, it seems like you can just upload your video to the (classic) Storage Account created with Azure Media Services, using any tool that can handle Azure Blob Storage, such as the cross platform Cyberduck. After that you can simply select that video in the portal under upload content > from storage. Note that it only works with classic storage accounts.
You can upload you media to any blob storage account
Then when you want to create a media services asset you can copy it to the Media Services blob storage and create an asset using the blob you moved.
Unfortunately at the moment Azure Media Service is not supported VIA Azure Cli
But there is a power shell support
See this article
You can write some code and do everything using the SDK
There are SDKs for .Net , Java, Python, Node, Php and more...
To be visible in the Azure Media Service storage explorer UI, your files need to add a valid extension, as answered here : Azure not displaying blobs within container in Storage Account
Hope this helps,
Julien

FTP access on Windows Azure

Quick question. I'm currently moving a asp.net MVC web application to the Windows Azure platform. Everything is working out okay apart from one thing.
In the application at the moment, we make use of FTP accounts for each user to import large quantities of files to our database.
I understand FTP on Azure is not as straightforward.
I've googled and found this article: Ftp on Azure
This seems to be what I need except obviously we'll need to be able to add new users with their own separate FTP account. Does anyone know of an easy workaround for this?
Thanks in advance
Did you consider running a (FTP) service that's not IIS based, and you could add users programatically? Also, how are you going to solve data sync issues when the role recycles or when you upgrade it? Make sure to backup to blob on a somewhat regular basis!
Personally, I'd mount a VHD drive (Azure Drive) which is actually hosted on blob storage, and have my FTP server point to that drive. However, make sure you only have one instance of the server (problem #1) unless you don't need higher than 99,9% reliability you can solve this by running a single instance. Step 2 is I'd implement user management in relation to that program.
It's not straightforward, and I'd advise against it though. But I understand that sometimes you have to do this. I would solve it like I described above.

Azure, Sync Framework and Access Control Service: Are there obvious shortcomings or problems in using this technologies together?

I have a desktop application which uses flat files (some xml and small pictures) as data. I want this data to be available on other PCs which have the desktop application installed and usable by a smartphone client (WP7 at the moment) as well.
The user should have it very easy to synchronize this data. He should be able to use accounts he already possesses (Live-Login, Googlemail, Facebook,...).
I thought about using Azure Blob Storage to save the data in Azure, the Sync Framework to perform the actual synchronization and the Access Control Service to handle authentication.
I have not used any of this technologies before so any advice would be great but I'm searching foremost for errors or shortcomings in this strategy I don't see yet. Is this approach viable at all?
Windows Azure is basically a virtualized datacentre. It is elaborate and complicated and is pitched at corporations who don't want to own their server infrastructure or hardware.
If I understand correctly, what you want is a cloud fileserver, not a whole LAN. Windows SkyDrive fulfils this requirement nicely and offers 25GB of storage per member with no charge for membership.
About Hotmail and Windows Live People often confuse Hotmail and
Windows Live, because when you set up a Hotmail account it uses
Windows Live for authentication and therefore you end up with a
Windows Live account and all the associated facilities, including
SkyDrive. However, it is entirely possible to set up a Windows Live
account using any email address as the username.
If you do this, it is important to be aware that the Windows Live
password associated with a given email address is completely
independent of the password required by the mail server that hosts
mail for the account. This can cause a great deal of user confusion.
For Hotmail (or any other mail server that uses Windows Live for
authentication) they are guaranteed to be the same password.
There is no official Microsoft framework support for SkyDrive. There is an open source project called SkyDriveApiClient, but it only works with the full .NET framework. I tried porting it but the author was a bit of an architecture astronaut, and it is absolutely riddled with [Serializable] which is not available on WP7x.
The WP7 guys have said that the WP7 framework will probably include support for SkyDrive but not in Mango (WP7.1) and given that Microsoft's typical release cycle is 18 months and Mango has yet to hit the streets, I'd say it will be two years before you can count on intrinsic cloud file services for WP7.
Roll-your-own wouldn't be hard, WCF services are dead easy to use from WP7. But that's not really cloud since you have to provide and maintain the server infrastructure yourself. For this reason and given the MS timetable, I have put a great deal of effort into producing my own SkyDrive client for WP7. Core functionality is complete and I am now refactoring, improving robustness and adding performance enhancements like local cacheing of tokens (cookies, essentially). I don't intend to release it; I have a number of apps planned that depend on this functionality and it suits me fine that there is a substantial barrier to competition.
I didn't tell you that to tease you. My point is that I'm so sure SkyDrive is the right answer that I put a lot of work into making it happen.
Cloud file storage is a perfect fit for mobile devices.
Azure is not a good answer for the sort of phone apps individuals want because the data store isn't shared in a way that required indexing or supports high levels of concurrency
I can certainly think of corporate phone apps that would benefit from using SQL Server as storage
Azure can do file services but it represents an ongoing expense. Nobody's going to put up with that when Google and Microsoft both give away web based cloud storage.
I can personally attest that if you're determined, it is possible to use SkyDrive from WP7.
Cloud storage is the only way you're going to get programmatically accessible storage that's shared by your user's mobile device and his computer. One of the things I intend to do that depends on shared storage is write a Silverlight app that lets you prepare map routes with multiple waypoints on a desktop computer and a companion app that uses them on WP7.
The Windows Live team has released what they call support for WP7. They supply a sample project showing you how to instantiate a browser object and load their login pages and manipulate them to log in and use their javascript API to manipulate SkyDrive.
This has one big advantage: browser cookies and cached credentials. The disadvantages are obvious; technical shortcomings notwithstanding the Windows Live team seems to think the only thing people want to do with a phone is tag their photos and fiddle with social media.
I have finished my own libraries. They do not support most of the social media twaddle. I have treated SkyDrive as no more or less than a cloud file system, providing
Authenticate(username, password)
CreateFolder(folderpath[, blocking=false])
Delete(fileOrFolderPath[, blocking=false])
SaveString(filepath, value[, blocking=false])
LoadString(filepath)
I could handle binaries but Convert.ToBase64 makes this unnecessary and strings are convenient for XML. CreateFolder, Delete and SaveString are optionally blocking. LoadString is always blocking because it's a function that returns the loaded string. CreateFolder is recursive so you can create an entire path in one call (eg /folder1/folder2/folder3). Calling CreateFolder on a pre-existing path has no effect, and SaveString uses CreateFolder to ensure the path is valid, making it unnecessary to create a filepath in advance. Authenticate loads the file system (except file content) into memory eliminating server chatter. This is asynchronous and a FileSystemReady event announces when the file system is completely loaded. The model is maintained as you add and remove files and folders.
This was a lot of work and no one reponded to my attempt to make it an open source project so I'm not inclined to give the fruits of my labour away, but provided your plans don't compete with mine I could be persuaded to come to an arrangement.

Transfer files between users of the same app with "cloud" storage

I am building an WPF app that need to exchange some very small xml files with other users. I'm currently looking into peer2peer networking, but I need the sender of the files to be able to send without the receiver being online also. I do not want to host a service myself, and I want the users to store the other users they interact with locally on their machine, for example just a name together with a GUID or email adress to identify them.
Do you guys have any suggestions on how to solve this? My wishful thinking would be if there was a free or cheap service where users could connect via my program to a public API and upload their files. And when the receiver user logs on, it would check the service and authenticate somehow, and download the XML files so it could be imported by the program.
I have made a solution with a IMAP library where the XML files are attached in the email and sent to the receivers email account. The program on the receiver checks the email and read the attachment. This works ok, but is not very slick and also filling up the users inbox and sent items with garbage..
Any suggestions is greatly appreciated.
Best regards
Ola
This is one idea:
Normally, Block Storage volumes are seen as extra 'Drives' that you attach to a Virtual Machine. You could then use this but as if it was a metaphorical 'USB flashkey' that you would share with the other person.
Create the storage volume
Attach it to your VM and copy your
data-to-be-shared on it
Detach the volume from your VM
Your Buddy, attaches it to his VM
He then copies the files and voila!
All this could be done through a web interface and you wouldn't have to do any networking steps.
All you need now is a capable Cloud Geek, a pot of coffee and some convincing.

Resources