CloudStack

오픈소스 비즈니스 컨설팅
이동: 둘러보기, 검색

CloudStack을 정리 합니다.

CloudStack 개요

CloudStack 설치

설치용 파일 준비

  • System VM 4.3
  • XenServer를 설치하면, /opt/xensource/packages/iso/XenCenter.iso 파일이 있습니다

노트북 환경 설정

  • 노트북 환경
  • Windows 7 64 bits, 16 GB Memory, 50 GB Disk
  • c:/windows/system32/drivers/etc/hosts
192.168.70.133      node133.jopenbusiness.com       node133
192.168.70.181      csnode101.cloudstack.com        csnode101
192.168.70.182      csnode102.cloudstack.com        csnode102
192.168.70.191      csnode201.cloudstack.com        csnode201
192.168.70.192      csnode202.cloudstack.com        csnode202
  • Adapter : 192.168.70.1, 255.255.255.0
  • DHCP 서버 : 192.168.70.100, 255.255.255.0, 192.168.70.181 ~ 192.168.70.254
  • csnode101 : 1 CPU / 2 GB memory / 100 GB disk
  • csnode102 : 1 CPU / 2 GB memory / 100 GB disk
  • csnode201 : 2 CPU / 4 GB memory / 100 GB disk
  • csnode202 : 2 CPU / 4 GB memory / 100 GB disk
  • 네트워크 설정 시 "호스트 전용 어댑터"의 "무작위 모드"는 "모두 허용"으로 설정
  • csnode101, csnode102
  • NAT
  • VirtualBox Host-Only Ethernet Adapter, Intel PRO/1000 MT Desktop (82540EM), 모두 허용
  • VirtualBox Host-Only Ethernet Adapter #2, Intel PRO/1000 MT Desktop (82540EM), 모두 허용
  • csnode103, csnode104
  • NAT
  • VirtualBox Host-Only Ethernet Adapter, Intel PRO/1000 MT Desktop (82540EM), 모두 허용
  • VirtualBox Host-Only Ethernet Adapter #2, Intel PRO/1000 MT Desktop (82540EM), 모두 허용

DNS Server 설치

  • 1 CPU / 1 GB Memory / 100 GB disk
  • 192.168.70.133, 255.255.255.0, 192.168.70.1
  • vi ~/.bash_profile
alias dir='ls -alF'
alias dird='ls -alF | grep /'

export LANG=ko_KR.utf8
  • 네트워크 설정
cd /etc/sysconfig/network-scripts

vi ifcfg-eth0
   DEVICE=eth0
   HWADDR=생략
   TYPE=Ethernet
   UUID=생략
   ONBOOT=yes
   NM_CONTROLLED=yes
   BOOTPROTO=dhcp

vi ifcfg-eth1
   DEVICE=eth1
   BOOTPROTO=none
   HWADDR=생략
   UUID=생략
   ONBOOT=yes
   IPADDR=192.168.70.133
   NETMASK=255.255.255.0
   GATEWAY=192.168.70.1
   TYPE=Ethernet
   USERCTL=no
   IPV6INIT=no
   PEERDNS=yes

ifdown eth0
ifup eth0
ifdown eth1
ifup eth1
  • vi /etc/hosts
192.168.70.133      node133.jopenbusiness.com       node133
192.168.70.181      csnode101.cloudstack.com        csnode101
192.168.70.182      csnode102.cloudstack.com        csnode102
192.168.70.191      csnode201.cloudstack.com        csnode201
192.168.70.192      csnode202.cloudstack.com        csnode202
  • CentOS update
ping -c 3 google.com
yum update
  • DNS Server 설치
yum install bind bind-*
service named start
#systemctl start named.service
  • 방화벽에서 TCP 53, UDP 53 포트를 열어 둔다.
iptables -A INPUT -p udp -m state --state NEW --dport 53 -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW --dport 53 -j ACCEPT
service iptables save
service iptables restart
cat /etc/sysconfig/iptables
  • CentOS 7의 경우, 방화벽에서 TCP 53, UDP 53 포트를 열어 둔다.
