

I've created a PowerShell function called SetupStorage which uses New-AzStorageAccount to create a Storage Account and New-AzStorageShare to create a file share.

To ensure that we can persist the state of the server, we need to create Storage Account and a file share within that Storage Account. New-AzResourceGroup -Name $resourceGroupName -Location $locationĬreating a Storage Account and File Share Now, let's create a Resource Group to hold the resources we'll create in this demo with New-AzResourceGroup: # create a resource group Get-AzResourceGroup | select ResourceGroupName

Set-AzContext -SubscriptionName "My Azure Subscription" Get started with Az PowerShellįirst, if like me you're fairly new to the Az PowerShell module, here's the basic commands you'll need to get logged in, select your subscription, and explore your resource groups: # login to Azure PowerShell Normally my preference would be to do this with the Azure CLI, but I'm opting to do this all with the PowerShell module, for reasons I'll explain in a bit. In this post, I'll show you how we can automate the creation of all the infrastructure we need with the Azure Az PowerShell module. And so long as we map the data folder to an Azure Storage File Share, all the state stored on the server will be persisted while our container is not running. ACI containers start and stop quickly, and we can assign them a friendly domain name that will remain the same when we start up again. We can simply ask Azure to spin up a container running the Minecraft server (using a Minecraft server image from Docker Hub), use it, and stop it when we've finished. But when you restart the VM, you have a bit of a wait for boot-up, and it will have a different IP address, which my son would then need to communicate to all his friends.Īnd this is actually a great use case for Azure Container Instances. Now of course in Azure a VM can be put into a "stopped deallocated" state, during which you are not charged for compute. However, that's quite an expensive option - at about £30 a month for a virtual machine that would sit idle for most of the time.
Minecraft bedrock server cost install#
Obviously, one option would have been to create a Virtual Machine and install the Minecraft server on that. All of my children are big fans of Minecraft, and recently my son asked me to help him set up a Minecraft server so he could play online with his friends.
