Showing posts with label Azure. Show all posts
Showing posts with label Azure. Show all posts

Wednesday, October 14, 2015

Moving Azure VM from one Subnet to another

Problem

As I built up my Azure lab I was learning. After a while I have learned quite a bit about how to manage resources on Azure, especially from an IaaS perspective. I love having my lab up on Azure. I get hours through my MSDN subscription and try to keep within those house so size of VMs and what is running at any given time is important to me.

One are that I don't have setup quite as optimally as I would like is my network. I have one Virtual Network and when I created my first subnet I did not allocate enough bits so there are few hosts that can take a spot. So I just created a second subnet (I actually created three). So, not great, but during the process I learned a lot about the Azure Virtual Network stack and it was well worth it.

So, today, I had a need to test something on an un-patched Windows Server 2008 R2 box. I don't tend to keep that server running. I have it in my Azure space but it is marked as 'StoppedDeallocated'. This means it is not taking up any 'billable' resources in Azure. It is there so when you need it you can grab it, but you are not charged for it on an ongoing basis. This is great for labs.

So, I went to launch the VM and it threw up all over the place... can't do it... error... blech.

Get-AzureVM scisrv2 |Start-AzureVM

Seems simple but no. I found a really nifty and quick way to address this. If you Bing around you will find lots of super convoluted ways to create new VMs attach to old disks etc. but this is likely newer... meaning a technique that wasn't available a couple of years ago. I believe this came from a MSDN doc but can't find the reference right now.

Get-AzureVM -Name <VMName> -ServiceName <ServiceName> | Set-AzureSubnet -SubnetNames subnet-2 | Update-AzureVM

Super simple and get's it back up and running. If you have many Azure VMs laying around de-allocated from a subnet, you may find this useful to get them reallocated then launched.

Thursday, July 23, 2015

Clean up my Azure space

Starting a new job can be filled with rebuilding labs, cleaning up old configurations, essentially building up tech so that you can start from scratch.

There are so many benefits to being a Microsoft Alumni that I was simply not paying attention to. One of those it 50% off MSDN subscription (new subscription). That is amazing. I began my MSDN Pro subscription last week. With that level there are $150 a month worth of Azure services! This is great for testing.

I had used Azure quite a bit for different things while at Specops and my liveID was associated with the company. I had done a lot of configuration up there before and I wanted to clean up... get rid of VMs, Networks, essentially wipe and re-load... but no... not really.

The Directory Services I created for labs while at Specops (SullyCo and Speocps Product Services) are apparently there to stay. They most likely won't interfere with anything (but they could) but it is annoying to see artifacts in there that you won't ever use...

It also took me a while to actually figure out this was not possible, after trying many things... finally found the threads and discussions online about this.

Simply for regulatory reasons there should be a way to remove the Directory Services when they are deprecated. If anyone is aware of a way to do this, please let me know.

Kevin