firewall-cmd --permanent --zone=public --add-port=53/tcp
firewall-cmd --permanent --zone=public --add-port=53/udp
firewall-cmd --reload
firewall-cmd --zone=public --list-ports
  • DNS Server 설정
rndc-confgen -a -r /dev/urandom
chown named:named /etc/rndc.key
rndc status
  • 접속 권한 설정
  • vi /etc/named.conf
listen-on port 53 { any; };
allow-query     { any; };
  • DNS Server 기동
service named restart
# systemctl restart  named.service
  • DNS Server 동작 확인
dig @127.0.0.1 google.com any
dig @192.168.70.133 google.com any
dig @node133.jopenbusiness.com google.com any
  • 다른 서버에서 접속하여 사용하도록 설정하는 방법
  • vi /etc/resolv.conf
nameserver 192.168.70.133
;  nameserver 175.115.93.35
;  nameserver 168.126.63.1
  • /etc/resolv.conf 파일의 자동 초기화 방지 방법 (비권장)
chattr +i /etc/resolv.conf
  • 참고 문헌

CloudPlatform 설치

  • 1 CPU / 2 GB Memory / 100 GB disk
  • 192.168.70.181, 255.255.255.0, 192.168.70.1
  • vi ~/.bash_profile
alias dir='ls -alF'
alias dird='ls -alF | grep /'

export LANG=ko_KR.utf8
  • 네트워크 설정
cd /etc/sysconfig/network-scripts

vi ifcfg-eth0
   DEVICE=eth0
   HWADDR=생략
   TYPE=Ethernet
   UUID=생략
   ONBOOT=yes
   NM_CONTROLLED=yes
   BOOTPROTO=dhcp

vi ifcfg-eth1
   DEVICE=eth1
   BOOTPROTO=none
   HWADDR=생략
   UUID=생략
   ONBOOT=yes
   IPADDR=192.168.70.181
   NETMASK=255.255.255.0
   GATEWAY=192.168.70.1
   TYPE=Ethernet
   USERCTL=no
   IPV6INIT=no
   PEERDNS=yes

ifdown eth0
ifup eth0
ifdown eth1
ifup eth1
  • vi /etc/hosts
192.168.70.133      node133.jopenbusiness.com       node133
192.168.70.181      csnode101.cloudstack.com        csnode101
192.168.70.182      csnode102.cloudstack.com        csnode102
192.168.70.191      csnode201.cloudstack.com        csnode201
192.168.70.192      csnode202.cloudstack.com        csnode202
  • CentOS update
ping -c 3 google.com
yum update
  • CD-ROM에 xs-tools-6.2.0.iso 파일을 삽입 합니다.
mkdir /cdrom
mount -r /dev/cdrom /cdrom
cd /cdrom/Linux/
./install.sh
reboot
  • CloudPlatform 설치
mkdir /install
cd /install
//--- 다운로드 받은 설치 파일을 여기에 올릴 것
tar -xvf CloudPlatform_4.3.0.1-rhel6.4.tar.gz
cd CloudPlatform-4.3.0.1-rhel6.4

./install.sh --install-management
./install.sh --install-database
  • MySQL 환경 설정
  • vi /etc/my.cnf
[mysql]
default-character-set=utf8

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0 

innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=350
log-bin=mysql-bin
binlog-format = 'ROW'

character-set-client-handshake=FALSE
init_connect="SET collation_connection=utf8_general_ci"
init_connect="SET NAMES utf8"
default-character-set=utf8
character_set_client=utf8
character-set-server=utf8
collation-server=utf8_general_ci

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[client]
default-character-set=utf8

[mysqldump]
default-character-set=utf8
  • MySQL 관리자 암호 설정
