Showing posts with label Open Source. Show all posts
Showing posts with label Open Source. Show all posts

Friday, 9 May 2014

Cloudstack 4.3 management installation

cloudstack 4.3Cloudstack is an opensource Cloud platform which is robust as well as its rich features enables it to work in both Public and private cloud. Over the years its installation has become easier and easier and I was curious to check the new 4.3 version. As hypervisor I have used XEN but there are other options as well such as KVM, VMware, Hyper-V, LXC. Although its installation is pretty straight forward but here it goes:
I have deployed it in CentOS 6.5 server. I will update the details of steps:

hostname –fqdn
Check the hostname (fully qualified domain name)
If it doesn’t show the hostname then edit the name in /etc/hosts and insert the line.
172.19.10.7 hostname.domain.com
update the server repository
yum update -y
nano /etc/yum.repos.d/cloudstack.repo
[cloudstack]
name=cloudstack
baseurl=http://cloudstack.apt-get.eu/rhel/4.3/
enabled=1
gpgcheck=0
yum install ntp -y
service ntpd start
nano /etc/selinux/config
set SElinux to permissive
reboot
yum install cloudstack-management -y
yum install mysql-server -y
chkconfig mysqld on
nano /etc/my.cnf
innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=350
log-bin=mysql-bin
binlog-format = ‘ROW’
service mysqld restart
wget http://download.cloud.com.s3.amazonaws.com/tools/vhd-util
mv vhd-util /usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver/
chmod +x /usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver/vhd-util
mysql_secure_installation
mount 172.19.10.14:/storage/secondary /mnt/secondary/ -o nolock
cloudstack-setup-databases cloud:password@localhost –deploy-as=root:password
cloudstack-setup-management
/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/4.3/systemvm64template-2014-01-14-master-xen.vhd.bz2 -h xenserver -F

Tuesday, 3 December 2013

How to access System VMs in Cloudstack

Recently I have been working in managing Cloudstack at my work.  Cloudstack uses 3 types of system VMs for its operation.
1. SSVM - Secondary storage VM: This VM basically mounts the secondary storage which is used for templates, snapshots, ISO for cloudstack.
2. CP - Console Proxy VM: This VM is used basically to view the console (Type of VNC View) of the machine as it is not a physical machine and for access off VM if network is unreachable.
3. VR - Virtual Router:This VM is generated when any account user creates a VM and every VM requires a network, which secures network of that account and access to VMs of that particular user. It also provides DHCP services to make that VM traffic reach the WWW and vice verse.

We continuously require access to these VM mostly VR and SSVM for different debugging (will be updating blog about cloudstack extensively) and for operations.

To access these VMs we need to access the Host they are in which we can find from VMs details

we can find the details of host as well as the link local IP from which we can access without the need of password by going in infrastructure -> System VM or Virtual Router and details will be displayed as above. 

Simply access the host in which VM is and run following command:

ssh -i /root/.ssh/id_rsa.cloud -p 3922 root@169.254.x.x
Where x.x refers to IP which changes from time to time but first two octets are same always.!

After running the above command it will not ask for any username and password and VM can be accessed through this command.
(Hope it Helps !)