CloudStack⑪システムVM(3日目)

おはようございます。

今日はSSVMをenableにさせてインスタンスを作成します。

ホスト# cloud-setup-agent
Welcome to the CloudStack Agent Setup:
Please input the Management Server Hostname/IP-Address:[___]***
Failed to resolve ocdetdh05. Please input a valid hostname or IP-Address.

管理#vi /etc/idmapd.conf
[General]
#Verbosity = 0
# The following should be set to the local NFSv4 domain name
The default is the host's DNS domain name.
Domain =***

# The following is a comma-separated list of Kerberos realm
# names that should be considered to be equivalent to the
# local realm, such that <user>@REALM.A can be assumed to
# be the same user as <user>@REALM.B
# If not specified, the default local realm is the domain name,
# which defaults to the host's DNS domain name,
# translated to upper-case.
# Note that if this value is specified, the local realm name
# must be included in the list!
#Local-Realms =
[Mapping]
User = root
Group = root

#vi /etc/exports
/strage ____/255.255.255.0(rw,async,no_root_squash,no_all_squash)

システムの再起動を行いました。rpcbindもnfslockも初めて見ました。
どちらもrpcプロセスに関連するもので、前者はrpcの動きをリッスンしているポートに流し、後者はサーバーにあるファイルのロックをNFSクライアントに許可しています。rpcとはNW上の異なるマシン間で処理を実行する手続きのことを指すそうです。ここでいうと、管理サーバーとホストサーバーの通信を担当してくれています。
#service rpcbind start
#chkconfig rpcbind on
#service nfslock start
#chkconfig nfslock on
#service nfs start
#chkconfig nfs on

ログの確認。
2014-05-20 11:12:09,180 DEBUG [cloud.server.StatsCollector] (StatsCollector-3:null) There is no secondary storage VM for secondary storage host nfs://____/export/secondary

ファイルを作って、マウントそのものが可能なのか確かめてみました。
#mount -t nfs ____:/export/cloud/secondary /mnt/secondary
mount.nfs: mount point /mnt/secondary does not exist
大丈夫ですね。

そして、セカンダリストレージの中にテンプレートが入っているかを見ました。
#cd /export
#ls
primary secondary
#cd /export/secondary
#ls
template
#cd /export/primary
#ls
2180b082-9b5b-4f4c-8d1a-3358c80fd15b s-1138-VM-patchdisk s-21-VM-patchdisk
8d99cb89-f94d-40d0-838e-da8a3c6de89f s-17-VM-patchdisk s-22-VM-patchdisk
a2f9e264-e2ff-4b72-9ff9-36049abb9a51 s-18-VM-patchdisk s-23-VM-patchdisk
b5aeb2e1-7929-432a-aa67-cf961f9d7588 s-19-VM-patchdisk s-24-VM-patchdisk
KVMHA s-20-VM-patchdisk v-2-VM-patchdisk

#vi /etc/export
内容を元に戻しました。

ホストを見ると止まっていたので強制接続、それでも動かなかったので削除して作り直しました。
その後システムVMを見ると、動いていました!やっと動きました。とてもとても良かったです; ;
brg5201

 

さてお次はテンプレートです。こちらを確認をしたら状態がNoでした。
SSVMはホストにあるので、ホストサーバーからログインです。
# ssh -i /root/.ssh/id_rsa.cloud -p 3922 リンクローカルIP
The authenticity of host '[____]:3922 ([_IP_]:3922)' can't be established.
RSA key fingerprint is _______________.
Are you sure you want to continue connecting (yes/no)? yes

管理サーバーに届いているか→no
# ping ______
PING _____ (_____): 56 data bytes
64 bytes from 172.16.96.115: Destination Host Unreachable
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst Data
4 5 00 5400 0000 0 0040 40 01 f902 ___ ___
bytes from 172.16.96.115: Destination Host Unreachable・・・・・
6 packets transmitted, 0 packets received, 100% packet loss

# cd /var/log/cloud
# ls -al
total 296
drwxr-xr-x 2 root root 4096 May 20 03:06 .
drwxr-xr-x 8 root root 4096 May 20 03:06 ..
-rw-r--r-- 1 root root 129889 May 20 03:40 cloud.out
-rw-r--r-- 1 root root 151683 May 20 03:40 systemvm.log
# cat systemvm.log
2014-05-20 03:06:21,964 INFO [utils.component.ComponentLocator] (main:) Unable to find components.xml


ホストに到達していないことを確認グローバル設定からホストサーバーのIPに変更→管理サーバーを再起動→SSVMを削除
brg5202
少し待っていたらstartingになり、また少し待つとenableになりました。
今までSSVMがなかなかできずにいたので、消してまた作れなくなってしまったらどうしようと心配でした。新しく作られて本当に良かった!

わくわくしながらテンプレを見に行きましたがNoのままでした。

あ、間違えた。違う作業をしていました。

# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
____    ____ 255.255.255.255 UGH 0 0 0 eth1
____    ____ 255.255.255.224 UG 0 0 0 eth1
____ 0.0.0.0 255.255.255.0 U 0 0 0 eth2
____ 0.0.0.0 255.255.255.0 U 0 0 0 eth1
____ 0.0.0.0 255.255.255.0 U 0 0 0 eth3
____ 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.2.254 0.0.0.0 UG 0 0 0 eth2
グローバルIPと通信できていない

# cat /etc/resolv.conf
nameserver IP___
nameserver DNS1___
# ping www.google
ping: unknown host
DNSサーバと通信できていない

管理側からはpingでwww.google.comに飛びます。
ホスト側からインターネットに届かない理由はSSVMへのアドレスの割り当ての範囲を適当に決めてしまったからでした。

というわけで、これからNATの設定をしていきます。

 

参考
https://groups.google.com/forum/#!msg/cloudstack-ja/xuo0sSWkR_4/1PnLh3389xsJ
https://groups.google.com/forum/#!msg/cloudstack-ja/46h7-0EgCwE/SyTJdJUvPC0J