service mysqld restart
mysqladmin -u root password 'demo1234';
#mysql -u root mysql
#   SET PASSWORD = PASSWORD('demo1234');
#   GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
#   GRANT ALL PRIVILEGES ON *.* TO 'root'@'csnode101.cloudstack.com' WITH GRANT OPTION;
#   exit 
mysql -uroot -p mysql
  • CentOS 보안 설정
  • vi /etc/selinux/config
SELINUX=permissive
  • 서버 rebooting
shutdown -r now
  • CloudPlatform을 위한 MySQL 설정
//--- cloud / demo1234 DB 사용자로 CloudStack DB 정보 설정
cloudstack-setup-databases cloud:demo1234@localhost --deploy-as=root:demo1234
//--- cloud, cloud_usage, cloudbridge 데이터베이스가 생성됨
//--- /etc/cloudstack/management/db.properties 파일이 생성됨
mysql -ucloud -p cloud

//------------------------------------------------------------
//--- HVM (Hardware Virtual Machine)을 지원하지 않을 경우 아래 설정을 합니다.
//------------------------------------------------------------
mysql -uroot -p mysql
   INSERT INTO `cloud`.`configuration` (`category`, `instance`, `component`, `name`, `value`, `description`) 
          VALUES ('Advanced', 'DEFAULT', 'management-server', 'xen.check.hvm', 'false', 
                  'Should we allow only the XenServers support HVM');
   commit;
   select * from cloud.configuration;
   select * from cloud.configuration where name = 'xen.check.hvm';
   exit

cloudstack-setup-management
  • CloudPlatform 기동/종료
service cloudstack-management restart

NFS Server 설치

  • 1 CPU / 2 GB Memory / 100 GB disk
  • 192.168.70.182, 255.255.255.0, 192.168.70.1
  • vi ~/.bash_profile
alias dir='ls -alF'
alias dird='ls -alF | grep /'

export LANG=ko_KR.utf8
  • 네트워크 설정
cd /etc/sysconfig/network-scripts

vi ifcfg-eth0
   DEVICE=eth0
   HWADDR=생략
   TYPE=Ethernet
   UUID=생략
   ONBOOT=yes
   NM_CONTROLLED=yes
   BOOTPROTO=dhcp

vi ifcfg-eth1
   DEVICE=eth1
   BOOTPROTO=none
   HWADDR=생략
   UUID=생략
   ONBOOT=yes
   IPADDR=192.168.70.182
   NETMASK=255.255.255.0
   GATEWAY=192.168.70.1
   TYPE=Ethernet
   USERCTL=no
   IPV6INIT=no
   PEERDNS=yes

ifdown eth0
ifup eth0
ifdown eth1
ifup eth1
  • vi /etc/hosts
192.168.70.133      node133.jopenbusiness.com       node133
192.168.70.181      csnode101.cloudstack.com        csnode101
192.168.70.182      csnode102.cloudstack.com        csnode102
192.168.70.191      csnode201.cloudstack.com        csnode201
192.168.70.192      csnode202.cloudstack.com        csnode202
  • CentOS update
ping -c 3 google.com
yum update
  • CD-ROM에 xs-tools-6.2.0.iso 파일을 삽입 합니다.
mkdir /cdrom
mount -r /dev/cdrom /cdrom
cd /cdrom/Linux/
./install.sh
reboot
  • NFS Server 설치
yum install nfs-utils nfs-utils-lib

service nfs restart
chkconfig nfs on
  • NFS Server 설정
groupadd -g 60001 nfsgroup
useradd  -u 60001 -d /home/nfsuser -m -g nfsgroup nfsuser

mkdir -p /nfs/pnus/primary/cluster001
mkdir -p /nfs/pnus/secondary
chown -R nfsuser:nfsgroup /nfs
chmod -R 755 /nfs
  • vi /etc/exports
/nfs *(rw,async,no_root_squash)
  • vi /etc/sysconfig/nfs
