Skip to content

More Mind Spew-age from Harold Spencer Jr.

Random Information – sometimes techie, sometimes not..

Menu

  • About The Author
  • Interests
  • Private Cloud Computing
  • Infrastructure
  • System Adminstration
  • Private Cloud Computing

RSS All Things Distributed – Werner Vogels

  • Curious about automated reasoning
  • Curious about quantum computing
  • Expanding the cloud: Introducing the AWS Asia Pacific (Jakarta) Region
  • Tech Predictions for 2022 and Beyond
  • Announcing the AWS Robotics Startup Accelerator: It's still Day One for robotics

RSS Elastician – Mitch Garnaat

  • Back To The Future
  • Looking at Clouds from Both Sides Now
  • Don't reboot me, bro!
  • Mapping Requests to EC2 API Versions
  • Python and AWS Cookbook Available

RSS Amazon Web Services Blog

  • New – Amazon SageMaker Ground Truth Now Supports Synthetic Data Generation
  • Now in Preview – Amazon CodeWhisperer- ML-Powered Coding Companion
  • AWS IoT ExpressLink Now Generally Available – Quickly Develop Devices That Connect Securely to AWS Cloud
  • New – High Volume Outbound Communication with Amazon Connect Outbound Campaigns
  • AWS Week in Review – June 20, 2022

RSS Amazon Web Services Security Blog

  • AWS re:Inforce 2022: Threat detection and incident response track preview
  • New AWS whitepaper: AWS User Guide to Financial Services Regulations and Guidelines in New Zealand
  • Wickr for Government achieves FedRAMP Ready designation
  • AWS HITRUST Inheritance: What customers should know
  • AWS and the UK rules on operational resilience and outsourcing

RSS Google Developers Blog

  • From Developer to Teacher, How a Computer Science Professor Found Career Support with Google Developer Groups
  • Using research to make code review more equitable
  • #WeArePlay | Discover the people building apps & games businesses
  • Migrating from App Engine Memcache to Cloud Memorystore (Module 13)
  • Reach global markets as a Recommended for Google Workspace app

RSS Google Cloud Platform Blog

  • Black Kite runs millions of cyber-risk assessments at scale on Google Cloud
  • Learn how BI Engine enhances BigQuery query performance
  • Forrester names Google Cloud a leader in Document Analytics Platforms
  • How SLSA and SBOM can help healthcare's cybersecurity resiliency
  • Improving developer agility and efficiency with Google Workspace

RSS Thinking Out Cloud

  • Links for 2017-02-22 [del.icio.us]
  • Links for 2016-08-23 [del.icio.us]
  • Links for 2016-08-08 [del.icio.us]
  • Links for 2016-08-05 [del.icio.us]

Tags

acls ami ansible appscale autoscaling aws aws compatibility aws ec2 boto cloud-init cloud administrator cloud computing cloudformation coreos coreos cluster coreos etcd docker drbd ec2 elb emi emis.eucalyptus.com Euare euca2ools euca2ools 3 eucalyptus eucalyptus 2.0 eucalyptus 3.4 eucalyptus 4.0 eucalyptus 4.0.2 eucalyptus load balancer eustore eutester git haproxy high availability hybrid cloud iaas IAM image management ipython lvm mac os x mdb neo4j openldap paas Personal precise private cloud python boto s3 s3cmd stackato ubuntu cloud image ubuntu cloud images ubuntu raring varnish walrus xcode

Follow me on Twitter

My Tweets

ec2metadata

CirrOS: Perfect Machine Image for Eucalyptus Cloud Debugging

February 2, 2014February 3, 2014 hspencer77cirrOS, cloud computing, ec2metadata, emis.eucalyptus.com, euca2ools, eustore, instance debuggingLeave a comment

CirrOS is a a trimmed-down OS that has been developed to run on cloud environments. When deployed on Eucalyptus clouds, CirrOS is very effective in confirming the clouds have been set up to provide instance networking, and instance services (metadata and userdata – similar to whats provided on AWS).  Because its seen as being so helpful to cloud administrators, Eucalyptus added both 32 and 64 bit CirrOS images to eustore.  This blog entry will cover how to use eustore to bundle, upload and register the CirrOS image, and how to use it to test out instance services on a Eucalyptus cloud.

Recognition

Before discussing how to use CirrOS on Eucalyptus for instance debugging, I would like to thank the following people:

  • Victor Iglesias – Quality Engineer at Eucalyptus Systems, Inc – for introducing me to CirrOS.
  • Scott Moser – Ubuntu Server Technical Lead at Canonical – for creating CirrOS, along with other great cloud tools like Cloud-Init.

Deploying CirrOS on Eucalyptus

As a cloud administrator, adding CirrOS is relatively straight-forward when using eustore.  To start out, make sure the latest version of euca2ools has been installed. After downloading and sourcing the cloud administrator (i.e. admin user of the eucalyptus account) credentials, use eustore-describe-images to discover the CirrOS images on emis.eucalyptus.com:

$ eustore-describe-images | grep cirros
4001243952 cirros x86_64 experimental-images kvm CirrOS x86-64, 
Tiny image used for testing - root user login
1765979475 cirros i386 experimental-images kvm CirrOS i386, 
Tiny image used for testing - cirros user login
0300949733 cirros x86_64 experimental-images kvm CirrOS x86_64, 
Tiny image used for testing - cirros user login

To bundle, upload and register a CirrOS image, choose the image of your choice, and use eustore-install-image.  For example:

$ eustore-install-image -i 0300949733 -b cirros-0.3.1-x86_64 \
 --hypervisor kvm -s "CirrOS 0.3.1 - x86_64"

The image is now ready to be used on your Eucalyptus cloud.  Creating a keypair with euca-create-keypair:

$ euca-create-keypair euca-admin > euca-admin.priv

Use euca-authorize to allow SSH traffic to the instance.

$ euca-authorize -P tcp -p 22 \ 
-s 0.0.0.0/0 default

Next, launch the CirrOS image using euca-run-instances:

$ euca-run-instances -k euca-admin \
-t m1.medium emi-2611389B

After the instance has been launched successfully, lets look at some of the features of CirrOS that helps with troubleshooting instances.

Instance Status Checks in CirrOS

CirrOS provides great kernel messages when booting.  Not only does it show the boot sequence and discovery of devices, but it also shows information regarding network information and status of the instance userdata and metadata services.  To view this information, use euca-get-console-output on the instance based off the CirrOS image. For example:

$ euca-get-console-output i-B57B4273
i-B57B4273
2014-02-03T04:25:08.535Z
^[[1;256r^[[256;256H^[[6n
Google, Inc.
Serial Graphics Adapter 12/07/11
SGABIOS $Id: sgabios.S 8 2010-04-22 00:03:40Z nlaredo $ (mockbuild@c6b18n1.dev.centos.org) Wed Dec 7 17:04:47 UTC 2011
Term: 80x24
4 0
SeaBIOS (version seabios-0.6.1.2-26.el6)
........
Sending select for 172.17.125.24...
Lease of 172.17.125.24 obtained, lease time 86400
deleting routers
adding dns 10.104.1.216
adding dns 10.1.1.254
cirros-ds 'net' up at 0.68
checking http://169.254.169.254/2009-04-04/instance-id
successful after 1/20 tries: up 0.69. iid=i-B57B4273
failed to get http://169.254.169.254/2009-04-04/user-data
warning: no ec2 metadata for user-data
found datasource (ec2, net)
Starting dropbear sshd: generating rsa key... generating dsa key... OK
/run/cirros/datasource/data/user-data was not '#!' or executable
=== network info ===
if-info: lo,up,127.0.0.1,8,::1
if-info: eth0,up,172.17.125.24,27,fe80::d20d:b5ff:fe7b:4273
ip-route:default via 172.17.125.1 dev eth0
ip-route:172.17.125.0/27 dev eth0 src 172.17.125.24
=== datasource: ec2 net ===
instance-id: i-B57B4273
name: N/A
availability-zone: LayinDaSmackDown
local-hostname: euca-172-17-125-24.eucalyptus.internal
launch-index: 0
......

As viewed from the output, it provides some of the metadata information of the instance.  Because there was no userdata passed when launching the instance, the following error is seen:

/run/cirros/datasource/data/user-data was not '#!' or executable

To see all the metadata provided to the instance, SSH into the instance and run ‘ec2metadata’:

$ ssh -i admin-creds/euca-admin.priv cirros@euca-10-104-7-11.eucalyptus.euca-hasp.eucalyptus-systems.com
The authenticity of host 'euca-10-104-7-11.eucalyptus.euca-hasp.eucalyptus-systems.com (10.104.7.11)' can't be established.
RSA key fingerprint is ae:3a:3f:4d:fe:a2:ab:a6:8d:0c:56:3f:18:93:d1:f9.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'euca-10-104-7-11.eucalyptus.euca-hasp.eucalyptus-systems.com,10.104.7.11' (RSA) to the list of known hosts.
$ ec2metadata
ami-id: emi-2611389B
ami-launch-index: 0
ami-manifest-path: cirros-0.3.1-x86_64/cirros-0.3.1-x86_64-rootfs.img.manifest.xml
block-device-mapping/ami: sda1
block-device-mapping/emi: sda1
block-device-mapping/ephemeral: sda2
block-device-mapping/ephemeral0: sda2
block-device-mapping/root: /dev/sda1
block-device-mapping/swap: sda3
hostname: euca-172-17-125-24.eucalyptus.internal
instance-id: i-B57B4273
instance-type: m1.small
kernel-id: eki-37D335EF
local-hostname: euca-172-17-125-24.eucalyptus.internal
local-ipv4: 172.17.125.24
mac: D0:0D:B5:7B:42:73
placement/availability-zone: LayinDaSmackDown
public-hostname: euca-10-104-7-11.eucalyptus.euca-hasp.eucalyptus-systems.com
public-ipv4: 10.104.7.11
public-keys/0: openssh-key
ramdisk-id: eri-487537CB
reservation-id: r-87584400
security-groups: default

Thats it!  As demonstrated, CirrOS helps cloud administrators test networking and instance services for instances relatively quickly.  Using CirrOS helps narrow down if there is a Eucalyptus cloud deployment issue versus an image issue. If you feel really adventurous, Scott has provided some great instructions on how cloud administrators can build their own CirrOS image by hand. Hope this helps.  Enjoy!

 

 

34.430176 -119.861645
CirrOS: Perfect Machine Image for Eucalyptus Cloud Debugging
Blog at WordPress.com.
  • Follow Following
    • More Mind Spew-age from Harold Spencer Jr.
    • Join 374 other followers
    • Already have a WordPress.com account? Log in now.
    • More Mind Spew-age from Harold Spencer Jr.
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar