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

  • Is Australia the new epicenter for healthtech startups?
  • Bringing Digital People to life with autonomous animation
  • Melbourne gets a Region, a big trip, and a brain mapping startup
  • An album for each year - 2022 version
  • Tech predictions for 2023 and beyond

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

  • Announcing General Availability of Step-by-Step Guides for Amazon Connect Agent Workspace
  • How French Broadcaster TF1 Used AWS Cloud Technology and Expertise to Bring the FIFA World Cup to Millions
  • AWS Application Migration Service Major Updates: Import and Export Feature, Source Server Migration Metrics Dashboard, and Additional Post-Launch Actions
  • Amazon Chime SDK Call Analytics: Real-Time Voice Tone Analysis and Speaker Search
  • AWS Week in Review – March 27, 2023

RSS Amazon Web Services Security Blog

  • The National Intelligence Center of Spain and AWS collaborate to promote public sector cybersecurity
  • How to use Amazon GuardDuty and AWS WAF v2 to automatically block suspicious hosts
  • Automate the deployment of an NGINX web service using Amazon ECS with TLS offload in CloudHSM
  • Use backups to recover from security incidents
  • Simplify management of Network Firewall rule groups with VPC managed prefix lists

RSS Google Developers Blog

  • GDE Women’s History Month Feature: Jigyasa Grover, Machine Learning
  • What it means to be an Android Google Developer Expert
  • Launching new #WeArePlay stories from India
  • Build your first AppSheet app: how I built a food tracker
  • How students are making an impact on mental health through technology

RSS Google Cloud Platform Blog

  • What’s new with Google Cloud
  • Accelerate time to value with Google’s Data Cloud for your industry
  • Pub/Sub schema evolution is now GA
  • Coop reduces food waste by forecasting with Google’s AI and Data Cloud
  • Introducing time-bound Session Length defaults to improve your security posture

RSS Thinking Out Cloud

  • Ravello Launches the Cloud Application Hypervisor
  • State of the Open Source Cloud
  • Cloud Adoption Patterns - Citrix Synergy 2012 Keynote
  • In the Game of Clouds, You Win Or You Die: CloudStack

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

cirrOS

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.
    • 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