RQUOTAD_PORT=875                  #--- Port rquotad
LOCKD_TCPPORT=32803               #--- TCP port rpc.lockd
LOCKD_UDPPORT=32769               #--- UDP port rpc.lockd
MOUNTD_PORT=892                   #--- Port rpc.mountd
STATD_PORT=662                    #--- Port rpc.statd
STATD_OUTGOING_PORT=2020          #--- Outgoing port statd
  • vi /etc/sysconfig/iptables
#-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT 다음에 추가
-A INPUT -m state --state NEW -p udp --dport 111 -j ACCEPT
-A INPUT -m state --state NEW -p tcp --dport 111 -j ACCEPT
-A INPUT -m state --state NEW -p tcp --dport 2049 -j ACCEPT
-A INPUT -m state --state NEW -p tcp --dport 32803 -j ACCEPT
-A INPUT -m state --state NEW -p udp --dport 32769 -j ACCEPT
-A INPUT -m state --state NEW -p tcp --dport 892 -j ACCEPT
-A INPUT -m state --state NEW -p udp --dport 892 -j ACCEPT
-A INPUT -m state --state NEW -p tcp --dport 875 -j ACCEPT
-A INPUT -m state --state NEW -p udp --dport 875 -j ACCEPT
-A INPUT -m state --state NEW -p tcp --dport 662 -j ACCEPT
-A INPUT -m state --state NEW -p udp --dport 662 -j ACCEPT
  • 111/tcp, 111/udp : RPC 4.0 portmapper
  • 2049/tcp, 2049/ucp : NFSD (NFS Server)
  • vi /etc/sysconfig/nfs : Portmap static ports
rpcinfo -p             #--- 사용하는 port 확인

firewall-cmd --permanent --zone=public --add-port=111/tcp
firewall-cmd --permanent --zone=public --add-port=111/udp
firewall-cmd --permanent --zone=public --add-port=2049/tcp
firewall-cmd --permanent --zone=public --add-port=2049/udp

firewall-cmd --permanent --zone=public --add-port=875/tcp
firewall-cmd --permanent --zone=public --add-port=875/udp
firewall-cmd --permanent --zone=public --add-port=32803/tcp
firewall-cmd --permanent --zone=public --add-port=32769/udp
firewall-cmd --permanent --zone=public --add-port=20048/tcp
firewall-cmd --permanent --zone=public --add-port=20048/udp

firewall-cmd --permanent --zone=public --add-port=892/tcp
firewall-cmd --permanent --zone=public --add-port=892/udp
firewall-cmd --permanent --zone=public --add-port=662/tcp
firewall-cmd --permanent --zone=public --add-port=662/udp
firewall-cmd --permanent --zone=public --add-port=2020/tcp
firewall-cmd --permanent --zone=public --add-port=2020/udp

# firewall-cmd --permanent --zone=public --add-port=53987/udp
# firewall-cmd --permanent --zone=public --add-port=57960/udp

firewall-cmd --reload
firewall-cmd --zone=public --list-ports
### systemctl stop firewalld.service
  • vi /etc/idmapd.conf
Domain = cloudstack.com
  • 서버 재기동
reboot

service rpcbind restart
service nfslock restart
service nfs restart
systemctl restart rpcbind
systemctl restart nfs-server
systemctl restart nfs-lock
systemctl restart nfs-idmap

systemctl enable rpcbind
systemctl enable nfs-server
systemctl enable nfs-lock
systemctl enable nfs-idmap
  • 서비스 확인
showmount -e
rpcinfo -p localhost
  • 참고 문헌

NFS 접속 설정

  • csnode101에서 아래 작업을 진행 합니다.
  • NFS Client 설치
yum install nfs-utils nfs-utils-lib
groupadd -g 60001 nfsgroup
useradd  -u 60001 -d /home/nfsuser -m -g nfsgroup nfsuser

service rpcbind start
service nfslock start
service nfs start
chkconfig nfs on
  • NFS mount
showmount -e csnode102.cloudstack.com

