Shared storage for multiple VMs - azure

I am looking for a solution to my issue. I would like to use one folder with fils for my VMs.
I have tested a few solutions but always I have the same result. My shared folder is disconnected after every restart VM.
The problem is that Windows Server has credentials in Credential Manager.
I am trying to do this with net use, PowerShell and Cdmkey -
The easiest way to establish a persistent connection.
Does anybody has the same issue and found the solution?

I'm using Azure Files on my laptop it reconnects just fine after months of using it\rebooting\shutting down (i never hibernate). I think I was using net use\powershell and manually from explorer, all paths lead to the same outcome.
Another option - Azure File Sync, quote:
Use Azure File Sync to centralize your organization's file shares in
Azure Files, while keeping the flexibility, performance, and
compatibility of an on-premises file server. Azure File Sync
transforms Windows Server into a quick cache of your Azure file share.
You can use any protocol that's available on Windows Server to access
your data locally, including SMB, NFS, and FTPS. You can have as many
caches as you need across the world.

have you looked at "persisting Azure File Share credentials in Windows" section in the following document: https://learn.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-windows. Let me know if you have additional questions.

Related

Migrating from On-Premises File Server to Azure

Today i have a Physical Machine running Windows Server 2008 that servers File to all my employees, so i have a On-Premises File Server.
This On-Premises File Server have a lot of rules based on my Active Directory Server. i.e: Folder "financial" only can be accessed by users in group "manager".
Now i want to migrate this to files to some service in azure cloud, so after some searching i found following options: Blob Storage and File Storage. I think File Storage is ideal for my business but i have some doubts:
Can i apply Active Directory rules in File Storage ? I have AD Sync enable in my azure account.
File storage is better solutions for my case ? If no, what is the other solution ?
No, the closest you can get is using the Azure AD Domain Services (link, another link)
File storage is definitely a better solution, blobs are not really meant to be accessed like a file server.
You might want to look at Azure File Sync, while its not what you ask for exactly, it's pretty close.
https://azure.microsoft.com/en-us/blog/score-one-for-the-it-pro-azure-file-sync-is-now-generally-available/

Access Azure Files Services from Azure WebSites

As the title says, I'm looking for a way to access an azure files share (in preview) directly from an azure website. I cannot use any REST API or anything like this and I was looking for the possibility of mounting a SMB share directly into the website (through the new portal or any other way).
I found the following links, from which I understand that this is still under review (http://feedback.azure.com/forums/169385-web-apps-formerly-websites/suggestions/6084609-allow-map-azure-file-share-microsoft-azure-file-s) and also a SO question (Can the new Azure File Service be used from Azure WebSites?) that doesn't answer my question.
To be honest and for the sake of giving more details, my scenario is pretty simple - I have some websites and also some virtual machines that should access the files from the azure files service. Regarding the VM, the approach is pretty straight forward and easy but regarding the WebSites, I don't find any way at this moment.
On the other hand, regardless of the answer to the above question, does it make sense to (or do I have the possibility to) enable CDN over an Azure Files Share?
Thank you very much.
As of today, no single technology will serve your purpose. You can't use File Service as you don't have the capability to mount a share in an Azure Website as well as it is not suited for streaming purposes (all access to files there need to be authorized and there's no concept of Shared Access Signature in File Service today).
I guess, you would have to pick one of the two technologies (Blob Service and File Service) and make some compromises to make it work in both Websites and Virtual Machines.
Assuming you go with File Service, then you can mount them in the Virtual Machine and do the processing on the files there. On the website front, you would need to use Storage Client library to download the relevant files in some folder in your website and stream those files from there.
Assuming you go with Blob Service, then you can simply stream them in your website directly from blob storage (no need to have those files in your website). In the Virtual Machine, when you need to process those files (blobs), you would simply download them to your VM for processing and then re-upload them in blob storage.
Does it make sense to (or do I have the possibility to) enable CDN
over an Azure Files Share?
Currently it is not possible to serve Azure File Service files via CDN.

Shared drive between Azure Virtual Machines

I have just moved my web site to an Azure Virtual Machine and have been up and running since last weekend. So far I'm very happy with the results and looking forward to taking advantage of Azure further in due course.
I do have what would seem to be a pretty common scenario - and, to my surprise, I can't find an obvious solution. I have a couple of VMs - one my primary server and the other which will be suspended and ready to kick in (manually is fine) if the first one has an issue. I backup my web site to Azure Storage (my backup utility supports saving to an Azure blob). That's the good news.
I had assumed that I could somehow mount the storage blob as a drive, therefore effectively having shared storage across the two VMs. However, to my surprise, I haven't found an obvious way to do that. I have found a third party utility (Gladinet Cloud Desktop) but it seems painfully slow. As I say, I admit I just assumed this would be an easy thing to do.
So, stepping back, what is the most straightforward way to access a storage blob from multiple VMs? I really don't want to set up a private network and then set up network file sharing - that seems so old school :) and places a specific dependency on one specific VM.
Any suggestions?
Thanks.
This is now not just possible, but very easy, and it looks just like a filesystem. Check out the new Azure File Service (in preview as of this writing).
http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx
Quoting from the announcement:
"The Azure File service exposes file shares using the standard SMB 2.1 protocol. Applications running in Azure can now easily share files between VMs using standard and familiar file system APIs like ReadFile and WriteFile."
It is better than just an SMB drive, as the announcement goes on to mention:
"In addition, the files can also be accessed at the same time via a REST interface, which opens a variety of hybrid scenarios. Finally, Azure Files is built on the same technology as the Blob, Table, and Queue Services, which means Azure Files is able to leverage the existing availability, durability, scalability, and geo redundancy that is built into our platform."
In Azure Resource Manager "Storage Account" you can create a Network File Share that can be Mounted as a Drive to multiple VM's or to computers and devices not on Azure for both Unix, Linux and Windows.
In General, go to your Storage Account ➡ Files ➡ Create FileShare ➡ Name the Share and the Disk Space Quota ➡ Click Connect to obtain the command or windows or linux to mount the share to the respective devices. Note this ONLY WORKS for Local Redundant Storage, not Zone, not Geo Redundant.
https://www.youtube.com/watch?v=SGPJZMaSlis
The video tutorial above shows you step by step how to do this. The only restriction is needed is OS support of the SMB 3.0 protocol which Windows 8 or above does and Windows 2012 or above does. Requires Firewall Port 445 to be opened.
You can access blobs from multiple VMs. This is a very common pattern. What you can't do is mount a drive (stored in a blob) on multiple VMs simultaneously. That is, if you decide to create a VHD disk and attach it to a VM (whether Linux or Windows - doesn't matter), then the blob-backed disk is locked to a VM and that VM can then work with the vhd like it would a local file system.
If, on the other hand, you deal with blobs discretely as single objects, you can easily work with these blobs across any number of VMs.
If you're looking to do something like network sharing (e.g. SMB), you'd either need to use the Azure File Service or stage your own SMB server VM.
In the case where you absolutely must have a mounted file system, yet want to use the file system in a primary/backup fashion, you could always do something via the API to unmount from one VM and remount to another VM. This can be executed via PowerShell (Windows only) or via the cross-platform command-line interface on Linux/Mac/Windows. You'd do this if your primary VM failed for some reason.
this are good articles, I am also looking for that, hope find the right solution.
I hope you share your experience here with your choice.
Deciding when to use Azure Blobs, Azure Files, or Azure Disks
https://learn.microsoft.com/en-us/azure/storage/common/storage-decide-blobs-files-disks
there are premium disks
https://azure.microsoft.com/en-us/pricing/details/managed-disks/
Manually create and use a volume with Azure disks in Azure Kubernetes Service (AKS)
https://learn.microsoft.com/en-us/azure/aks/azure-disk-volume
Note : An Azure disk can only be mounted to a single pod at a time. If you need to share a persistent volume across multiple pods, use Azure Files.
Performance guidelines for SQL Server in Azure Virtual Machines
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-performance
Deploy a SQL Server container in Kubernetes with Azure Kubernetes Services (AKS)
https://learn.microsoft.com/en-us/sql/linux/tutorial-sql-server-containers-kubernetes?view=sql-server-2017

Azure Architecture Design

I'm new to Azure, and a little confused about blob storage. I have a need for clients to access via FTP / SFTP to push and pull files (XML, CSV, EDI, etc). The pushed files are read in by a .net application and written to a database. As I understand, we would use a VM role to create a FTP / SFTP server, a worker role to execute the .net code, SQL Storage for the DB and Blob storage for the files.
Am I correct in this assumption first, and second can a VM role attach a storage blob for writing and reading files and can a worker role attach to the same storage blob to read and write files as well.
Sample:
client pushed xml file to VM via FTP. VM writes XML file to storage. Worker role reads file, processes it and writes contents to db.
Is my thinking correct or am I missing the boat?
Thanks
Given Azure has an array of services so you have a few options. One important thing to keep in mind with Azure is that your worker roles, which are simply Windows Server 2008 without IIS installed, are very flexible so there is a lot you can do with them – this includes writing your own FTP server and being able to host it via a worker role VMs. The FTP to Azure Blob Storage Bridge (on CodePlex) solution is an example of this.
In addition, you could use a web role (which is the same as a worker role but with IIS enabled) to do the same - so rather than rolling your own FTP server you can use IIS. A visual guide to setting IIS up to run as an FTP server in Azure can be found on ITQ.
I’d recommend doing some further reading to determine which is the better option of the two. Also have a think about you requirements as this may influence your approach, i.e. scaling, bandwidth, costs, your preferred deployment model etc.
As far as storing the files goes you can certainly use Blob Storage. If you have no need for a relational database in your system then you could skip using SQL Azure altogether (in which case the web role solution referenced above won’t be of much use) – but again that comes down to your particular requirements.
The official Windows Azure website is a good source of knowledge, especially if you’re getting started, so do take the time to look through some of the pertinent documentation.

Using Azure Storage to Replace Win2008 File server?

We are looking to replace our normal Win2008 R2 File server with a Azure Cloud based solution. Our Current use scenario is something like this:
Server A, Location A
Hosts 4gb of Data
Server B, Location B
Hosts 4gb of Data
Server A and B are Replicated.
Users access Data like:
\Domain-Name\DFSShare\ShareName
Many have Mapped Drives to the DFS Shares.
Can I use the Azure Storage to Replace this? I'd like to still have the users map Drives to the same shared storage areas on Azure.
I Would also need the same Security Permissions setup so all the users have the same permissions that they do for the Existing File Server storage. So I'd like Active Directly Integration.
Is this something that Azure Storage can do for me?
Thanks!
Might I recommend a product like StorSimple? This will accomplish the type of functionality you're after without need for costly development.
You can install a virtual server in Azure Iaas with a VNET and have a site-to-site VPN to your office. For users not in the office, you can have a VPN solution or install WebDAV on the file server and map drives over the internet.
You cannot direct-map local-server drive letters to cloud storage (which is triple-replicated), although individual Compute instances may do so. Also, mounting an NTFS volume inside a blob is a single-writer scenario, though multiple readers may snapshot and access these drives. All this to say no, this won't replace your network shares.
As #Brent pointed out, StorSimple is a good solution to explore, since it's an appliance that provides network share replication to blob storage transparently (and encrypts data prior to pushing it to Windows Azure). This would at least obviate the need for maintaining your replication server, as well as providing offsite replication.
I wrote a file system driver using the dokan library, which you can take a look at here:
https://github.com/richorama/AzureBlobDrive
I wouldn't say it was lightning fast, and it doesn't implement every feature of NTFS, but it might work for you.

Resources