<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Divyen Patel&#039;s Weblog</title>
	<atom:link href="http://www.recyclecode.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.recyclecode.com</link>
	<description></description>
	<lastBuildDate>Thu, 06 May 2010 17:57:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Got my SCJP-6 Certificate and Card</title>
		<link>http://www.recyclecode.com/2010/05/got-my-scjp-6-certificate-and-card/</link>
		<comments>http://www.recyclecode.com/2010/05/got-my-scjp-6-certificate-and-card/#comments</comments>
		<pubDate>Thu, 06 May 2010 17:52:20 +0000</pubDate>
		<dc:creator>Divyen Patel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.recyclecode.com/?p=463</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-large wp-image-471" title="divyen_patel_scjp_java_6" src="http://www.recyclecode.com/wp-content/uploads/2010/05/divyen_patel_scjp_java_6-1024x768.jpg" alt="" width="1024" height="768" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.recyclecode.com/2010/05/got-my-scjp-6-certificate-and-card/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL on EBS with OpenSolaris based AMI</title>
		<link>http://www.recyclecode.com/2010/01/mysql-on-ebs-with-opensolaris-based-ami/</link>
		<comments>http://www.recyclecode.com/2010/01/mysql-on-ebs-with-opensolaris-based-ami/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 03:03:31 +0000</pubDate>
		<dc:creator>Divyen Patel</dc:creator>
				<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.recyclecode.com/?p=326</guid>
		<description><![CDATA[Amazon Elastic Block Store (EBS) is the persistent storage which can be attached to the AMI instance. Data can be safely placed and accessed independent of the life of the instance. There are plenty of benefits using EBS for MySQL. For detailed explanation click here. Following steps describes how to use MySQL on EBS volume [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://aws.amazon.com/ebs/" target="_blank">Amazon Elastic Block Store</a> (EBS) is the persistent storage which can be attached to the AMI instance. Data can be safely placed and accessed independent of the life of the instance. There are plenty of benefits using EBS for MySQL. For detailed explanation <a href="http://developer.amazonwebservices.com/connect/entry.jspa?categoryID=100&amp;externalID=1663">click here</a>. </p>
<div align="center"><img src="http://g-ecx.images-amazon.com/images/G/01/00/00/01/70/59/49/170594930._V258976317_.gif" /> <img src="http://g-ecx.images-amazon.com/images/G/01/00/10/00/14/19/27/100014192753._V46777512_.gif" /></div>
<p>Following steps describes how to use MySQL on EBS volume with OpenSolaris based AMI.</p>
<h4>1. Create a new EBS Volume.</h4>
<div class="box">$ ec2-create-volume &#8211;size 10 &#8211;availability-zone us-east-1a<br />VOLUME&nbsp;&nbsp;&nbsp; vol-688d4c01&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; us-east-1a&nbsp;&nbsp;&nbsp; creating&nbsp;&nbsp;&nbsp; 2010-01-13T21:54:57+0000</div>
<p></p>
<div class="box">$ ec2-describe-volumes vol-688d4c01<br />VOLUME&nbsp;&nbsp;&nbsp; vol-688d4c01&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; us-east-1a&nbsp;&nbsp;&nbsp; available&nbsp;&nbsp;&nbsp; 2010-01-13T21:54:57+0000</div>
<p><a target="_blank" href="http://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference/index.html?ApiReference-cmd-CreateVolume.html">Click here</a> for ec2-create-volume API help.</p>
<h4>2. Create a new MySQL 5.1 AMI Instance based on OpenSolaris.</h4>
<div class="box">$ ec2-run-instances ami-752ccb1c -k my-keypair<br />RESERVATION&nbsp;&nbsp; &nbsp;r-2486124c&nbsp;&nbsp;&nbsp; 987654321123 &nbsp;&nbsp; default<br />INSTANCE&nbsp;&nbsp;&nbsp; i-9e6858f6&nbsp;&nbsp;&nbsp; ami-752ccb1c&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pending&nbsp;&nbsp;&nbsp; my-keypair&nbsp;&nbsp; &nbsp;0&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;m1.small&nbsp;&nbsp; &nbsp;2010-01-17T00:01:24+0000&nbsp;&nbsp; &nbsp;us-east-1a&nbsp;&nbsp; &nbsp;aki-6552b60c&nbsp;&nbsp; &nbsp;ari-6452b60d&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;monitoring-disabled</div>
<p><a href="/ec2/entry/mysql_ami_on_opensolaris_2008" target="_blank">Click here</a> for more details on this AMI.</p>
<h4>3. Attach EBS volume to this AMI instance </h4>
<div class="box">$ ec2-attach-volume -i i-9e6858f6 -d 2 vol-688d4c01<br />ATTACHMENT&nbsp;&nbsp;&nbsp; vol-688d4c01&nbsp;&nbsp;&nbsp; i-9e6858f6&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; attaching&nbsp;&nbsp;&nbsp; 2010-01-13T22:02:51+0000 </div>
<p>
In the above command -d option specifies the device number. In OpenSolaris devices are named from 0 to 23. Device number 0 and 1 are used for ephemeral storage. Therefore, we can use the devices starting from 2 until 23.</p>
<div class="box">$ ec2-describe-volumes vol-688d4c01<br />VOLUME&nbsp;&nbsp;&nbsp; vol-688d4c01&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; us-east-1a&nbsp;&nbsp;&nbsp; in-use&nbsp;&nbsp;&nbsp; 2010-01-13T21:54:57+0000<br />ATTACHMENT&nbsp;&nbsp;&nbsp; vol-688d4c01&nbsp;&nbsp;&nbsp; i-9e6858f6&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; attached&nbsp;&nbsp;&nbsp; 2010-01-13T22:02:51+0000 </div>
</p>
<p><a href="http://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference/index.html?ApiReference-cmd-AttachVolume.html" target="_blank">Click here</a> for ec2-attach-volume API help.<br /><a href="http://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference/index.html?ApiReference-cmd-DescribeVolumes.html" target="_blank">Click here</a> for ec2-describe-volumes API help. </p>
<h4>4. Create a ZFS storage pool on the previously attached EBS volume.</h4>
<p>Once the instance is up and running, login into the instance using ssh with your key-pair.<br />To verify new EBS volume attached, execute the format command and press Control + C to come out.</p>
<div class="box">root@domU-12-31-39-03-21-E4:~# format<br />Searching for disks&#8230;done</p>
<p>AVAILABLE DISK SELECTIONS:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0. c3d0 &lt;DEFAULT cyl 1274 alt 0 hd 255 sec 63&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /xpvd/xdf@0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1. c3d1 &lt;DEFAULT cyl 19464 alt 0 hd 255 sec 63&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /xpvd/xdf@1<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2. c3d2 &lt;DEFAULT cyl 1305 alt 0 hd 255 sec 63&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /xpvd/xdf@2<br />Specify disk (enter its number): ^C<br />root@domU-12-31-39-03-21-E4:~#</div>
<p> Create a ZFS storage pool on the EBS volume.</p>
<div class="box">root@domU-12-31-39-03-21-E4:~# zpool create ebsmysql c3d2</div>
<p></p>
<div class="box">root@domU-12-31-39-03-21-E4:~# zpool list<br />NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE&nbsp;&nbsp; USED&nbsp; AVAIL&nbsp;&nbsp;&nbsp; CAP&nbsp; HEALTH&nbsp; ALTROOT<br />ebsmysql&nbsp; 9.94G&nbsp; 73.5K&nbsp; 9.94G&nbsp;&nbsp;&nbsp;&nbsp; 0%&nbsp; ONLINE&nbsp; -<br />mnt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 149G&nbsp; 73.5K&nbsp;&nbsp; 149G&nbsp;&nbsp;&nbsp;&nbsp; 0%&nbsp; ONLINE&nbsp; -<br />rpool&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.75G&nbsp; 3.50G&nbsp; 6.25G&nbsp;&nbsp;&nbsp; 35%&nbsp; ONLINE&nbsp; -<br />root@domU-12-31-39-03-21-E4:~# </div>
</p>
<div class="box">root@domU-12-31-39-03-21-E4:~# zpool status ebsmysql<br />&nbsp; pool: ebsmysql<br />&nbsp;state: ONLINE<br />&nbsp;scrub: none requested<br />config:</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATE&nbsp;&nbsp;&nbsp;&nbsp; READ WRITE CKSUM<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ebsmysql&nbsp;&nbsp;&nbsp; ONLINE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c3d2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ONLINE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>errors: No known data errors<br />root@domU-12-31-39-03-21-E4:~# </div>
<p>Move MySQL on ZFS storage pool based on EBS</p>
<p>Make sure MySQL service is disabled.</p>
<div class="box">root@domU-12-31-39-03-21-E4:~# svcs svc:/application/mysql:default<br />STATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STIME&nbsp;&nbsp;&nbsp; FMRI<br />disabled&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 21:57:48 svc:/application/mysql:default<br />root@domU-12-31-39-03-21-E4:~#</div>
<p>If MySQL service is running make sure to disable it using&nbsp; svcadm disable svc:/application/mysql:default</p>
<p>Move MySQL installation directory to /ebsmysql</p>
<div class="box">root@domU-12-31-39-03-21-E4:~# mv /usr/local/mysql/ /ebsmysql/<br />root@domU-12-31-39-03-21-E4:~#</div>
<p></p>
<p>Create a soft link to /ebsmysql/mysql/ under /usr/local with the name &#8216;mysql&#8217;</p>
<div class="box">root@domU-12-31-39-03-21-E4:~# cd /usr/local/<br />root@domU-12-31-39-03-21-E4:/usr/local# ln -s /ebsmysql/mysql/ mysql</div>
<p></p>
<div class="box">root@domU-12-31-39-03-21-E4:/usr/local# ls -la <br />total 5<br />drwxr-xr-x&nbsp; 2 root root&nbsp; 3 2010-01-13 22:08 .<br />drwxr-xr-x 32 root sys&nbsp; 46 2009-02-19 23:20 ..<br />lrwxrwxrwx&nbsp; 1 root root 16 2010-01-13 22:08 mysql -&gt; /ebsmysql/mysql/<br />root@domU-12-31-39-03-21-E4:/usr/local#</div>
<p>Enable MySQL service </p>
<div class="box">root@domU-12-31-39-03-21-E4:~# svcadm enable svc:/application/mysql:default<br />root@domU-12-31-39-03-21-E4:~# svcs svc:/application/mysql:default<br />STATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STIME&nbsp;&nbsp;&nbsp; FMRI<br />online&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 22:09:43 svc:/application/mysql:default<br />root@domU-12-31-39-03-21-E4:~#</div>
<p>Test MySQL</p>
<div class="box"> root@domU-12-31-39-03-21-E4:~# /ebsmysql/mysql/bin/mysql -u root -p<br />Enter password: <br />Welcome to the MySQL monitor.&nbsp; Commands end with ; or \g.<br />Your MySQL connection id is 3<br />Server version: 5.1.25-rc Source distribution</p>
<p>Type &#8216;help;&#8217; or &#8216;\h&#8217; for help. Type &#8216;\c&#8217; to clear the buffer.</p>
<p>mysql&gt; show databases;<br />+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />| Database&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; |<br />+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />| information_schema | <br />| mysql&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; | <br />| sbtest&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; | <br />| test&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | <br />+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />4 rows in set (0.01 sec)</p>
<p>mysql&gt;</p></div>
<h4>5. Detach EBS volume from AMI instance </h4>
<div class="box">root@domU-12-31-39-03-21-E4:~# svcadm disable svc:/application/mysql:default</div>
<p></p>
<div class="box">root@domU-12-31-39-03-21-E4:~# svcs svc:/application/mysql:default<br />STATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STIME&nbsp;&nbsp;&nbsp; FMRI<br />disabled&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3:09:07 svc:/application/mysql:default<br />root@domU-12-31-39-0A-0E-64:~#</div>
<p></p>
<div class="box">root@domU-12-31-39-03-21-E4:~# zpool export ebsmysql<br />root@domU-12-31-39-03-21-E4:~# zpool list<br />NAME&nbsp;&nbsp;&nbsp; SIZE&nbsp;&nbsp; USED&nbsp; AVAIL&nbsp;&nbsp;&nbsp; CAP&nbsp; HEALTH&nbsp; ALTROOT<br />mnt&nbsp;&nbsp;&nbsp;&nbsp; 149G&nbsp; 73.5K&nbsp;&nbsp; 149G&nbsp;&nbsp;&nbsp;&nbsp; 0%&nbsp; ONLINE&nbsp; -<br />rpool&nbsp; 9.75G&nbsp; 3.22G&nbsp; 6.53G&nbsp;&nbsp;&nbsp; 33%&nbsp; ONLINE&nbsp; -<br />root@domU-12-31-39-03-21-E4:~#</div>
<p></p>
<div class="box">$ ec2-detach-volume vol-688d4c01<br />ATTACHMENT&nbsp;&nbsp;&nbsp; vol-688d4c01&nbsp;&nbsp; i-9e6858f6&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; detaching&nbsp;&nbsp;&nbsp; 2010-01-17T02:58:33+0000</div>
<p></p>
<div class="box">$ ec2-describe-volumes vol-688d4c01<br />VOLUME&nbsp;&nbsp;&nbsp; vol-688d4c01&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; us-east-1a&nbsp;&nbsp;&nbsp; available&nbsp;&nbsp;&nbsp; 2010-01-17T02:50:34+0000<br />divyen-patels-macbook:ec2 divyenpatel$ </div>
<p></p>
<h4>6. Re-attach EBS volume to the AMI instance </h4>
<div class="box">$ ec2-attach-volume -i i-9e6858f6 -d 2 vol-688d4c01<br />ATTACHMENT&nbsp;&nbsp; &nbsp;vol-5f0ccd36&nbsp;&nbsp;&nbsp; i-9e6858f6&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; &nbsp;attaching&nbsp;&nbsp; &nbsp;2010-01-17T03:18:25+0000</div>
<p></p>
<div class="box">$ ec2-describe-volumes vol-688d4c01<br />VOLUME&nbsp;&nbsp;&nbsp; vol-688d4c01&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;us-east-1a&nbsp;&nbsp; &nbsp;in-use&nbsp;&nbsp; &nbsp;2010-01-17T02:50:34+0000<br />ATTACHMENT&nbsp;&nbsp;&nbsp; vol-688d4c01&nbsp;&nbsp;&nbsp; i-9e6858f6&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; &nbsp;attached&nbsp;&nbsp; &nbsp;2010-01-17T03:18:25+0000</div>
<p><b>Import the pool</b></p>
<div class="box">root@domU-12-31-39-03-21-E4:~# zpool import ebsmysql </div>
<p></p>
<div class="box">root@domU-12-31-39-03-21-E4:~# zpool list<br />NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE&nbsp;&nbsp; USED&nbsp; AVAIL&nbsp;&nbsp;&nbsp; CAP&nbsp; HEALTH&nbsp; ALTROOT<br />ebsmysql&nbsp; 9.94G&nbsp;&nbsp; 285M&nbsp; 9.66G&nbsp;&nbsp;&nbsp;&nbsp; 2%&nbsp; ONLINE&nbsp; -<br />mnt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 149G&nbsp; 73.5K&nbsp;&nbsp; 149G&nbsp;&nbsp;&nbsp;&nbsp; 0%&nbsp; ONLINE&nbsp; -<br />rpool&nbsp;&nbsp;&nbsp;&nbsp; 9.75G&nbsp; 3.22G&nbsp; 6.53G&nbsp;&nbsp;&nbsp; 33%&nbsp; ONLINE&nbsp; -<br />root@domU-12-31-39-03-21-E4:~#</div>
<p></p>
<h4>7. Add another EBS Volume to pool</h4>
<div class="box">$ ec2-create-volume &#8211;size 10 &#8211;availability-zone us-east-1a<br />VOLUME&nbsp;&nbsp;&nbsp; vol-990ccdf0&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; us-east-1a&nbsp;&nbsp;&nbsp; creating&nbsp;&nbsp;&nbsp; 2010-01-17T03:24:24+0000</div>
<p></p>
<div class="box">$ ec2-describe-volumes vol-990ccdf0<br />VOLUME&nbsp;&nbsp;&nbsp; vol-990ccdf0&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; us-east-1a&nbsp;&nbsp;&nbsp; available&nbsp;&nbsp;&nbsp; 2010-01-17T03:24:24+0000</div>
<p></p>
<div class="box">$ ec2-attach-volume -i i-9e6858f6 -d 3 vol-990ccdf0<br />ATTACHMENT&nbsp;&nbsp;&nbsp; vol-990ccdf0&nbsp;&nbsp;&nbsp; i-9e6858f6&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp; attaching&nbsp;&nbsp;&nbsp; 2010-01-17T03:25:02+0000</div>
<p></p>
<div class="box">$ ec2-describe-volumes vol-990ccdf0<br />VOLUME&nbsp;&nbsp;&nbsp; vol-990ccdf0&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; us-east-1a&nbsp;&nbsp;&nbsp; in-use&nbsp;&nbsp;&nbsp; 2010-01-17T03:24:24+0000<br />ATTACHMENT&nbsp;&nbsp;&nbsp; vol-990ccdf0&nbsp;&nbsp;&nbsp; i-9e6858f6&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp; attached&nbsp;&nbsp;&nbsp; 2010-01-17T03:25:02+0000</div>
<p></p>
<div class="box">root@domU-12-31-39-03-21-E4:~# zpool list<br />NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE&nbsp;&nbsp; USED&nbsp; AVAIL&nbsp;&nbsp;&nbsp; CAP&nbsp; HEALTH&nbsp; ALTROOT<br />ebsmysql&nbsp; 9.94G&nbsp;&nbsp; 285M&nbsp; 9.66G&nbsp;&nbsp;&nbsp;&nbsp; 2%&nbsp; ONLINE&nbsp; -<br />mnt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 149G&nbsp; 73.5K&nbsp;&nbsp; 149G&nbsp;&nbsp;&nbsp;&nbsp; 0%&nbsp; ONLINE&nbsp; -<br />rpool&nbsp;&nbsp;&nbsp;&nbsp; 9.75G&nbsp; 3.22G&nbsp; 6.53G&nbsp;&nbsp;&nbsp; 33%&nbsp; ONLINE&nbsp; -</div>
<p></p>
<div class="box">root@domU-12-31-39-03-21-E4:~# zpool add ebsmysql c3d3</div>
<p></p>
<div class="box">root@domU-12-31-39-03-21-E4:~# zpool list<br />NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE&nbsp;&nbsp; USED&nbsp; AVAIL&nbsp;&nbsp;&nbsp; CAP&nbsp; HEALTH&nbsp; ALTROOT<br />ebsmysql&nbsp; 19.9G&nbsp;&nbsp; 285M&nbsp; 19.6G&nbsp;&nbsp;&nbsp;&nbsp; 1%&nbsp; ONLINE&nbsp; -<br />mnt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 149G&nbsp; 73.5K&nbsp;&nbsp; 149G&nbsp;&nbsp;&nbsp;&nbsp; 0%&nbsp; ONLINE&nbsp; -<br />rpool&nbsp;&nbsp;&nbsp;&nbsp; 9.75G&nbsp; 3.22G&nbsp; 6.53G&nbsp;&nbsp;&nbsp; 33%&nbsp; ONLINE&nbsp; -<br />root@domU-12-31-39-03-21-E4:~#</div>
<p></p>
<div class="box">root@domU-12-31-39-03-21-E4:~# zpool status ebsmysql<br />&nbsp; pool: ebsmysql<br />&nbsp;state: ONLINE<br />&nbsp;scrub: none requested<br />config:</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATE&nbsp;&nbsp;&nbsp;&nbsp; READ WRITE CKSUM<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ebsmysql&nbsp;&nbsp;&nbsp; ONLINE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c3d2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ONLINE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c3d3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ONLINE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p>errors: No known data errors<br />root@domU-12-31-39-03-21-E4:~#</div>
<p></p>
<h4>Important Links:</h4>
<p>MySQL on ZFS: <br /><a href="http://dev.mysql.com/tech-resources/articles/mysql-zfs.html" target="_blank">http://dev.mysql.com/tech-resources/articles/mysql-zfs.html</a></p>
<p>EBS With OpenSolaris AMI:<br /><a href="/ec2/entry/ebs_is_supported_on_opensolaris" target="_blank">http://blogs.sun.com/ec2/entry/ebs_is_supported_on_opensolaris</a></p>
<p>Amazon EBS, OpenSolaris, and ZFS Guide to Getting Started<br /><a href="/ec2/resource/OpenSolaris-ZFS-EBS-v1.3.pdf" target="_blank">http://blogs.sun.com/ec2/resource/OpenSolaris-ZFS-EBS-v1.3.pdf</a></p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.recyclecode.com/2010/01/mysql-on-ebs-with-opensolaris-based-ami/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connecting MySQL server on Amazon EC2 instance using ssh tunnel</title>
		<link>http://www.recyclecode.com/2009/12/connecting-mysql-server-on-amazon-ec2-instance-using-ssh-tunnel/</link>
		<comments>http://www.recyclecode.com/2009/12/connecting-mysql-server-on-amazon-ec2-instance-using-ssh-tunnel/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 18:26:05 +0000</pubDate>
		<dc:creator>Divyen Patel</dc:creator>
				<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://recyclecode.com/?p=260</guid>
		<description><![CDATA[SSH tunnel basically does the port forwarding via secure ssh service. Let&#8217;s start with launching a latest hardened AMP stack AMI (ami-e0b05389) instance. Once the instnace is up and running, open the terminal client and connect to the instance using ssh. Edit the /etc/ssh/sshd_config file and set AllowTcpForwarding to yes AllowTcpForwarding yes Restart ssh service [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ssh.com/support/documentation/online/ssh/winhelp/32/Tunneling_Explained.html" target="_blank">SSH tunnel</a> basically does the port forwarding via secure ssh service.</p>
<p>Let&#8217;s start with launching a latest hardened AMP stack AMI (<a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=2975&amp;categoryID=204" target="_blank">ami-e0b05389</a>) instance.<br />
Once the instnace is up and running, open the terminal client and connect to the instance using ssh.</p>
<p>Edit the /etc/ssh/sshd_config file and set AllowTcpForwarding to yes</p>
<pre>AllowTcpForwarding yes</pre>
<p>Restart ssh service</p>
<pre>svcadm restart svc:/network/ssh:default</pre>
<p>Comment out skip-networking from /etc/mysql/my.cnf and save the file</p>
<pre>#skip-networking</pre>
<p>Restart MySQL service</p>
<pre>svcadm restart svc:/application/database/mysql:version_51</pre>
<p>exit the ssh connection and recreate ssh connection using following command.</p>
<pre>ssh -i &lt;keypair&gt; -L 3307:localhost:3306 root@ec2-xxx-xxx-xxx-xx.compute-1.amazonaws.com</pre>
<p>Keep the terminal opened, and start <a href="http://dev.mysql.com/doc/query-browser/en/index.html" target="_blank">MySQL Query Browser</a> / <a href="http://dev.mysql.com/doc/administrator/en/index.html" target="_blank">MySQL administrator</a> from your local machine. and  connect to the MySQL server on remote EC2 instance via the port 3307, as shown in the following sanpshots.</p>
<p><img src="http://www.recyclecode.com/wp-content/uploads/2010/03/ssh_tunnel_mysql_query_browser_connect.png" alt="" width="376" height="287" /></p>
<p><img src="http://www.recyclecode.com/wp-content/uploads/2010/03/ssh_tunnel_mysql_query_browser_window.png" alt="" width="718" height="486" /></p>
<p>When done close the ssh connection and it should close the ssh tunnel.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.recyclecode.com/2009/12/connecting-mysql-server-on-amazon-ec2-instance-using-ssh-tunnel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating paravirtualized CentOS 5.3 DomU on OpenSolaris 2009.06 Dom0</title>
		<link>http://www.recyclecode.com/2009/10/creating-paravirtualized-centos-53-domu-on-opensolaris-200906-dom0/</link>
		<comments>http://www.recyclecode.com/2009/10/creating-paravirtualized-centos-53-domu-on-opensolaris-200906-dom0/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 07:31:06 +0000</pubDate>
		<dc:creator>Divyen Patel</dc:creator>
				<category><![CDATA[xVM]]></category>

		<guid isPermaLink="false">http://recyclecode.com/?p=261</guid>
		<description><![CDATA[Setup OpenSolaris Dom0 First Step is to setup xVM Hypervisor on the OpenSolaris 2009.06 machine. Follow the steps mentioned at following link and setup Dom0 OpneSolaris 2009.06. http://hub.opensolaris.org/bin/view/Community+Group+xen/2008_11_dom0 Create a RAW disk image for the DomU installation mkdir /centos53-pv/ cd /centos53-pv/ dd if=/dev/zero of=CentOS-5.3-x86_64.img bs=1k seek=10000k count=1 Enable xvm/virtd service on Dom0 svcadm enable svc:/system/xvm/virtd:default [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Setup OpenSolaris Dom0 </strong></p>
<p>First Step is to setup <a href="http://hub.opensolaris.org/bin/view/Community+Group+xen/WebHome" target="_blank">xVM Hypervisor</a> on the OpenSolaris 2009.06 machine.</p>
<p>Follow the steps mentioned at following link and setup <a href="http://wiki.xensource.com/xenwiki/Dom0" target="_blank">Dom0</a> OpneSolaris 2009.06.<span> </span> <a href="http://hub.opensolaris.org/bin/view/Community+Group+xen/2008_11_dom0" target="_blank"></p>
<p>http://hub.opensolaris.org/bin/view/Community+Group+xen/2008_11_dom0</a></p>
<p><strong>Create a RAW disk image for the <a href="http://wiki.xensource.com/xenwiki/DomU" target="_blank">DomU</a> installation</strong></p>
<pre>mkdir /centos53-pv/
cd /centos53-pv/
dd if=/dev/zero of=CentOS-5.3-x86_64.img bs=1k seek=10000k count=1</pre>
<p><strong>Enable xvm/virtd service on Dom0</strong></p>
<pre>svcadm enable svc:/system/xvm/virtd:default</pre>
<p><strong>Begin the <a href="http://staging.xen.org/about/paravirtualization.html" target="_blank">Paravirtualized</a> <a href="http://www.centos.org/" target="_blank">CentOS</a> DomU installation with the <a href="http://hub.opensolaris.org/bin/view/Community+Group+xen/virtinstall" target="_blank">virt-install</a> command</strong></p>
<pre>virt-install -n centos53_x86_64 \
-r 1024 \
-f /centos53-pv/CentOS-5.3-x86_64.img \
-p --nographics \
-l http://mirrors.kernel.org/centos/5.3/os/x86_64/</pre>
<p>In the above command -n is for the name of the domu, -r is for the memory, -f is for specifying location of the raw disk on which installation will be performed, -p is for specifying paravirtualized mode and -l is for the location containing an installable distribution image.</p>
<p><strong>Follow the regular CentOS installation steps and reboot the DomU when prompted.</strong></p>
<p>Following snapshots walk you through CentOS DomU installation.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashvars" value="host=picasaweb.google.com&amp;noautoplay=1&amp;hl=en_US&amp;feat=flashalbum&amp;RGB=0x000000&amp;feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fdivyen.sjsu%2Falbumid%2F5398593449346604129%3Falt%3Drss%26kind%3Dphoto%26hl%3Den_US" /><param name="src" value="http://picasaweb.google.com/s/c/bin/slideshow.swf" /><embed type="application/x-shockwave-flash" width="600" height="400" src="http://picasaweb.google.com/s/c/bin/slideshow.swf" flashvars="host=picasaweb.google.com&amp;noautoplay=1&amp;hl=en_US&amp;feat=flashalbum&amp;RGB=0x000000&amp;feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fdivyen.sjsu%2Falbumid%2F5398593449346604129%3Falt%3Drss%26kind%3Dphoto%26hl%3Den_US"></embed></object></p>
<p><strong>After reboot enable ssh login for root user on DomU</strong></p>
<p>uncomment the line &#8220;PermitRootLogin yes&#8221; from &#8220;/etc/ssh/sshd_config&#8221; file and save it.</p>
<p><strong>Extract kernel and ramdisk from the running DomU image</strong></p>
<p>Copy &#8220;/boot/vmlinuz-2.6.18-128.el5xen&#8221; and &#8220;/boot/initrd-2.6.18-128.el5xen.img&#8221; files to Dom0 machine at &#8220;/centos53-pv/&#8221;.</p>
<pre>scp  /boot/vmlinuz-2.6.18-128.el5xen root@dom0-ip:/centos53-pv/
scp  /boot/initrd-2.6.18-128.el5xen.img root@dom0-ip:/centos53-pv/</pre>
<p><span style="font-weight: bold;">Halt the DomU.</span></p>
<p>Shutdown domU issuing halt command inside domU and remove a domain from Xend domain management using following command.</p>
<pre># xm delete centos53_x86_64</pre>
<p><strong>Create a domain configuration file as given below. </strong></p>
<p>Create &#8220;/centos53-pv/domu.py&#8221; file as given below</p>
<pre># cat domu_64.py
name = "centos53_x86_64"
memory = "2058"
kernel = "/centos53-pv/vmlinuz-2.6.18-128.el5xen"
ramdisk = "/centos53-pv/initrd-2.6.18-128.el5xen.img"
disk = ['file:/centos53-pv/CentOS-5.3-x86_64.img,xvda,w']
vif = ['']</pre>
<p><strong>Relaunch the DomU by passing extracted kernel and ramdisk images using py script. </strong></p>
<pre># xm create domu.py
Using config file "./domu.py".
Started domain centos53_x86_64</pre>
<p><strong>Access domU console</strong></p>
<pre># xm console centos53_x86_64</pre>
<p><img src="http://www.recyclecode.com/wp-content/uploads/2010/03/centos_domu_console.png" alt="" /><br />
<strong><br />
Cent OS 5.3 Paravirtualized DomU VNC Session on OpenSolaris 2009.06 Dom0</strong></p>
<p><strong><span style="font-weight: normal;"><img src="http://www.recyclecode.com/wp-content/uploads/2010/03/centos_domu_vnc_session.png" alt="" width="727" height="504" /> </span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.recyclecode.com/2009/10/creating-paravirtualized-centos-53-domu-on-opensolaris-200906-dom0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Setup iPhone AWS manager on OpenSolaris EC2 Instance</title>
		<link>http://www.recyclecode.com/2009/06/how-to-setup-iphone-aws-manager-on-opensolaris-ec2-instance/</link>
		<comments>http://www.recyclecode.com/2009/06/how-to-setup-iphone-aws-manager-on-opensolaris-ec2-instance/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 02:54:08 +0000</pubDate>
		<dc:creator>Divyen Patel</dc:creator>
				<category><![CDATA[Amazon EC2]]></category>

		<guid isPermaLink="false">http://recyclecode.com/?p=262</guid>
		<description><![CDATA[Project Link: http://code.google.com/p/iphone-aws-manager/ I was looking for the free iPhone application to manage my ec2 account and came across this article: &#8220;Mobile Monitoring and Administration of Amazon Web Services: Developing an iPhone-Optimized Web Application&#8221;. This article not only describes in details each steps on how to begin with developing iPhone application to manage AWS but [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.idcc.net/aolimages/iPhoneAWS.png" alt="" /><br />
Project Link: <a href="http://code.google.com/p/iphone-aws-manager/" target="_blank">http://code.google.com/p/iphone-aws-manager/</a></p>
<p>I was looking for the free iPhone application to manage my ec2 account and came across this article: &#8220;<a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1183" target="_blank"></a>Mobile Monitoring and Administration of Amazon Web Services: Developing an iPhone-Optimized Web Application&#8221;.</p>
<p>This article not only describes in details each steps on how to begin with developing iPhone application to manage AWS but also provides source code that you easily download from <a href="http://code.google.com/p/iphone-aws-manager/" target="_blank">Google Code Repository</a> and setup in-house.</p>
<p>In this blog entry I will walk you through steps on setting up this application on our popular <a href="http://blogs.sun.com/ec2/entry/amp_stack_ami_on_opensolaris1" target="_blank">OpenSolaris AMP Stack AMI</a>.</p>
<p>Following Steps are also valid for the setup of &#8220;iPhone AWS Manager&#8221; on local machine with OpenSolaris and AMP Stack.</p>
<p><strong>Lets begin with launching new OpenSolaris AMP Stack AMI Instance.</strong><br />
ec2-run-instances ami-c7cf28ae -k my-keypair</p>
<p><strong>Get the public DNS address of an Instance and login into with your keypair</strong><br />
ec2-describe-instances i-xxxxxxxx<br />
ssh -i &lt;path_to_your_keypair&gt; root@ec2-xx-xxx-xx-xxx.compute-1.amazonaws.com</p>
<p><strong>Install SVN Package from the Repository</strong><br />
pkg refresh<br />
pkg install SUNWsvn</p>
<p><strong>Checkout iPhone AWS Manager code form the Google Code Repository</strong><br />
cd /var/apache2/2.2/htdocs/</p>
<p>svn co http://iphone-aws-manager.googlecode.com/svn/trunk/ aws-iphone<br />
A    aws-iphone/amis.php<br />
A    aws-iphone/class.s3.php<br />
A    aws-iphone/reboot.php<br />
A    aws-iphone/deleteobj.php<br />
A    aws-iphone/contents.php<br />
A    aws-iphone/getbuckets.php<br />
A    aws-iphone/delete.php<br />
A    aws-iphone/create.php<br />
A    aws-iphone/run.php<br />
A    aws-iphone/index.php<br />
A    aws-iphone/about.php<br />
A    aws-iphone/size.php<br />
A    aws-iphone/class.ec2.php<br />
A    aws-iphone/lib<br />
A    aws-iphone/lib/iui<br />
A    aws-iphone/lib/iui/backButton.png<br />
A    aws-iphone/lib/iui/grayButton.png<br />
A    aws-iphone/lib/iui/loading.gif<br />
A    aws-iphone/lib/iui/pinstripes.png<br />
A    aws-iphone/lib/iui/toolbar.png<br />
A    aws-iphone/lib/iui/iuix.js<br />
A    aws-iphone/lib/iui/toolButton.png<br />
A    aws-iphone/lib/iui/whiteButton.png<br />
A    aws-iphone/lib/iui/iui.js<br />
A    aws-iphone/lib/iui/toggleOn.png<br />
A    aws-iphone/lib/iui/thumb.png<br />
A    aws-iphone/lib/iui/toggle.png<br />
A    aws-iphone/lib/iui/iuix.css<br />
A    aws-iphone/lib/iui/blueButton.png<br />
A    aws-iphone/lib/iui/cancel.png<br />
A    aws-iphone/lib/iui/selection.png<br />
A    aws-iphone/lib/iui/listArrow.png<br />
A    aws-iphone/lib/iui/listGroup.png<br />
A    aws-iphone/lib/iui/iui.css<br />
A    aws-iphone/lib/iui/listArrowSel.png<br />
A    aws-iphone/iPhone AWS Source Code.zip<br />
A    aws-iphone/instances.php<br />
A    aws-iphone/terminate.php<br />
Checked out revision 3.</p>
<p><strong>Set the Document Root in the httpd.conf file</strong><br />
vi /etc/apache2/2.2/httpd.conf</p>
<p>Set the DocumentRoot as given below<br />
DocumentRoot &#8220;/var/apache2/2.2/htdocs/aws-iphone&#8221;</p>
<p><strong>edit /etc/php/5.2/php.ini and set following variables to On</strong><br />
register_globals = On<br />
register_long_arrays = On</p>
<p><strong>Create &#8220;key.php&#8221; file at &#8220;/var/apache2/2.2/htdocs/aws-iphone/keys.php&#8221; with following code</strong></p>
<pre name='code' class='php'>&lt;?php
define('my_access_key','XXXXXXXXXXXXXXXXXXXX');
define('my_secret_key','XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
?&gt;</pre>
<p><strong>Edit &#8220;/var/apache2/2.2/htdocs/aws-iphone/index.php&#8221; file and replace php code block at the top of the page with following code.</strong></p>
<pre name='code' class='php'>&lt;?php
// start the session
session_start();
// include the EC2 and S3 libraries
require_once("class.ec2.php");
require_once("class.s3.php");
include_once("keys.php");
// create session variables for AWS keys
session_register("AMAZON_KEY");
session_register("AMAZON_PRIVATE_KEY");
$HTTP_SESSION_VARS["AMAZON_KEY"]=my_access_key;
$HTTP_SESSION_VARS["AMAZON_PRIVATE_KEY"]=my_secret_key;
?&gt;</pre>
<p><strong>change your keypair in &#8220;/var/apache2/2.2/htdocs/aws-iphone/class.ec2.php&#8221; file</strong><br />
look for the function definition and replace your keyName</p>
<pre name='code' class='php'>
function runInstances($imageId, $min = 1, $max = 1, $keyName = "divyen-personal-aws-key")</pre>
<p><strong>Restart the Apache Server</strong><br />
svcadm disable svc:/network/http:apache22<br />
svcadm enable svc:/network/http:apache22</p>
<h3>Open Safari Browser in your iPhone and type in EC2 Instance DNS Address</h3>
<p><img src="http://www.recyclecode.com/wp-content/uploads/2010/03/aws_iphone_snap_01.png" alt="" width="230" height="346" /></p>
<h3>Create a Shortcut icon so that you don&#8217;t need to type in URL every time</h3>
<p><img src="http://www.recyclecode.com/wp-content/uploads/2010/03/aws_iphone_snap_02.png" alt="" width="230" height="346" /><br />
<img src="http://www.recyclecode.com/wp-content/uploads/2010/03/aws_iphone_snap_03.png" alt="" width="230" height="346" /></p>
<p><strong>Snapshots of the basic operations supported on this application are described as given below</strong></p>
<h3>Describe AMIs &#8211; Both Public and Private</h3>
<p><img src="http://www.recyclecode.com/wp-content/uploads/2010/03/aws_iphone_snap_04.png" alt="" width="230" height="346" /></p>
<h3>Create Instance, Reboot Instance, Terminate Instance</h3>
<p><img style="border: 1px solid black;" src="http://www.recyclecode.com/wp-content/uploads/2010/03/aws_iphone_snap_05.png" alt="" width="230" height="346" /> <img style="border: 1px solid black;" src="http://www.recyclecode.com/wp-content/uploads/2010/03/aws_iphone_snap_06.png" alt="" width="230" height="346" /></p>
<p><img style="border: 1px solid black;" src="http://www.recyclecode.com/wp-content/uploads/2010/03/aws_iphone_snap_07.png" alt="" width="230" height="346" /> <img style="border: 1px solid black;" src="http://www.recyclecode.com/wp-content/uploads/2010/03/aws_iphone_snap_09.png" alt="" width="230" height="346" /></p>
<p><img style="border: 1px solid black;" src="http://www.recyclecode.com/wp-content/uploads/2010/03/aws_iphone_snap_08.png" alt="" width="230" height="346" /></p>
<h3>Create Bucket, Delete Bucket</h3>
<p><img style="border: 1px solid black;" src="http://www.recyclecode.com/wp-content/uploads/2010/03/aws_iphone_snap_10.png" alt="" width="226" height="338" /></p>
<p><img style="border: 1px solid black;" src="http://www.recyclecode.com/wp-content/uploads/2010/03/aws_iphone_snap_11.png" alt="" width="221" height="332" /></p>
<p><img style="border: 1px solid black;" src="http://www.recyclecode.com/wp-content/uploads/2010/03/aws_iphone_snap_12.png" alt="" width="346" height="230" /></p>
<p><img style="border: 1px solid black;" src="http://www.recyclecode.com/wp-content/uploads/2010/03/aws_iphone_snap_13.png" alt="" width="346" height="230" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.recyclecode.com/2009/06/how-to-setup-iphone-aws-manager-on-opensolaris-ec2-instance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to start VNC session on OpenSolaris 2009.06 EC2 AMI</title>
		<link>http://www.recyclecode.com/2009/06/how-to-start-vnc-session-on-opensolaris-200906-ec2-ami/</link>
		<comments>http://www.recyclecode.com/2009/06/how-to-start-vnc-session-on-opensolaris-200906-ec2-ami/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 22:03:25 +0000</pubDate>
		<dc:creator>Divyen Patel</dc:creator>
				<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[OpenSolaris]]></category>

		<guid isPermaLink="false">http://recyclecode.com/?p=263</guid>
		<description><![CDATA[Following instructions describes steps to access GUI on OpenSolaris 2009.06 EC2 AMI Instance using VNC Viewer. Enable following desktop related services svcadm enable svc:/application/graphical-login/gdm:default svcadm enable svc:/application/desktop-cache/icon-cache:default svcadm enable svc:/application/desktop-cache/desktop-mime-cache:default svcadm enable svc:/application/desktop-cache/mime-types-cache:default svcadm enable svc:/application/desktop-cache/input-method-cache:default svcadm enable svc:/application/desktop-cache/gconf-cache:default svcadm enable svc:/application/desktop-cache/pixbuf-loaders-installer:default Set xvm_vnc property to true for x11-server SMF service. svccfg -s x11-server setprop [...]]]></description>
			<content:encoded><![CDATA[<p>Following instructions describes steps to access GUI on <a href="http://blogs.sun.com/ec2/entry/opensolaris_2009_06_on_amazon" target="_blank">OpenSolaris 2009.06 EC2 AMI</a> Instance using VNC Viewer.</p>
<p><strong> Enable following desktop related services</strong></p>
<div class="box">svcadm enable svc:/application/graphical-login/gdm:default<br />
svcadm enable svc:/application/desktop-cache/icon-cache:default<br />
svcadm enable svc:/application/desktop-cache/desktop-mime-cache:default<br />
svcadm enable svc:/application/desktop-cache/mime-types-cache:default<br />
svcadm enable svc:/application/desktop-cache/input-method-cache:default<br />
svcadm enable svc:/application/desktop-cache/gconf-cache:default<br />
svcadm enable svc:/application/desktop-cache/pixbuf-loaders-installer:default</div>
<p><strong>Set xvm_vnc property to true for x11-server SMF service.</strong></p>
<div class="box">svccfg -s x11-server setprop options/xvm_vnc = boolean: true</div>
<p><strong>Set the root password, you may need it to get back to your session in case if screen saver starts.</strong></p>
<div class="box">root@domU-12-31-39-02-5C-D1:~# passwd<br />
passwd: Changing password for root<br />
New Password:<br />
Re-enter new Password:<br />
passwd: password successfully changed for root<br />
root@domU-12-31-39-02-5C-D1:~#</div>
<p><strong>Setup VNC server</strong></p>
<p>Create .vnc directory under /root if it does not exist</p>
<div class="box">mkdir /root/.vnc/</div>
<p>Create <strong>/root/.vnc/xstartup</strong> file with following lines.</p>
<div class="box">#!/bin/sh<br />
[ -r $HOME/.Xresources ] &amp;&amp; xrdb $HOME/.Xresources<br />
xsetroot -solid grey<br />
vncconfig -iconic &amp;<br />
gnome-terminal -geometry 100&#215;60 -title &#8220;$VNCDESKTOP Desktop&#8221; &amp;<br />
/usr/bin/gnome-session</div>
<p>Note: if xstartup file is already exist, replace it with above lines to start gnome terminal session for VNC.</p>
<p>Provide execute permission on xtartup file.</p>
<div class="box">chmod +x /root/.vnc/xstartup</div>
<p><strong>Start the vncserver and set the password.</strong></p>
<div class="box">root@domU-12-31-39-02-5C-D1:~# vncserver</p>
<p>You will require a password to access your desktops.</p>
<p>Password:<br />
Verify:<br />
xauth: creating new authority file /root/.Xauthority</p>
<p>New &#8216;domU-12-31-39-02-5C-D1:1 (root)&#8217; desktop is domU-12-31-39-02-5C-D1:1</p>
<p>Starting applications specified in /root/.vnc/xstartup<br />
Log file is /root/.vnc/domU-12-31-39-02-5C-D1:1.log</p>
<p>root@domU-12-31-39-02-5C-D1:~#</p>
</div>
<p><strong>Authorize VNC Port</strong><br />
Here we are done with configuring EC2 instance for GUI Remote Access.<br />
Finally we need to authorize the corresponding VNC port on users machine where VNC client is installed.</p>
<div class="box">divyen-patels-macbook:~ divyen$ ec2-authorize default -p 5801<br />
GROUP default<br />
PERMISSION default ALLOWS tcp 5801 5801 FROM CIDR 0.0.0.0/0<br />
divyen-patels-macbook:~ divyen$</div>
<p><strong>Screen Shots</strong><br />
VNC client connection configuration<br />
<img src="http://www.recyclecode.com/wp-content/uploads/2010/03/snap_1_ec2_opensolaris_2009_06_vnc.jpg" alt="Snapshot1:http://blogs.sun.com/divyen/resource/snap_1_ec2_opensolaris_2009_06_vnc.jpg" width="458" height="318" /><br />
Use public DNS address associated with EC2 instance as the host name.</p>
<p>VNC client connected to OpenSolaris 2009.06 EC2 Instance.<br />
<img src="http://www.recyclecode.com/wp-content/uploads/2010/03/snap_2_ec2_opensolaris_2009_06_vnc.jpg" alt="Snapshot2:http://blogs.sun.com/divyen/resource/snap_2_ec2_opensolaris_2009_06_vnc.jpg" width="819" height="569" /></p>
<p>For more details on OpenSolaris AMIs visit <a href="http://blogs.sun.com/ec2/">http://blogs.sun.com/ec2/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.recyclecode.com/2009/06/how-to-start-vnc-session-on-opensolaris-200906-ec2-ami/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing OpenSolaris EC2 Image on Local Xen Environment</title>
		<link>http://www.recyclecode.com/2009/05/importing-opensolaris-ec2-image-on-local-xen-environment/</link>
		<comments>http://www.recyclecode.com/2009/05/importing-opensolaris-ec2-image-on-local-xen-environment/#comments</comments>
		<pubDate>Thu, 07 May 2009 06:22:18 +0000</pubDate>
		<dc:creator>Divyen Patel</dc:creator>
				<category><![CDATA[Amazon EC2]]></category>

		<guid isPermaLink="false">http://recyclecode.com/?p=264</guid>
		<description><![CDATA[In this blog entry, I am going to walk you through the steps for importing OpenSolaris Amazon EC2 AMI on local Xen environment running on OpenSolaris 2008.11. I assume - you are running OpenSolaris 2008.11 build rc2 dom0. - ec2 ami/api tools installed at /opt/ec2 - your ec2 certificate and private key files available at [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://blogs.sun.com/ec2' target='_blank'><img src='http://blogs.sun.com/divyen/resource/OpenSolaris_On_Amazon_EC2.jpg' /></a><br />
In this blog entry, I am going to walk you through the steps for importing <a href='http://developer.amazonwebservices.com/connect/entry.jspa?externalID=2105' target='_blank'>OpenSolaris Amazon EC2 AMI</a> on local <a href='http://opensolaris.org/os/community/xen/docs/2008_11_dom0/' target='_blank'>Xen environment running on OpenSolaris 2008.11</a>. </p>
<p>I assume <br />
- you are running OpenSolaris 2008.11 build rc2 dom0.<br />
- ec2 ami/api tools installed at /opt/ec2<br />
- your ec2 certificate and private key files available at /opt/ec2/keys<br />
- your ec2 keypair file located at /opt/ec2</p>
<hr />
<b>[ Step-1 ]</b><br />
Launch fresh OpenSolaris 2008.11 AMI Instance <br />
<img src='http://blogs.sun.com/divyen/resource/Terminal-icon.jpg' /><br />
ec2-run-instances ami-7db75014 -k your-keypair </p>
<p>Login in with your keypair file<br />
<img src='http://blogs.sun.com/divyen/resource/Terminal-icon.jpg' /><br />
ssh -i /opt/ec2/your-keypair root@ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com</p>
<p><b>[ Step-2 ]</b><br />
Remove EC2 specific stuff from the instance. </p>
<p>Open “/etc/ssh/sshd_config” and replace &#8220;PermitRootLogin without-password&#8221; with &#8220;PermitRootLogin yes&#8221; and save the file.</p>
<p>Set the root password <br />
<img src='http://blogs.sun.com/divyen/resource/Terminal-icon.jpg' /><br />
passwd <br />
passwd: Changing password for root <br />
New Password: <br />
Re-enter new Password:<br />
passwd: password successfully changed for root </p>
<p>Disable and remove ec2 specific services <br />
<img src='http://blogs.sun.com/divyen/resource/Terminal-icon.jpg' /> <br />
svcadm disable svc:/ec2/sshkey:default<br />
svcadm disable svc:/ec2/fixes:default<br />
svcadm disable svc:/ec2/mount:default</p>
<p>svccfg delete svc:/ec2/sshkey:default<br />
svccfg delete svc:/ec2/fixes:default<br />
svccfg delete svc:/ec2/mount:default</p>
<p><b>[ Step-3 ]</b><br />
Log out of the ec2 instance and transfer your keys at /mnt/keys to begin re-bundling image. <br />
<img src='http://blogs.sun.com/divyen/resource/Terminal-icon.jpg' /><br />
scp -i /opt/ec2/id-your-keypair -r /opt/ec2/keys/ root@ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com:/mnt </p>
<p><b>[ Step-4 ]</b><br />
Login back to ec2 instance. <br />
<img src='http://blogs.sun.com/divyen/resource/Terminal-icon.jpg' /><br />
ssh -i /opt/ec2/your-keypair root@ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com</p>
<p><b>[ Step-5 ]</b><br />
Start bundling the image.<br />
<img src='http://blogs.sun.com/divyen/resource/Terminal-icon.jpg' /><br />
# cd /mnt<br />
# /opt/ec2/sbin/rebundle.sh -v opensolaris_2008_11_ami.img<br />
Creating image file /mnt/opensolaris_2008_11_ami.img<br />
Preparing clone pool on /dev/lofi/1<br />
Cloning<br />
# </p>
<p>rebundle.sh will take about 10-15 minutes to create raw opensolaris image. </p>
<p><b>[ Step-6 ]</b><br />
Bundle image and create parts.<br />
<img src='http://blogs.sun.com/divyen/resource/Terminal-icon.jpg' /><br />
export BUCKET=my-bucket<br />
export JAVA_HOME=/usr/jdk/latest<br />
export EC2_HOME=/opt/ec2<br />
export PATH=$PATH:$EC2_HOME/bin<br />
export RUBYLIB=$EC2_HOME/lib<br />
export EC2_URL=https://ec2.amazonaws.com</p>
<p>export EC2_PRIVATE_KEY=/mnt/keys/pk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pem<br />
export EC2_CERT=/mnt/keys/cert-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pem</p>
<p>export EC2_KEYID=xxxxxxxxxxxxxxxxxxxxxxx<br />
export EC2_KEY=&#8221;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&#8221;</p>
<p>export DIRECTORY=/mnt<br />
export IMAGE=opensolaris_2008_11_ami.img</p>
<p># ec2-bundle-image -c $EC2_CERT -k $EC2_PRIVATE_KEY   \<br />
&#8211;kernel aki-6552b60c &#8211;ramdisk ari-6452b60d \<br />
&#8211;block-device-mapping &#8220;root=rpool/52@0,ami=0,ephemeral0=1&#8243; \<br />
&#8211;user &lt;user-id&gt; &#8211;arch i386 \<br />
-i $DIRECTORY/$IMAGE -d $DIRECTORY/parts</p>
<p><b>[ Step-7 ]</b><br />
Upload image parts on s3<br />
<img src='http://blogs.sun.com/divyen/resource/Terminal-icon.jpg' /><br />
# cd $DIRECTORY/parts </p>
<p># ec2-upload-bundle -b $BUCKET  -m opensolaris_2008_11_ami.img.manifest.xml \ <br />
&#8211;url http://s3.amazonaws.com \<br />
&#8211;retry -a $EC2_KEYID -s $EC2_KEY</p>
<p><b>[ Step-8 ]</b><br />
Log out of the instance.<br />
Download image parts and unbundle it to re-create the raw image locally.<br />
<img src='http://blogs.sun.com/divyen/resource/Terminal-icon.jpg' /><br />
# mkdir /osol-ec2-image<br />
# mkdir /osol-ec2-image/parts<br />
# cd /osol-ec2-image/parts</p>
<p># ec2-download-bundle -b my-bucket -m opensolaris_2008_11_ami.img.manifest.xml  \<br />
-a &lt;your-access-key-id&gt; -s &lt;your-secret-key-id&gt; \<br />
&#8211;privatekey /opt/ec2/keys/pk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx .pem</p>
<p># ec2-unbundle -m opensolaris_2008_11_ami.img.manifest.xml \<br />
-k /opt/ec2/keys/pk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx .pem</p>
<p># mv  opensolaris_2008_11_ami.img<br />
# cd /osol-ec2-image/<br />
<b>[ Step-9 ]</b><br />
Create “domu.py” at /osol-ec2-image with following lines </p>
<div class='box'>
name = &#8220;opensolaris-ec2-image&#8221;<br />
vcpus = 1<br />
memory = &#8220;1024&#8243;</p>
<p>disk = ['file://osol-ec2-image/opensolaris_2008_11_ami.img,0,w']</p>
<p>vif = ['']</p>
<p>on_shutdown = &#8220;destroy&#8221;<br />
on_reboot = &#8220;restart&#8221;<br />
on_crash = &#8220;destroy&#8221;
</div>
<p><b>[ Step-10 ]</b><br />
Launch domu image and login with root user and the password you set during <b>step-2</b></p>
<p><img src='http://blogs.sun.com/divyen/resource/Terminal-icon.jpg' /><br />
xm create domu.py</p>
<p>Using config file &#8220;./domu.py&#8221;.<br />
Started domain  opensolaris-ec2-image</p>
<p><img src='http://blogs.sun.com/divyen/resource/Terminal-icon.jpg' /><br />
xm console opensolaris-ec2-image <br />
v3.1.4-xvm chgset &#8216;Mon Oct 13 22:14:51 2008 -0700 15904:94bd0a643efe&#8217;</p>
<p>SunOS Release 5.11 Version snv_101b 32-bit</p>
<p>Copyright 1983-2008 Sun Microsystems, Inc.  All rights reserved.</p>
<p>Use is subject to license terms.<br />
Hostname: dhcp-umpk16-85-23<br />
Reading ZFS config: done.<br />
Mounting ZFS filesystems: (5/5)</p>
<p>dhcp-umpk16-85-23 console login:</p>
]]></content:encoded>
			<wfw:commentRss>http://www.recyclecode.com/2009/05/importing-opensolaris-ec2-image-on-local-xen-environment/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Connecting Cisco VPN using vpnc on latest ubuntu 9.04</title>
		<link>http://www.recyclecode.com/2009/05/connecting-cisco-vpn-using-vpnc-on-latest-ubuntu-904/</link>
		<comments>http://www.recyclecode.com/2009/05/connecting-cisco-vpn-using-vpnc-on-latest-ubuntu-904/#comments</comments>
		<pubDate>Sun, 03 May 2009 19:04:39 +0000</pubDate>
		<dc:creator>Divyen Patel</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://recyclecode.com/?p=265</guid>
		<description><![CDATA[Install vpnc package with following command. divyen@divyen-laptop:~$ sudo apt-get install vpnc Create a file default.conf at /etc/vpnc/ with following lines and fill in the required parameters replacing strings enclosed within “&#8221; without keeping &#8220;”. divyen@divyen-laptop:~$ sudo vi /etc/vpnc/default.conf IPSec gateway &#60;gateway&#62; IPSec ID &#60;group-id&#62; IPSec secret &#60;group-pass-key&#62; Xauth username &#60;user-name&#62; NAT Traversal Mode cisco-udp Note: [...]]]></description>
			<content:encoded><![CDATA[<p>Install vpnc package with following command. </p>
<div class='box'>
divyen@divyen-laptop:~$ sudo apt-get install vpnc
</div>
<p>
Create a file <b>default.conf</b> at <b>/etc/vpnc/</b> with following lines and <br />fill in the required parameters replacing strings enclosed within “<” and “>&#8221; without keeping &#8220;<" and ">”. </p>
<div class='box'>
divyen@divyen-laptop:~$ sudo vi /etc/vpnc/default.conf
</div>
<p></p>
<div class='box'>
IPSec gateway &lt;gateway&gt;<br />
IPSec ID &lt;group-id&gt;<br />
IPSec secret &lt;group-pass-key&gt;<br />
Xauth username &lt;user-name&gt;<br />
NAT Traversal Mode cisco-udp
</div>
<p>
<b>Note: Make sure you don&#8217;t append extra space at the end of parameter value.</b> </p>
<p>Connect using &#8220;vpnc-connect&#8221; command.</p>
<div class='box'>
divyen@divyen-laptop:~$ sudo vpnc-connect <br />
[sudo] password for divyen:<br />
Enter password for user-name@company-vpn-gateway:</br />
</div>
<p>To disconnect type in following command.</p>
<div class='box'>
divyen@divyen-laptop:~$ sudo vpnc-disconnect </br><br />
Terminating vpnc daemon (pid: 7894)</br>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.recyclecode.com/2009/05/connecting-cisco-vpn-using-vpnc-on-latest-ubuntu-904/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Create a fully virtualized ubuntu-9.04 DomU on Sun xVM Hypervisor</title>
		<link>http://www.recyclecode.com/2009/04/create-a-fully-virtualized-ubuntu-904-domu-on-sun-xvm-hypervisor/</link>
		<comments>http://www.recyclecode.com/2009/04/create-a-fully-virtualized-ubuntu-904-domu-on-sun-xvm-hypervisor/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 17:56:07 +0000</pubDate>
		<dc:creator>Divyen Patel</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[xVM]]></category>

		<guid isPermaLink="false">http://recyclecode.com/?p=266</guid>
		<description><![CDATA[a2a_linkname="Create a fully virtualized ubuntu-9.04 DomU on Sun xVM Hypervisor";a2a_linkurl="http://blogs.sun.com/divyen/entry/create_a_fully_virtualized_ubuntu"; Lets begin with the installation of xVM Hypervisor on OpenSolaris 2008.11. You can follow exact steps mentioned on Dileep Kumar&#8217;s blog &#8211; &#8220;How to create domU in OpenSolaris 2008.05&#8220;. These steps are also valid for OpenSolaris 2008.11. Once dom0 is up and running, walk through [...]]]></description>
			<content:encoded><![CDATA[<p><a class="a2a_dd" href="http://www.addtoany.com/share_save?linkname=Create%20a%20fully%20virtualized%20ubuntu-9.04%20DomU%20on%20Sun%20xVM%20Hypervisor&amp;linkurl=http%3A%2F%2Fblogs.sun.com%2Fdivyen%2Fentry%2Fcreate_a_fully_virtualized_ubuntu"><img src="http://static.addtoany.com/buttons/share_save_171_16.png" width="171" height="16" border="0" alt="Share/Save/Bookmark" /></a><script type="text/javascript">a2a_linkname="Create a fully virtualized ubuntu-9.04 DomU on Sun xVM Hypervisor";a2a_linkurl="http://blogs.sun.com/divyen/entry/create_a_fully_virtualized_ubuntu";</script><script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script> </p>
<p>Lets begin with the installation of xVM Hypervisor on OpenSolaris 2008.11. </p>
<p>You can follow exact steps mentioned on Dileep Kumar&#8217;s blog &#8211; &#8220;<a href='http://blogs.sun.com/dkumar/entry/how_to_create_domu_in' target='_blank'>How to create domU in OpenSolaris 2008.05</a>&#8220;. These steps are also valid for OpenSolaris 2008.11. </p>
<p>Once <a href='http://wiki.xensource.com/xenwiki/Dom0' target='_blank'>dom0</a> is up and running, walk through the below given steps to create a fully virtualized ubuntu 9.04 <a href='http://wiki.xensource.com/xenwiki/DomU' target='_blank'>DomU</a>. Fully virtualized DomU is also known as HVM Domain (Hardware-assisted Virtual Machine Domain), with that you can run unmodified guest operating system without the knowledge of underlying hypervisor. </p>
<p><b>Step-1: Download and save ubuntu 9.04 ISO file at /ubuntu-hvm</b> </p>
<pre>
mkdir /ubuntu-hvm
cd /ubuntu-hvm
wget http://ftp.ucsb.edu/pub/mirrors/linux/ubuntu/jaunty/ubuntu-9.04-desktop-i386.iso
</pre>
<p><b>Step-2: Create a virtual Disk for the guest domain.</b> </p>
<pre>
dd if=/dev/zero of=/ubuntu-hvm/ubuntu-9.04-desktop-i386.img bs=1k seek=10000k count=1
</pre>
<p><b>Step-3: Create guest configuration file install.py with following script at /ubuntu-hvm</b></p>
<p>Detailed explanation on each lines used in the script is given <a href='http://opensolaris.org/os/community/xen/docs/HVMdomains.htm' target='_blank'>here</a>.</p>
<pre name='code' class='python'>
disk = ['file:/ubuntu-hvm/ubuntu-9.04-desktop-i386.img,hda,w','file:/ubuntu-hvm/ubuntu-9.04-desktop-i386.iso,hdc:cdrom,r']
memory = 1024
vcpus=1
name = "ubuntu-904-hvm-install"
kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
vif = [ '' ]
on_poweroff = 'destroy'
on_reboot   = 'destroy'
on_crash    = 'destroy'
boot='dc'
vnc=1
sdl=0
vncdisplay=5
import os, re
arch = os.uname()[4]
if re.search('64', arch):
arch_libdir = 'lib64'
else:
arch_libdir = 'lib'
device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'
</pre>
<p>Launch the guest domain to begin the installation. </p>
<pre>
cd /ubuntu-hvm/
xm create install.py
</pre>
<p>Bring up VNC Session to proceed with the installation. In the install.py script we specified to bind VNC on port 127.0.0.1:5 </p>
<pre>
vncviewer 127.0.0.1:5
</pre>
<p>If HVM guest is unsupported on your system, you may see following error message.<br />
Error: HVM guest support is unavailable: is VT/AMD-V supported by your CPU and enabled in your BIOS?</p>
<p><b>Step-4: Install guest domain.</b> </p>
<p>Snap-01<br />
<img src='http://www.recyclecode.com/wp-content/uploads/2010/03/ubuntu_hvm_snap_01.gif' alt='ubuntu_hvm_snap_01.gif' /></p>
<p>Snap-02<br />
<img src='http://www.recyclecode.com/wp-content/uploads/2010/03/ubuntu_hvm_snap_02.gif' alt='ubuntu_hvm_snap_02.gif' /></p>
<p>Snap-03<br />
<img src='http://www.recyclecode.com/wp-content/uploads/2010/03/ubuntu_hvm_snap_03.gif' alt='ubuntu_hvm_snap_03.gif' /></p>
<p>Snap-04<br />
<img src='http://www.recyclecode.com/wp-content/uploads/2010/03/ubuntu_hvm_snap_04.gif' alt='ubuntu_hvm_snap_04.gif' /></p>
<p>Snap-05<br />
<img src='http://www.recyclecode.com/wp-content/uploads/2010/03/ubuntu_hvm_snap_05.gif' alt='ubuntu_hvm_snap_05.gif' /><br />
Do not click on the restart. Follow step-5 instead.</p>
<p><b>Step-5: Destroy the guest domain and create new configuration file to boot the domU from the disk image.</b> </p>
<pre>
xm destroy ubuntu-904-hvm-install
cd /ubuntu-hvm/
</pre>
<p>Create new configuration file &#8220;domu.py&#8221; with following script at /ubuntu-hvm </br /></p>
<pre name='code' class='python'>
disk = ['file:/ubuntu-hvm/ubuntu-9.04-desktop-i386.img,hda,w']
memory = 1024
vcpus=1
name = "ubuntu-904-hvm-guest"
kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
vif = [ '' ]
on_poweroff = 'destroy'
on_reboot   = 'destroy'
on_crash    = 'destroy'
boot='c'
vnc=1
sdl=0
vncdisplay=5
import os, re
arch = os.uname()[4]
if re.search('64', arch):
arch_libdir = 'lib64'
else:
arch_libdir = 'lib'
device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'
</pre>
<p><b>Step-6: Finally launch the HVM guest domain</b> </p>
<pre>
cd /ubuntu-hvm/
xm create domu.py
</pre>
<p>Bring up VNC Session</p>
<pre>
vncviewer 127.0.0.1:5
</pre>
<p>Snap-05<br />
<img src='http://www.recyclecode.com/wp-content/uploads/2010/03/ubuntu_hvm_snap_06.gif' alt='ubuntu_hvm_snap_06.gif' /></p>
<p>Snap-06<br />
<img src='http://www.recyclecode.com/wp-content/uploads/2010/03/ubuntu_hvm_snap_07.gif' alt='ubuntu_hvm_snap_07.gif' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.recyclecode.com/2009/04/create-a-fully-virtualized-ubuntu-904-domu-on-sun-xvm-hypervisor/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Automated School Time-Table Generator</title>
		<link>http://www.recyclecode.com/2009/04/automated-school-time-table-generator/</link>
		<comments>http://www.recyclecode.com/2009/04/automated-school-time-table-generator/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 04:37:20 +0000</pubDate>
		<dc:creator>Divyen Patel</dc:creator>
				<category><![CDATA[Academic Projects]]></category>

		<guid isPermaLink="false">http://recyclecode.com/?p=153</guid>
		<description><![CDATA[Automated School Time Table Generator View more presentations from divyen. Automated Time Table Management System generates intelligent time table that manages faculty work loads on the basis of lecture requirements. System allows entering course details, years and semester details, visiting faculty preferences and subject load per week by respective faculties. Based on input data, engine [...]]]></description>
			<content:encoded><![CDATA[<div style="width:425px;text-align:left" id="__ss_1355161"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/divyen/automated-school-time-table-generator-1355161?type=presentation" title="Automated School Time Table Generator">Automated School Time Table Generator</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=tms-090427233324-phpapp02&#038;stripped_title=automated-school-time-table-generator-1355161" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=tms-090427233324-phpapp02&#038;stripped_title=automated-school-time-table-generator-1355161" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/divyen">divyen</a>.</div>
</div>
<p>Automated Time Table Management System generates intelligent time table that manages faculty work loads on the basis of lecture requirements.</p>
<p>System allows entering course details, years and semester details, visiting faculty preferences and subject load per week by respective faculties. Based on input data, engine generates time table with shared work load. System is customized to set working days and number of lectures per day.</p>
<p>Client part installed on each faculty desk gives reminder for the next lecture before customized period of time</p>
<p>Technologies:<br />
Visual Basic, SQL Server, Microsoft Transaction Server(MTS), Crystal Repot 8.5</p>
]]></content:encoded>
			<wfw:commentRss>http://www.recyclecode.com/2009/04/automated-school-time-table-generator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