#--- 이미 설정이 되어 있으므로 아래 설정은 생략 합니다.
#setenforce permissive
#vi /etc/selinux/config
#   SELINUX=permissive

yum install ntp
service ntpd start
chkconfig ntpd on
  • wget 설치
yum install wget

System VM Template 준비

  • csnode101에서 아래 작업을 진행 합니다.
  • 다운로드 받은 설치 파일을 /root/install/ 폴더에 올릴 것
  • /root/install/systemvm64template-2014-04-10-master-xen.vhd.bz2
  • System VM 준비
mkdir -p /mnt/secondary
mount -t nfs -o vers=3 csnode102.cloudstack.com:/nfs/pnus/secondary /mnt/secondary

cd /usr/share/cloudstack-common/scripts/storage/secondary
./cloud-install-sys-tmplt -m /mnt/secondary/ -f /root/install/systemvm64template-2014-04-10-master-xen.vhd.bz2 -h xenserver -F
### ./cloud-install-sys-tmplt -m /mnt/secondary/ -u http://download.cloud.com/templates/4.3/systemvm64template-2014-04-10-master-xen.vhd.bz2 -h xenserver -F

ls -alF /mnt/secondary/template/tmpl/1/1/
umount /mnt/secondary

#--- csnode102에서 조회
ls -alF /nfs/pnus/primary
ls -alF /nfs/pnus/secondary/template/tmpl/1/1

XenServer 설치

  • XenServer 6.2 설치 (Linux, Red Hat (64 bit))
  • 2 CPU / 4 GB Memory / 100 GB Disk
  • csnode201 XenServer 설치
  • Select Keymap : [qwerty] us
  • Welcome to XenServer Setup : Ok
  • End User License Agreement : Accept EULA
  • System Hardware : Ok
  • Virtual Machine Storage : sda
  • Select Installation Source : Local media
  • Supplemental Packs : No
  • Verify InstallationSource : Skip verification
  • Set Password : demo1234
  • Networking : eth1
  • Networking : 192.168.70.191, 255.255.255.0, 192.168.70.1
  • Hostname and DNS Configuration
  • Hostname : xenserver-csnode201
  • DNS Server : 175.115.93.35, 168.126.63.1
  • Select Time Zone : Asia, Seoul
  • System time : Using NTP
  • NTP Configuration
  • NTP Server : 0.xenserver.pool.ntp.org, 1.xenserver.pool.ntp.org, 2.xenserver.pool.ntp.org
  • Confirm Installation : Install XenServer
  • csnode202 XenServer 설치
  • Select Keymap : [qwerty] us
  • Welcome to XenServer Setup : Ok
  • End User License Agreement : Accept EULA
  • System Hardware : Ok
  • Virtual Machine Storage : sda
  • Select Installation Source : Local media
  • Supplemental Packs : No
  • Verify InstallationSource : Skip verification
  • Set Password : demo1234
  • Networking : eth1
  • Networking : 192.168.70.192, 255.255.255.0, 192.168.70.1
  • Hostname and DNS Configuration
  • Hostname : xenserver-csnode202
  • DNS Server : 175.115.93.35, 168.126.63.1
  • Select Time Zone : Asia, Seoul
  • System time : Using NTP
  • NTP Configuration
  • NTP Server : 0.xenserver.pool.ntp.org, 1.xenserver.pool.ntp.org, 2.xenserver.pool.ntp.org
  • Confirm Installation : Install XenServer
  • XenServer에 포함된 ISO 파일 위치 : /opt/xensource/packages/iso/
  • XenCenter.iso
  • xs-tools-6.2.0.iso
  • vi ~/.bash_profile
alias dir='ls -alF'
alias dird='ls -alF | grep /'

### export LANG=ko_KR.utf8
  • vi /etc/hosts
192.168.70.133      node133.jopenbusiness.com       node133
192.168.70.181      csnode101.cloudstack.com        csnode101
192.168.70.182      csnode102.cloudstack.com        csnode102
192.168.70.191      csnode201.cloudstack.com        csnode201
192.168.70.192      csnode202.cloudstack.com        csnode202
  • NFS Server 연동을 위해 사용자와 그룹 생성
