Amazon EBS: Increasing Disk size

Whenever you got an EBS Disk which size is not sufficient enough anymore, you can easily make it larger. Here’s how (OS: Windows off course).

  • First of all create a snapshot of the volume (the larger the disk, the longer it takes)
  • Create a volume from your snapshot and give it a greater size
  • Detach your original volume and attach your snapshot volume

If you open your Disk Management in Windows, you can see that you’re disk has “Unallocated” disk space

Disk Management

  • Start a command prompt and enter [diskpart]
  • In diskpart enter [list volume], this command will list your volumes. Write down the volume senumber of the disk you just attached
  • Enter [select volume #], where # represents the number of your disk
  • Now enter [Extend]

Now see the magic happen :-)

Amazon Web Services – disable sysprep changes

Whenever you start or restart your Amazon Instance, it will change your time zone back to GMT (if you changed it). As I am going to install Microsoft SQL Integration Server and Microsoft SQL Reporting  Server, I want the time zone to be GMT+1.

To stop Amazon to changing the Time Zone:

  • Open %programfiles%\Amazon\Ec2ConfigSetup\bundleconfig.xml
  • Change the SetSysPrep from <Yes> to <No>

Amazon will also change your machine name, which is not usefull when hosting an SQL Server (think about the connection string). You can also change this behavior (also change the SetSysPrep option explained above in this article):

  • Open %programfiles%\Amazon\Ec2ConfigSetup\config.xml
  • Change the Ec2SetComputerName from <Enabled> to <Disabled>

  • Amazon – saving your instance

    If you configured your instance you might want to save a backup of it. You can save this instance to S3 storage.

    You first have to create a bucket which will hold your files (an instance will be saved to severall “zipped” parts). A great tool is s3 browser, you can download a free version here.
    Just install it, and add your account access identifiers details (you can find these on the Amazon  “your account” page under “access identifiers” )
    Then create a bucket, be sure to create one in the correct region (US or Europe).

    Login to your AWS Management Console and, click on Instances in the left menu. You can now right click on your running instance and choose [Bundle Instance], this will bring up a pop up box. You have to provide the bucket name which you created and a S3 key name (this is just a name for your instance files, in S3 browser you will see these files as <s3 key name>.part.### ). Press [Brundle] and be prepared to wait a little while. 
    You can view the status of your bundle task in the [bundle tasks] menu. Your instance will shutdown during this task, and when it is ready it will start up again.

    Bundle Tasks

    If the bundle task is done, you can right click the bundle task and choose [Register as an AMI]. This will create a personalized AMI, which you can start and shutdown.
    This is like a snapshot in VMWare.

    Registered AMI's

    Keep in mind that it everything on your C: drive is stored in the just created personal AMI. The provided D: drive is lost. To get more persistant disk space you have to use EBS disk space.

    Amazon AWS – i386 folder

    When I was configuring IIS on my 32 bits small instance, it asked me for the windows installation files (i386). You can attach these to your image as an EBS (Elastic Block Storage) volume.

    • In your AWS Management Console navigate to “Volumes”
    • Create a new volume and give it a minimum size of 2 GB
    • Be sure that is in the same Availability Zone as your instance
    • Then enter a snap-id for me it was: snap-a4bb5ecd, but here is a list of other Snapshots:
      Windows 2003 R2 Enterprise 32-bit: snap-a4bb5ecd
      Windows 2003 R2 Datacenter 32-bit: snap-b8bb5ed1
      Windows 2003 R2 Enterprise 64-bit: snap-a6bb5ecf
      Windows 2003 R2 Datacenter 64-bit: snap-babb5ed3

      Create Volume based on snapshot

    Amazon EC2 – Getting started with an Instance

    I recently added an article in which I took a first look into Amazon AWS. I used the commmand line tools, this time I’m gonna use the provided AWS Management Console.

    On first login, my first thought is that this probably is easier than the command line tools. First of all I’m going to change the region I am in. This can be done in the left hand corner.

    AWS Dashboard

    Key Pair
    First I have to create a key pair, so I can access my windows instance by RDP later on. Creating it is really easy, when you’re prompted to download it do so, cause I haven’t found a way to download the keypair via the console later .

    Security Group
    The best thing to do now is to create a security group, which allows RDP to the instances you start. The option to add a RDP rule is also provide when you launch an instance, but this one add’s a rule for all Ip addresses to access your instance. Probably that is not what you want.
    To add a new security group or to add a new rule to to default group, click on the security groups link in the menu.

    Amazon Machine Image
    Next, let’s look for an AMI to begin building my new instance. For that I click on AMI’s in the menu. On the next screen I can see all kind of AMI’s. I can filter them on Image Type (Amazon, Owned by Me, Public, 32 Bits, 64 Bits,etc..) and on Platform (Windows, Debian, Red Hat, SUSE, etc…). I know I’m going for a 32 bits small windows instance. When I filter on this one, it still confusing to see if you’re choosing the correct AMI. When you select one you will see some more information, but in my opinion not enough to decide if you have the correct one.

    AMI Information windows

    So to be sure I have the correct AMI, I am going to look up the AMI  ID here, and search for it in the Management Console. When you press “Launch Instance”, you will be presented by a pop-up box, which ask’s you for the security group to place the instance in. Just skip this screen if you created an access rule earlier.

    just skip this screen :-)

    On the next screen you can choose your instance type (small or medium), how many instances, your key pair and in which security group to place it. Just press launch and after a few minutes you will see the instance running in the “Instances” menu.

    Password
    When you see you’re instance running, select it and in the top menu bar there is a button called [More Action], click it and press [Get Windows Password], to retrieve the windows administrator password. For this you need the private key file you created earlier (section key pair above). Open this file and copy the complete content, including the Begin and End lines (Ex: "—–BEGIN RSA PRIVATE KEY—–"). Press [Decrypt Password]. When I did this, I received an IE notice stating that a script was running which could slow down my computer. I just let the script run (the message will appear quite a few times) and eventually I got my admin password.

    Connecting
    Now I can press [connect] in the top menu bar. Nice feature is that I can download an RDP shortcut.

    Connecting to Instance

    Now use the RDP file to connect, fill in your password and you’re ready to configure your instance.

    What is Windows Azure

    If you would put a tag cloud around Cloud Computing, one tag would definitely be Microsoft’s Windows Azure. If you don’t understand what Azure is, see this video:

    <a href="http://video.msn.com/?mkt=en-US&amp;playlist=videoByUuids:uuids:feec9c5d-c6c9-451c-aa9a-b7f4524a6322&amp;showPlaylist=true&amp;from=shared" target="_new" title="What is Windows Azure?">Video: What is Windows Azure?</a>

    Amazon EC2 – a first look

    EC2 stands for Elastic Compute Cloud. It is a web service that enables you to launch and manage Linux/UNIX and Windows server instances in Amazon’s data centers using APIs or available tools and utilities. You can use these instances to do all kind of things. Say you’re hosting a website and suddenly your site gets popular, you can then instantiate a few more instances to help balance the load. When the visitors then stop to visit your website, you can cut down on the instances, and you’re not left with any server hardware you can’t use.

    As ADA ICT is a progressive company, they wanted to know what Amazon EC2 could offer to them. A colleague of mine and myself we’re asked if we could check it out.

    Set up your account
    First of all you have to make an account, read this to set one  up. Create an S3 account and a EC2 account. As stated in the tutorial write down you AWS account’s Access Key ID and Secret Access Key. As I am going to use the Command Line Tools (CLT), I also have to get some certificates to get access to my account. You can read here how to get them (see the section “Getting your access Key Identifiers”).  Place them in a directory on your hard disk. It is important that this directory name has no spaces in it.

    Prerequisites
    There are some prerequisites you need to set up before you can use the CLT. First is Java. If you don’t have the Java Runtime Environment installed, download it here. Then setup an environment variable on you system called JAVA_HOME, this variable has to point to your Java directory in which is a bin directory with a java.exe file in it.

    Now get your CLT here. Just unzip them in a directory of your choice. These tools depend on an environment variable called EC2_HOME, so just as you created your Java variable, create a EC2_HOME variable which points to directory you chose to install your CLT. Also add the BIN directory of this directory to your PATH variable.
    We have to tell the tools who we are (because nothing stops you from having multiple AWS Accounts), so we going to create 2 new environment variables called EC2_PRIVATE_KEY and EC2_CERT, these have to point to your certificates (not the directory) you downloaded earlier (section set up your account), the EC2_PRIVATE_KEY has to point to your certificate which starts with pk, and the EC2_CERT variable to your file which starts with cert.

    So now we are in business.
    Cause we are situated in the Netherlands, we had to change our region to Europe. This can be done with the following commands

    1. first get the available regions: 

      ec2-describe-regions

      This will return: 

      REGION us-east-1 us-east-1.ec2.amazonaws.com
      REGION eu-west-1 eu-west-1.ec2.amazonaws.com

      The first is your current region.

    2. To change your region, execute the following command:  

      set EC2_URL=https://eu.west-1.ec2.amazonaws.com

    We can now find an AMI (Amazon Machine Image) as a base of our system we need to build. You can browse for available images here, or you could issue the command:

    ec2-describe-images –o self –o amazon 

    Amazon offers different types of instances: small, Large and Extra Large.
    A small instance is default and has 1.7GB of memory, 1 virtual core and 160gb of storage and suitable for a 32 bits Operating System.
    A large instance had 7,5GB of memory, 2 virtual cores and 850gb of storage and is a base for a 64 bits OS.
    The Extra Large instance had 15Gb of memory, 4 virtual cores and 1690GB of storage and is also for a 64 bits OS.
    Keep in mind that 10GB of the disk storage is used for the OS, and if you bundle the AMI (we’ll get to that later), is persistent storage. The rest is storage which will be gone when you shutdown the image, for that you have to create an EBS volume.
    There are also some high cpu instances, with more virtual cores.

    Ok, I found my AMI. I needed a Windows 2003 server for a small instance (32 bits), which does not have authentication services (meaning: Active Directory). This is the one. Write down the AMI ID (the Europe AMI ID, as I live in the Netherlands, so this is ami-7acae20e).

    We now have to generate a key pair, because the AMI is a public image and has no password. To login to this image I need a public / private key pair. To generate one, enter the following command:

    ec2-add-keypair gsg-keypair

    Amazon now returns a key pair, like this:
    KEYPAIR gsg-keypair
    1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f
    —–BEGIN RSA PRIVATE KEY—–
    MIIEoQIBAAKCAQBuLFg5ujHrtm1jnutSuoO8Xe56LlT+HM8v/xkaa39EstM3/
    aFxTHgElQiJLChp
    HungXQ29VTc8rc1bW0lkdi23OH5eqkMHGhvEwqa0HWASUMll4o3o/IX+0f2UcPoKC
    +jx71Sg
    5AU52EQfanIn3ZQ8lFW7Edp5a3q4DhjGlUKToHV………………………..

    Just copy the part starting from BEGIN RSA PRIVATE KEYuntil END RSA PRIVATE KEY (!!including these tags), save it to a file for example id_rsa-gsg-keypair.

    We can now launch our Ami with the following command:

    ec2-run-instances ami-7acae20e –k gsg-keypair

    Amazon will return to you some output, behind the text INSTANCE you will find your Instance ID, write this one down (let’s say it is: i-ab1cd2d3). It will take some time for your instance to launch. You can see the status of the instance with the following command (your instance is started when it returns running):

    ec2-describe-instances iab1cd2d3

    We now gonna authorize our network to connect to the instance by use of RDP. Execute the following command:

    ec2-authorize default –p 3389 –s 80.124.112.224/32 

    In which the ip address behind the –s parameter is your external ip interface, if you don’’t know it you can find it here. Last part is to get our password to login to windows. The following command will return your windows password:

    ec2-get-password –k id_rsa_gsg-keypair i-ab1cd2d3

    Now get the DNS name you need to connect to:

    ec2-describe-instances i-ab1cd2d3

    It will return the dns name you need for connecting to your instance by use of RDP, it will look like this <something>.eu-west-1.compute.amazonaws.com

    That’s it. Not that hard I believe.
    I am still going to look into bundeling my image (so I can shut it down, and start it with all the changes I made), firewall, EBS volume, etc…..

    We did have one issue’s, when following this guide.
    it was the error:
    “Client.InvalidParameterValue: The requested instance type’s architecture (i386) does not match the architecture in the manifest for ami-abcdefgh (x86_64)”.
    This is because we first choose a wrong AMI. This was a 64 bits AMI and we did not specify to run a large or extra large instance (parameter –instance-type), it will then default a small instance.

    New Partner Features and Partner Momentum Announced at WPC09

    This morning at the Microsoft Worldwide Partner Conference in New Orleans, Microsoft Online Services announced several new features that enable partners to assist and manage their customers who trial and buy the Business Productivity Online Suite.

    Two key features are available today as part of the newly announced Microsoft Partner Network:

    · Partner Order on Behalf. Partners can now place Microsoft Online Services orders on behalf of their customers. The feature allows partners to initiate trials, specify the services and quantities they recommend for their customers, pre-configure orders for their customers to complete, and ensure they are the Partner of Record for their customers’ trials and orders placed in the system.

    · Partner Commerce Dashboard. The new Partner Commerce Dashboard provides a consolidated view of Microsoft Online Services orders and commerce, such as the status of trials and subscriptions, for customers that have the partner specified as their Partner of Record. Partners can work within the Commerce Dashboard or export the information to Excel to be imported into a CRM system.

    Microsoft Online Services also announced Q4 availability of Delegated Administration for partners. Customers will be able to delegate administrative privileges to partners for some tasks in the Microsoft Online Services Administration Center.

    Also announced for Q4 rollout is a new partner Distributor Model and integration of partner information on customer invoices. More information about the new partner program and features will be available through Quickstart for Microsoft Online Services.

    Announcement of these features highlights the importance of partners to Microsoft Online Services. Since the Microsoft Online Services Partner Program was announced at WPC08, more than 5,000 partners have enrolled in the program. Additionally, 4 of 5 orders for the Business Productivity Online Suite have come through Partners, and Partners have built more than 100 custom solutions exclusively for Microsoft Online Services. Examples of these solutions are available via the Solutions Showcase.

    More information from WPC09 can be found on the Microsoft Press Pass site.

    Original Source: here