|
|
By Kiran Murari |
Article Rating: |
|
March 23, 2010 10:42 AM EDT |
Reads: |
8,675 |
Creating a new disk Image
This will be the main HDD in the virtual image, so make sure to give it as much space as youll need. Since were building a kvm image, we can use a qcow2 format for disk images. Qcow2 is an expandable image format, so itll only take as much storage space as its actually used within the image.
$ kvm-img create -f qcow2 image.img 5G
OS Installation
Download the iso file of the Linux distribution you want installed in the image.
$ wget http://releases.ubuntu.com/karmic/ubuntu-9.04-server-amd64.iso
And start the installation process:
$ sudo kvm -m 256 -cdrom ubuntu-9.04-server-amd64.iso -drive file=image.img,if=scsi,index=0 \
-boot d -net nic,vlan=0,model=e1000,macaddr= 00:16:3e:de:ad:01 -net tap -nographic -vnc :0
If your installation process requires more than 256MB of RAM change the -m option, and if you need more processors available, you can use the -c option.
The command above will boot a new KVM instance, with the disk image youve created as the primary HDD and the iso as the first bootable device. Also the -nographic option will not display any graphical output. You can connect to the instance through VNC (use display number :0 ) and finish the installation.
For Ex: vncviewer A.B.C.D :0, where A.B.C.D is the IP address of the CC.
After finishing the installation, relaunch the VM by executing the following command.
$ sudo kvm -m 256 -drive file=image.img,if=scsi,index=0,boot=on -boot c \
-net nic,vlan=0,model=e1000,macaddr=00:16:e3:de:ad:01 -net tap -nographic -vnc :0
At this point you can add all the packages you want to have installed, update the installation, add users and any settings that need to be present in your new UEC instances.
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install mediawiki
Integrating with UEC
The new image needs to know what IP it has when started in UEC and also, it needs to have the public key of the user allowed to do a passwordless access through SSH. The way its done in UEC is via a restful interface provided by the cloud. The interface is available under this URL: http://169.254.169.254/latest/meta-data.
First install curl on the VM.
$ sudo apt-get install curl
And add the following lines to /etc/rc.local of the image.
depmod -a
modprobe acpiphp
# simple attempt to get the user ssh key using the meta-data service
# assuming user is the username of an account that has been created
mkdir -p /home/user/.ssh
echo >> /home/user/.ssh/authorized_keys
curl -m 10 -s http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key | grep 'ssh-rsa' >> /home/user/.ssh/authorized_keys
echo "AUTHORIZED_KEYS:"
echo "************************"
cat /home/user/.ssh/authorized_keys
echo "************************"
Add the above lines before the exit 0 in /etc/rc.local.
Also remove persistent udev rules from /etc/udev/rules.d. This is needed because the interface name will change whenever the instance reboots and Eucalyptus expects the interface to be as eth0.
$ sudo rm -rf /etc/udev/rules.d/70-persistent-*
Registering with UEC
The last step would be to upload the images to UEC. The files that need to be uploaded are:
- vmlinuz-2.6.28-11-server
- initrd.img-2.6.28-11-server
- image.img
Copy the kernel and the initrd image from the VM image to some place outside. They will be used later for creating and uploading a complete virtual image to UEC.
$ scp /boot/initrd.img-2.6.28-11-server [email protected]:
$ scp /boot/vmlinuz-2.6.28-11-server [email protected]:
Before starting the upload process shut down the VM.
Registering kernel image
Execute the following commands to bundle and register the kernel image (vmlinuz-2.6.28-11-server)
$ euca-bundle-image -i vmlinuz-2.6.28-11-server --kernel true
$ euca-upload-bundle -b mybucket -m /tmp/vmlinuz-2.6.28-11-server.manifest.xml
$ euca-register mybucket/vmlinuz-2.6.28-11-server.manifest.xml
Save the output produced by the last command above (eki-XXXXXXXX), which will be needed while registering the disk image.
Registering ramdisk image
Execute the following commands to bundle and register the ramdisk image (initrd.img-2.6.28-11-server)
$ euca-bundle-image -i initrd.img-2.6.28-11-server
$ euca-upload-bundle -b mybucket -m /tmp/initrd.img-2.6.28-11-server.manifest.xml
$ euca-register mybucket/initrd.img-2.6.28-11-server.manifest.xml
Save the output produced by the last command above (eri-XXXXXXXX), which will be needed while registering the disk image.
Registering disk image
Execute the following commands to bundle and register the ramdisk image (image.img)
$ euca-bundle-image -i image.img --kernel eki-XXXXXXXX --ramdisk eri-XXXXXXXX
$ euca-upload-bundle -b mybucket -m /tmp/image.img.manifest.xml
$ euca-register mybucket/image.img.manifest.xml
Replace eki-XXXXXXXX and eri-XXXXXXXX with the exact values as noted down earlier.
Image Listing
The new images that have been uploaded can be seen by using euca-describe-images command.
$ euca-describe-images
IMAGE emi-70B70EC0 mybucket/image.img.manifest.xml admin available public x86_64 machine
IMAGE eri-A2BE13EC mybucket/initrd.img-2.6.28-11-server.manifest.xml admin available public x86_64 ramdisk
IMAGE eki-685F1306 mybucket/vmlinuz-2.6.28-11-server.manifest.xml adminavailable public x86_64 kernel
Running instance of custom image
To launch a new instance of the custom image, execute euca-run-instances command.
$ euca-run-instances emi-70B70EC0 -k mykey -t c1.xlarge
Filed under: Cloud Computing, euca-bundle-images, Eucalyptus, Eucalyptus Bundling, UEC
Read the original blog entry...
Kiran Murari works at CSS Corp. Earlier, he was into the domain of Embedded Networking and has worked on developing software for ARM and MIPS based routers, porting Linux kernel and Linux applications to various hardware platforms like Intel IXP4xx, Xscale and OMAP3. As a part of developing software for routers, he was involved in developing the firewall and IDS/IPS modules. His current interests include Virtualization, Cloud Computing and Embedded devices.
@ThingsExpo Stories By Liz McMillan  SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications. Oct. 10, 2017 01:00 AM EDT Reads: 1,041 | By Elizabeth White  Most technology leaders, contemporary and from the hardware era, are reshaping their businesses to do software. They hope to capture value from emerging technologies such as IoT, SDN, and AI. Ultimately, irrespective of the vertical, it is about deriving value from independent software applications participating in an ecosystem as one comprehensive solution. In his session at @ThingsExpo, Kausik Sridhar, founder and CTO of Pulzze Systems, will discuss how given the magnitude of today's applicati... Oct. 10, 2017 12:45 AM EDT Reads: 1,105 | By Pat Romanski  SYS-CON Events announced today that Daiya Industry will exhibit at the Japanese Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Ruby Development Inc. builds new services in short period of time and provides a continuous support of those services based on Ruby on Rails. For more information, please visit https://github.com/RubyDevInc. Oct. 10, 2017 12:00 AM EDT Reads: 1,081 | By Elizabeth White  Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ... Oct. 10, 2017 12:00 AM EDT Reads: 1,164 | By Liz McMillan  SYS-CON Events announced today that Japan External Trade Organization & Six Prefectures of Japan have been named “Pavilion Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Meet the leading Japanese cloud computing companies from six prefectures of Japan. The Japan External Trade Organization (JETRO) is a non-profit organization that provides business support services to foreign companies... Oct. 9, 2017 11:00 PM EDT Reads: 1,482 | By Liz McMillan  In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, will lead you through the exciting evolution of the cloud. He'll look at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering ... Oct. 9, 2017 10:00 PM EDT Reads: 1,167 | By Elizabeth White  In a recent survey, Sumo Logic surveyed 1,500 customers who employ cloud services such as Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP). According to the survey, a quarter of the respondents have already deployed Docker containers and nearly as many (23 percent) are employing the AWS Lambda serverless computing framework.
It’s clear: serverless is here to stay. The adoption does come with some needed changes, within both application development and operations. Tha... Oct. 9, 2017 07:15 PM EDT Reads: 432 | By Elizabeth White  Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities – ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.
As a result, many firms employ new business models that place enormous impor... Oct. 9, 2017 05:15 PM EDT Reads: 999 | By Elizabeth White  High-velocity engineering teams are applying not only continuous delivery processes, but also lessons in experimentation from established leaders like Amazon, Netflix, and Facebook. These companies have made experimentation a foundation for their release processes, allowing them to try out major feature releases and redesigns within smaller groups before making them broadly available.
In his session at 21st Cloud Expo, Brian Lucas, Senior Staff Engineer at Optimizely, will discuss how by using... Oct. 9, 2017 02:45 PM EDT Reads: 1,084 | By Liz McMillan  Join IBM November 1 at 21st Cloud Expo at the Santa Clara Convention Center in Santa Clara, CA, and learn how IBM Watson can bring cognitive services and AI to intelligent, unmanned systems.
Cognitive analysis impacts today’s systems with unparalleled ability that were previously available only to manned, back-end operations. Thanks to cloud processing, IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Imagine a robot vacuum that becomes your personal assistant th... Oct. 9, 2017 01:00 PM EDT Reads: 2,022 | By Elizabeth White  Digital innovation is the next big wave of business transformation based on digital technologies of which IoT and Big Data are key components, For example:
Business boundary innovation is a challenge to excavate third-party business value using IoT and BigData, like Nest
Business structure innovation may propose re-building business structure from scratch, as Uber does in the taxicab industry
The social model innovation is also a big challenge to the new social architecture with the design fr... Oct. 9, 2017 03:00 AM EDT Reads: 5,175 | By Elizabeth White  IoT is at the core or many Digital Transformation initiatives with the goal of re-inventing a company's business model. We all agree that collecting relevant IoT data will result in massive amounts of data needing to be stored. However, with the rapid development of IoT devices and ongoing business model transformation, we are not able to predict the volume and growth of IoT data. And with the lack of IoT history, traditional methods of IT and infrastructure planning based on the past do not app... Oct. 8, 2017 01:00 AM EDT Reads: 3,806 | By Elizabeth White  SYS-CON Events announced today that SIGMA Corporation will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
uLaser flow inspection device from the Japanese top share to Global Standard! Then, make the best use of data to flip to next page. For more information, visit http://www.sigma-k.co.jp/en/. Oct. 6, 2017 03:45 PM EDT Reads: 1,841 | By Pat Romanski  SYS-CON Events announced today that NetApp has been named “Bronze Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
NetApp is the data authority for hybrid cloud. NetApp provides a full range of hybrid cloud data services that simplify management of applications and data across cloud and on-premises environments to accelerate digital transformation. Together with their partners, NetApp em... Oct. 6, 2017 01:30 PM EDT Reads: 1,789 | By Pat Romanski  SYS-CON Events announced today that Taica will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
ANSeeN are the measurement electronics maker for X-ray and Gamma-ray and Neutron measurement equipment such as spectrometers, pulse shape analyzer, and CdTe-FPD. For more information, visit http://anseen.com/. Oct. 6, 2017 01:00 PM EDT Reads: 1,366 | By Elizabeth White  SYS-CON Events announced today that Taica will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
TAZMO technology and development capabilities in the semiconductor and LCD-related manufacturing fields are among the best worldwide. For more information, visit https://www.tazmo.co.jp/en/. Oct. 6, 2017 10:00 AM EDT Reads: 1,360 | By Pat Romanski  SYS-CON Events announced today that B2Cloud will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
B2Cloud specializes in IoT devices for preventive and predictive maintenance in any kind of equipment retrieving data like Energy consumption, working time, temperature, humidity, pressure, etc. Oct. 5, 2017 02:15 PM EDT Reads: 1,748 | By Elizabeth White  SYS-CON Events announced today that Yuasa System will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Yuasa System is introducing a multi-purpose endurance testing system for flexible displays, OLED devices, flexible substrates, flat cables, and films in smartphones, wearables, automobiles, and healthcare. Oct. 5, 2017 02:00 PM EDT Reads: 1,401 | By Pat Romanski  SYS-CON Events announced today that Taica will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Taica manufacturers Alpha-GEL brand silicone components and materials, which maintain outstanding performance over a wide temperature range -40C to +200C. For more information, visit http://www.taica.co.jp/english/. Oct. 5, 2017 01:00 PM EDT Reads: 1,459 | By Elizabeth White  What is the best strategy for selecting the right offshore company for your business?
In his session at 21st Cloud Expo, Alan Winters, U.S. Head of Business Development at MobiDev, will discuss the things to look for - positive and negative - in evaluating your options. He will also discuss how to maximize productivity with your offshore developers.
Before you start your search, clearly understand your business needs and how that impacts software choices. Oct. 1, 2017 02:00 PM EDT Reads: 1,239 |
|
|
|
|
|
|