Showing posts with label vm. Show all posts
Showing posts with label vm. Show all posts

Reading Notes #151

Suggestion of the week

Cloud

Programming

UX

Miscellaneous


~Frank

Quick Tips:How to save money with your VM

(This post was originally published on Matricis Blog)
(Version anglaise de: Astuces rapides pour économiser avec les machines virtuelles Windows Azure)

At the office, we use a lot of virtual machines for our development and tests. It's really useful to be able to pop any number of VM in just few minutes and dispose of them once the job is completed. However, sometimes we need them for a long period, wouldn't it be great if we could save money? In this post, I will show you how you can achieve that.

Tip #1

The first tip is to shut down the VM when you don't need them. Why should you pay for it 24/7 if you only use them from 9 to 5, five days a week?! The common way to do it is by log-in into the Windows Azure management portal and to go in the virtual machine list. Select one by one the VM you want to close and click the shutdown button in the center of the bottom screen.
If you have many VMs, this task could become very boring. A PowerShell script is the perfect tool for that. Here are two scripts to start of stop one virtual machine.

Script to start the VM

#Full path of the publish Setting file downloaded from Azure.
$NameOfSettingFile = ".\MySettings.publishsettings"

# The name of the machine to get started
$VMName = "dev2"

# Azure Subscription Name
$SubscriptionName = "Frank Dev"

cls

if(!(Test-Path $NameOfSettingFile)){
    echo "Download the Publishing Setting files, and re-run the script."
    Get-AzurePublishSettingsFile
    exit
}

Import-AzurePublishSettingsFile  $NameOfSettingFile

Select-AzureSubscription -SubscriptionName $SubscriptionName

Write-Host "Starting the VM $VMName" -ForegroundColor Cyan
Start-AzureVM -Name $VMName -ServiceName $VMName

do{
    Start-Sleep –Seconds 2
    $vmInfo = Get-AzureVM -ServiceName $VMName -Name $VMName
    $vmStatus = $vmInfo.InstanceStatus
    Write-Host "The VM $VMName is still $vmStatus..."
}
while($vmStatus -ne "ReadyRole")

Write-Host "The VM $VMName is now accessible by Remote Connection." -ForegroundColor Green

read-host "Press enter key to close"

Script to stop the VM

#Full path of the publish Setting file downloaded from Azure.
$NameOfSettingFile = ".\MySettings.publishsettings"

# The name of the machine to get started
$VMName = "dev2"

# Azure Subscription Name
$SubscriptionName = "Frank Dev"

cls

if(!(Test-Path $NameOfSettingFile)){
    echo "Download the Publishing Setting files, and re-run the script."
    Get-AzurePublishSettingsFile
    exit
}

Import-AzurePublishSettingsFile  $NameOfSettingFile

Select-AzureSubscription -SubscriptionName $SubscriptionName

Write-Host "Stop the VM $VMName" -ForegroundColor Cyan
Stop-AzureVM -Name $VMName -ServiceName $VMName -Force

Write-Host "The VM $VMName is now shuting down." -ForegroundColor Green
read-host "Press enter key to close"

Tip #2


The second tip could be applied only on VM that don't need to scale or to be under a load balancer. A developer's machine is the perfect case for that. We need to change the tier of the VM. That a new feature since (put the date of the release here), so all your VM should be presently to standard.

Quick_tip2_en

We need to change the tier for basic. With this change apply the Billing rate will change. You could go on the pricing page to see more detail, but to give you an idea on a large VM this represent 40$. Interested? Here's how to change this setting. First, if you are not already, connect to the Windows Azure management portal. Then in the list of the virtual machine select the VM you want to change. Click on the Setting tab then change the tier. If the VM is running it will need a reboot, so save any work before.

I hope this quick tips could help you. Let me know if you have other idea and I will add them.


~Frank




Reading Notes #147

Suggestion of the week


Cloud


Programming


Miscellaneous


~Frank


Reading Notes #141

Image from hubspot.comSuggestion of the week

  • Moving to Microsoft Azure (Filip Ekberg) - Another story about a blog migration on Azure. It's always interesting to learn what kind of trouble the people got while doing that.

Cloud


Programming


Mobile


Miscellaneous




Reading Notes #140

Azure2014-05_new_features 

Suggestion of the week

 

Cloud

Programming


~Frank


Reading Notes #139

Suggestion of the week


Cloud


Programming


Mobile


Miscellaneous


~Frank


Reading Notes #137

Suggestion of the week


Cloud


Programming


Mobile


Miscellaneous



~Frank


Reading Notes #136

 

Suggestion of the week


Cloud


Programming


Miscellaneous



Reading Notes #134

Cloud


Programming

In my previous post, Git for Team Foundation Developers , I showed how to create a project in Visual Studio Online,

Miscellaneous




~Frank


Reading Notes #127

Suggestion of the week

Cloud

Programming

Databases

Integration

  • Streaming Xml Transformations (Christos Karras) - Great tutorial that explains very clearly what are our solutions when we are in front of a complex XML transformation.

Miscellaneous


Reading Notes #120

Suggestion of the week

Christmas Planet

Cloud


Programming


Databases


Architecture

  • Composite Pattern (Gunnar Peipman) - Good post that explains clearly a pattern with code sample.

Miscellaneous



Reading Notes #115

Moustache-Glasses-2_originalSuggestion of the week

Cloud

Databases

  • WebLog of Ken Cox - I find out that using the migration wazard was the best option in my case... Until they update Sql Management Studio.

UX

Programming

Miscellaneous


~Frank


Reading Notes #114

Suggestion of the week

Cloud

Database

Programming

UX

Miscellaneous


~Frank


Reading Notes #102

trafficLightSuggestion of the week
Cloud
Databases
Programming
UX
Integration
Miscellaneous
~Frank






Reading Notes #98

GetInvolve_filmtrip

Suggestion of the week

 

Cloud

 

Programming


Databases

 

Integration

 

Miscellaneous


~Frank



Reading Notes #96

//m4 - Matricis.comSuggestion of the week

 

Cloud

 

Programming

 

Miscellaneous

~Frank




Reading Notes #95

Cloud_hammorkSuggestion of the week

Reading Notes #93

Azure_SDK_2Suggestion of the week

 

Cloud

 

Programming

 

UX


Miscellaneous


~Frank




Reading Notes #91

cloud log

Suggestion of the week

Cloud

Integration

Programming

  • View your Kanban board - Nice post that gives more details on one of the new supported Visual Studio features. Really interesting and useful.
  • jQuery 2.0 Released  - Good news. However, don't forget that the branch 2.x is met to support new browser. For IE 6, 7, 8 the branch 1.x will continue to be supported.

System Management

Miscellaneous


~Frank