Showing posts with label citrix. Show all posts
Showing posts with label citrix. Show all posts

Sunday, June 23, 2013

My Book: Implementing Citrix XenServer Quickstarter

Implementing Citrix XenServer Quickstarter
Last week was a happy week for me since my book got published by Packt Publish, its really a big achievement for me to have a book published internationally on some technical topic. It feels awesome to be an author.

It all started from my blog post on Vyatta+OpenSIPS on Citrix XEN-Server when it caught attention of an Author Relation Executive from Packt Publishing, a well known publisher for technical books. I was contacted and was subsequently asked to write a 100 page book on the Citrix XenServer.

So my work with this book started around Oct,2012  A lot of things changed around me while writing this book; I changed my job, got married, got busy in personal startup as a vendor of a star product for a big Telecom here. And meanwhile all these, this book got a little bit delayed. I personally thank Yogesh Dalvi the Editor, and Sneha Modi the Project Coordinator of this book who tolerated with me throughout this book happily.

Summary of the Book:
As the title suggests this book is a Quick Starter guide for Citrix XenServer, anyone who knows about clouds and virtualization and wants to get involved with this wide spreading technologies should take this book as a beginner to interim level guide. Citrix is a giant leader in providing cloud based solutions, there are other great products as well see this link.

I've tried to keep things as simple as possible to understand and not use the really techy jargon. Like usual approach the starting chapters introduce the history of XenServer, and my personal introduction with virtualization. Since this is a quick starter book so the immediate goals are to setup a Citrix XenServer host and then find out what can be done to create virtual machines; where to place those virtual machines; storage concepts and their usage in our Virtual machines setup.
Daily maintenance like, creating and deploying snapshots, templates and importing virtual machines are covered besides topic like cloning, network connectivity,  and importance of XenServer tools.

This book explains the management of a VM resources like CPU, Memory, storage. Specialized networking concepts are also explained like Network pools, VLANs, NIC Bonding, and introduction to Virtual Switches and Routers. Advanced topics related to Citrix XenServer such as High Availability, Role Based Admin Control, and conversion of Physical machine to Virtual machine are briefly introduced in the last chapter.

Acknowledgements:
Besides being thankful to God, and my loving Parents, I'd like to say my heartiest thanks to my dear Wife who really helped me completing the last few lingering chapters, I love you my sweet Wife. Then I want to thank my colleagues and friends at Vopium who not only appreciated this book-writing but also helped me in multiple ways to dedicate my time on this book. I'm thankful to Mr. Husnain from HR team; Mr. Imran Iqbal   Head of Operations who appreciated, allowed, and applauded this activity; Mr. Haroon Scrum Master who provisioned me with only enough projects to be able to give time to writing this; Mr. Shahzad Senior Manager VoIP team as being my Mentor; then Mr. Abdul Basit, my Manager VoIP who gave me permissions and assisted me in starting up with this book. My friend Salman, Faheem, Rizwan, and Qasim who made fun of me and made me feel 'encouraged' to continue writing(:P).

Thank you all. I am really grateful and very much appreciate the help to avail this opportunity.

Friday, May 18, 2012

Vyatta+OpenSIPS on Citrix XEN-Server


Setting up Environment

Couple days ago I had to expand my Virtual environment to install more virtual machines and do some more experimentation, so instead of using VMware ESXi, I used Citrix XENServer
It was a good experience installing xenserver, just a matter of putting in the installation CD and then following steps.
Once I was done installing the xenserver, the first step was to create new virtual servers inside and setup the internal networking.For networking part the obvious choice was Vyatta (VYATTA CORE 6.4). 
Here is the setup diagram
Virtual Server Space - Network Topology
Setting up ISO Library in XenCenter was really easy. I used the downloaded Vyatta-virtual-64bit ISO anda Ubuntu Server ISO to install both Vyatta - routing and firewall,  and a Ubuntu Server- OpenSIPS server.

I assigned two NICs to Vyatta one being bridged to physical interface to interact with the outer world the second interface is connected to a virtual switch created inside the xenserver to communicate with the internal servers.

OpenSIPS server on the other hand is connected only to the virtual switch and uses the Vyatta router as its gateway. I had to configure NAT on the Vyatta router for this to work.

Here's how we do NAT on Vyatta to let the traffic coming from private network successfully reach out to the internet.
GW-Vyatta:~$configure
GW-Vyatta#set interfaces ethernet eth0 address 172.16.31.101/16 
GW-Vyatta#set system gateway-address 172.16.2.50 
GW-Vyatta#set system name-server 8.8.8.8 
GW-Vyatta#commit
Verify that Router can itself reach out to internet.
GW-Vyatta#ping www.google.com
Start SSH Service on Vyatta router
GW-Vyatta#set service ssh listen-address 172.16.31.101
GW-Vyatta#commit
Configure the LAN interface on eth1.
GW-Vyatta#set interfaces ethernet eth1 address 192.168.30.1/24
GW-Vyatta#commit
Set Masquerade NAT for traffic from LAN to get translated to WAN address.

GW-Vyatta#set nat source rule 5 outbound-interface eth0
GW-Vyatta#set nat source rule 5 source address 192.168.30.0/24
GW-Vyatta#set nat source rule 5 translation address masquerade
GW-Vyatta#commit
Ping some internet destination from the LAN side and see some new translations on Vyatta.



W-Vyatta#run show nat source statistics
Configure SSH access to OpenSIPS Server such that when I SSH on 172.16.31.101 port 22303 it gets translated to internal address 192.168.30.3 port 22.
GW-Vyatta#set nat destination rule 5 inbound-interface eth0
GW-Vyatta#set nat destination rule 5 destination port 22303
GW-Vyatta#set nat destination rule 5 translation address 192.168.30.3
GW-Vyatta#set nat destination rule 5 translation port 22
GW-Vyatta#set nat destination rule 5 protocol tcp
GW-Vyatta#commit
SSH onto the OPenSIPS server via port 172.16.31.101:22303 and see the destination NAT stats.
GW-Vyatta#run show nat destination statistics

GW-Vyatta#save
GW-Vyatta#exit

That was it and I can access internet from my OpenSIPS server and also SSH into my server from outside the virtual environment. The next thing would be to make this setup work with two-way audio. For that I may need to setup VPN or something IDK.