groupadd -g 60001 nfsgroup
useradd  -u 60001 -d /home/nfsuser -m -g nfsgroup nfsuser
  • XenServer Support Package 설치 (옵션 사항)
tar xf xenserver-cloud-supp.tgz
xe-install-supplemental-pack xenserver-cloud-supp.iso
  • 주요 폴더 및 파일
  • /opt/xensource/
  • /etc/ntp.conf
  • /etc/xensource/pool.conf : Pool (Cluster) 정보
  • /var/log/xensource.log

Basic Network 설정

  • Basic Network 설정
cd /opt/xensource/bin
xe-switch-network-backend bridge
reboot

Advanced Network 설정

  • Advanced Network 설정
cd /opt/xensource/bin
xe-switch-network-backend bridge
reboot
  • vi /etc/xensource/network.conf
openvswitch
  • vi /etc/sysctl.conf
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-arptables = 1
  • 변경 사항 적용
sysctl -p /etc/sysctl.conf

XenServer Resource Pool 생성

  • XenCenter에서 Cluster001 Resource Pool을 생성 합니다.
  • xenserver-csnode201를 마스터를 등록 합니다.
  • xenserver-csnode201과 xenserver-csnode202를 Resource Pool에 포함 합니다.
  • "Window -> Log Window" 메뉴에서 진행 상태를 확인할 수 있습니다.

Basic Zone 구성

  • 로그 확인 in csnode101
tail -f /var/log/cloudstack/management/management-server.log
  • CloudStack의 계층 구조
  • Region -> Zone (데이터센터) -> Pod (Rack) -> Cluster (Hypervisor type) -> Host
  • 초기 비밀번호 : password
  • Zone 추가
  • 이름 : Pnus
  • DNS 1 : 8.8.8.8
  • 내부 DNS 1 : 8.8.8.8
  • Pod 추가
  • 이름 : Pod001
  • 게이트웨이 : 192.168.70.1
  • 넷 마스크 : 255.255.255.0
  • IP 주소 범위 : 192.168.70.140 ~ 192.168.70.149 (System VM이 사용)
  • 손님 네트워크 추가
  • 게이트웨이 : 192.168.70.1
  • 넷 마스크 : 255.255.255.0
  • IP 주소 범위 : 192.168.70.150 ~ 192.168.70.179 (Guest VM이 사용)
  • 클러스터 추가
  • 하이퍼 바이저 : XenServer
  • 이름 : Cluster001 (XenCenter에서 추가한 Pool 이름을 사용할 것)
  • 호스트 추가 (Cluster의 Master node를 추가 합니다.)
  • 호스트명 : 192.168.70.191
  • 사용자명 : root
  • 암호 : demo1234
  • 기본 스토리지 추가
  • 이름 : PriCluster001
  • 프로토콜 : NFS
  • 범위 : 클러스터 (클러스터, Zone 전체)
  • 서버 : 192.168.70.182
  • 경로 : /nfs/pnus/primary/cluster001
  • 2차 스토리지 추가
  • NFS 서버 : 192.168.70.182
  • Provider : NFS
  • 경로 : /nfs/pnus/secondary

Advanced Zone 구성

  • 로그 확인 in csnode101
