Skip to content
GigaSpaces Logo GigaSpaces Logo
  • Products
    • InsightEdge Portfolio
      • Smart Cache
      • Smart ODS
      • Smart Augmented Transactions
    • GigaSpaces Cloud
  • Roles
    • Architects
    • CXOs
    • Product Teams
  • Solutions
    • Industry Solutions
      • Financial Services
      • Insurance
      • Retail and eCommerce
      • Telecommunications
      • Transportations
    • Technical Solutions
      • Operational BI
      • Mainframe & AS/400 Modernization
      • In Memory Data Grid
      • Transactional and Analytical Processing (HTAP)
      • Hybrid Cloud Data Fabric
      • Multi-Tiered Storage
      • Kubernetes Deployment
      • Streaming Analytics for Stateful Apps
  • Customers
  • Company
    • About GigaSpaces
    • Customers
    • Partners
    • Support & Services
      • University
      • Services
      • Support
    • News
    • Contact Us
    • Careers
  • Resources
    • Webinars
    • Blog
    • Demos
    • Solution Briefs & Whitepapers
    • Case Studies
    • Benchmarks
    • ROI Calculators
    • Analyst Reports
    • eBooks
    • Technical Documentation
  • Contact Us
  • Try Free

Building your own IaaS Part 3 – XenServer CentOS Machine Image

Subscribe to our blog!

Subscribe for Updates
Close
Back

Building your own IaaS Part 3 – XenServer CentOS Machine Image

itaf October 5, 2010
4 minutes read

This blog post is part 3 of the “Buiding your own IaaS” series. Part 1 discussed different virtual machine hosting models, and focused on a service which provides physical machines preinstalled with virtualization software. Part 2 introduced an auxiliary machine running a DHCP server and a web proxy for the virtual machines. In this blog post we will actually start a new VM and install CentOS on it.

Step 1 – Start a new machine and install CentOS

Open XenCenter and click the “New VM” button.
Follow the XenCenter and centos installation steps in the slideshow below:

Step 2 – Setup web proxy settings for yum

Login as root to the new machine and update the yum installation proxy settings.

nano /etc/yum.conf

(scroll down to the end of the file and enter your squid’s ip address as proxy)

proxy=http://10.24.82.197:3128

Use yum to install standard centos software components

Step 3 – Install Sun JDK

Get a download link of the latest Sun JDK RPM, or one of the previous Sun JDK versions. Download and install the RPM file:
wget (paste your link here)
mv *-rpm.bin jdk.bin
chmod +x jdk.bin
./jdk.bin
java -version

Step 4 – Install XenServer tools

Right click the virtual machine in XenCenter and choose “Install XenServerTools”. This tool installs an agent on the virtual machine monitoring (among other things) it’s IP Address, essentially exposing the machine’s IP Address tthrough the XenServer API.
Right click Context Menu of a virtual machine
Use the following set of commands to mount and install the xenserver tools on the virtual machine
wget (paste your link here) cd /mnt
mkdir xs-tools
mount /dev/xvdd /mnt/xs-tools/
cd /mnt/xs-tools/Linux/
bash install.sh

Step 5 – Configure the firewall

CentOS comes with the iptables firewall. You would need to configure the firewall in order to connect to/from the machine.
Here are some instructions how to clear all firewall rules or enable only incoming SSH connections.
When using the –source (or –s) you can specify the whole subnet 10.24.82.197/27 (modify based on your network settings)
You can temporarily disable the firewall by executing
/etc/init.d/iptables stop

Step 6 – Copy other files over SSH

The next step is optional and that is to copy your files into the virtual machines.
This is done by first copying the files to the DHCP machine, and from there copying it to your virtual machine.
Use SCP to copy files into the virtual machine. The following example copies the petclinic directory to virtual machine’s root home folder. In this example 10.24.82.197 is the physical machine reachable via VPN, and 10.24.82.214 is the new CentOS virtual machine reachable only through the physical machine.
If you are running a Linux on your laptop, simlpy scp the files from your laptop to the physical machine. Windows users could use WinSCP instead

scp -r petclinic root@10.24.82.197:~

Once the files are copied, login to the physical machine and copy the files to the virtual machine

ssh root@10.24.82.197
cd ~
scp -r petclinic root@10.24.82.214:~

Step 7 – Clone new centos machines

After you’ve completed customizing the virtual machine you can shutdown it down.
In order to start a new machine, right click CentOS_5.3 machine and clone it.

XenServer has two clone mechanisms. Full copy duplicates the VM hardrive before starting the clone. Fast Clone uses hardware level cloning to start a new VM without actually copying the VM hardisk. Only when the new clone hardisk changes, it performs a copy (Copy-on-Write). This feature is designed to save disk space and allow fast clones, but may slightly slow disk performance.

Copy Virtual Machine dialog box

You can automate this process by using the XenServer API from Java. Here is a quick cheat sheet for XenServer API .
enjoy,
Itai

CATEGORIES

  • GigaSpaces
itaf

All Posts (9)

YOU MAY ALSO LIKE

September 18, 2008

GigaSpaces XAP – Product Overview
1 minutes read

September 15, 2009

GigaSpaces XAP 7.0.1 Is Out!
6 minutes read

April 5, 2008

Speaking at the Virtualization Conference
1 minutes read
  • Copied to clipboard

PRODUCTS, SOLUTIONS & ROLES

  • Products
  • InsightEdge Portfolio
    • Smart Cache
    • Smart ODS
    • Smart Augmented Transactions
    • Compare InsightEdge Products
  • GigaSpaces Cloud
  • Roles
  • Architects
  • CXOs
  • Product Teams
  • Solutions
  • Industry
    • Financial Services
    • Insurance
    • Retail and eCommerce
    • Telecommunications
    • Transportation
  • Technical
    • Operational BI
    • Mainframe & AS/400 Modernization
    • In Memory Data Grid
    • HTAP
    • Hybrid Cloud Data Fabric
    • Multi-Tiered Storage
    • Kubernetes Deployment
    • Streaming Analytics for Stateful Apps

RESOURCES

  • Resource Hub
  • Webinars
  • Blogs
  • Demos
  • Solution Briefs & Whitepapers
  • Case Studies
  • Benchmarks
  • ROI Calculators
  • Analyst Reports
  • eBooks
  • Technical Documentation
  • Featured Case Studies
  • Mainframe Offload with Groupe PSA
  • Digital Transformation with Avanza Bank
  • High Peak Handling with PriceRunner
  • Optimizing Business Communications with Avaya

COMPANY

  • About
  • Customers
  • Management
  • Board Members
  • Investors
  • News
  • Events
  • Careers
  • Contact Us
  • Book A Demo
  • Try GigaSpaces For Free
  • Partners
  • OEM Partners
  • System Integrators
  • Value Added Resellers
  • Technology Partners
  • Support & Services
  • University
  • Services
  • Support
Copyright © GigaSpaces 2021 All rights reserved | Privacy Policy
LinkedInTwitterFacebookYouTube

Contact Us