tail -f /var/log/cloudstack/management/management-server.log
  • CloudStack의 계층 구조
  • Region -> Zone (데이터센터) -> Pod (Rack) -> Cluster (Hypervisor type) -> Host
  • XenCenter에서 Cluster001의 Networking 탭에서 NIC의 Properties 수정
  • Networkk 0 -> Network0
  • Networkk 1 -> Network1
  • Networkk 2 -> Network2
  • Advanced type의 Zone 추가
  • 이름 : Pnus
  • DNS 1 : 8.8.8.8
  • 내부 DNS 1 : 8.8.8.8
  • Hypervisor : XenServer
  • Guest CIDR : 10.1.1.0/24
  • Setup Network
  • Physical network name : Network1
  • XenServer Traffic label: Network1
  • Public Traffic
  • 10.200.41.1, 255.255.255.0, 10.200.41.150 ~ 10.200.41.199
  • Pod 추가
  • 이름 : Pod001
  • 게이트웨이 : 192.168.70.1
  • 넷 마스크 : 255.255.255.0
  • IP 주소 범위 : 192.168.70.140 ~ 192.168.70.149 (System VM이 사용)
  • VLAN/VNI Range
  • 100 ~ 150
  • 클러스터 추가
  • 하이퍼 바이저 : XenServer
  • 이름 : Cluster001 (XenCenter에서 추가한 Pool 이름을 사용할 것)
  • 호스트 추가 (Cluster의 Master node를 추가 합니다.)
  • 호스트명 : 192.168.70.111
  • 사용자명 : root
  • 암호 : demo1234
  • 기본 스토리지 추가
  • 이름 : PriCluster001
  • 프로토콜 : NFS
  • 범위 : 클러스터 (클러스터, Zone 전체)
  • 서버 : 192.168.70.102
  • 경로 : /nfs/pnus/primary/cluster001
  • 2차 스토리지 추가
  • 이름 : SecondaryPnus
  • NFS 서버 : 192.168.70.102
  • Provider : NFS
  • 경로 : /nfs/pnus/secondary

관리자 매뉴얼

XenServer에 ISO 폴더 생성

mkdir /iso
xe sr-create name-label=iso type=iso device-config:legacy_mode=true device-config:location=/iso content-type=iso

CloudPlatform 설정 정보

  • MySQL에서 설정 정보 조회
select category, instance, name from cloud.configuration where component = 'management-server' order by category;
  • "Regions"

CloudPlatform 초기화

  • MySQL 데이터 초기화
service cloudstack-management stop
#service tomcat6 stop
cd /var/log/cloudstack/management
rm -f *

mysql -uroot -p mysql
    show databases;
    drop database cloud; 
    drop database cloud_usage; 
    drop database cloudbridge; 
    exit;

//--- cloud / demo1234 DB 사용자로 CloudStack DB 정보 설정
cloudstack-setup-databases cloud:demo1234@localhost --deploy-as=root:demo1234

//------------------------------------------------------------
//--- HVM (Hardware Virtual Machine)을 지원하지 않을 경우 아래 설정을 합니다.
//------------------------------------------------------------
mysql -uroot -p mysql
  INSERT INTO `cloud`.`configuration` (`category`, `instance`, `component`, `name`, `value`, `description`) 
         VALUES ('Advanced', 'DEFAULT', 'management-server', 'xen.check.hvm', 'false', 
                 'Should we allow only the XenServers support HVM');
  commit;
  select * from cloud.configuration;
  exit

cloudstack-setup-management

#service tomcat6 start
service cloudstack-management start
#--- shutdown -r now

cd /var/log/cloudstack/management
chown cloud:cloud *
  • Secondary에 System VM 등록
mkdir -p /mnt/secondary
mount -t nfs -o vers=3 node101.cloudstack.com:/nfs/cluster001/secondary /mnt/secondary

cd /mnt/secondary
rm -rf template

cd /usr/share/cloudstack-common/scripts/storage/secondary
./cloud-install-sys-tmplt -m /mnt/secondary/ -u /cpman_install/systemvm64template-2014-01-14-master-xen.vhd.bz2 -h xenserver

ls -alF /mnt/secondary/template/tmpl/1/1/
ls -alF /nfs/cluster001/secondary/template/tmpl/1/1
umount /mnt/secondary

shutdown -r now

CloudPlatform 디버깅

  • csnode101 로그
  • /var/log/cloudstack/management/management-server.log
  • System VM
  • 접속 정보 : root / password
  • tail -f /var/log/cloud.log

참고 문헌