本帖最后由 venusf 于 2015-3-6 15:39 编辑
#############controller config
apt-get install nfs-kernel-server
vim /etc/default/nfs-kernel-server
NEED_SVCGSSD = no
vim /etc/default/nfs-common
NEED_GSSD=no
NEED_IDMAPD=yes
vim /etc/exports
/var/lib/nova/instances 10.10.10.0/24(rw,sync,fsid=0,no_root_squash,no_subtree_check)
vim /etc/idmapd.conf
[Mapping]
Nobody-User = nobody
Nobody-Group = nogroup
[Translation]
Method = nsswitch
/etc/init.d/nfs-kernel-server restart
/etc/init.d/idmapd restart
#############computer config
apt-get install -y nfs-common
vim /etc/default/nfs-common
NEED_GSSD=no
NEED_IDMAPD=yes
vim /etc/idmapd.conf
[Mapping]
Nobody-User = nobody
Nobody-Group = nogroup
[Translation]
Method = nsswitch
vim /etc/fstab
#controller static ip:10.10.10.51,对于all-in-one 在控制节点上不需要配置
10.10.10.51:/var/lib/nova/instances /var/lib/nova/instances nfs defaults 0 0
chmod -R o+x /var/lib/nova/instances/
mount -a -v
df -h
##############Update libvirt configuration
#Libvirt configuration is adoptable for both of controllernode and computenode1
chown -R root:root /etc/libvirt/qemu /var/lib/libvirt/qemu /var/cache/libvirt/qemu
vim /etc/libvirt/qemu.conf
user = "root"
group = "root"
vim /etc/libvirt/libvirtd.conf
listen_tls = 0
listen_tcp = 1
auth_tcp = "none"
#vim /etc/init/libvirt-bin.conf
# exec /usr/sbin/libvirtd $libvirtd_opts -l
vim /etc/default/libvirt-bin
libvirtd_opts="-d -l"
/etc/init.d/libvirt-bin restart
##########Nova configuration
vim /etc/nova/nova.conf
#== Live Migration==
live_migration_retry_count=30
live_migration_uri=qemu+tcp://%s/system
live_migration_bandwidth=0
live_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_LIVE, VIR_MIGRATE_PEER2PEER
service nova-compute restart
nova live-migration 138f8d24-a1c5-4694-bc21-6e5acf6cbb04 master
查看uid和gid
/etc/passwd
/etc/group
查看Nova的uid和gid的命令为:id nova
注意要把nova的uid, gid在4台机器上都改成一样
usermod -u <NEWUID> <LOGIN>
groupmod -g <NEWGID> <GROUP>
find / -user <OLDUID> -exec chown -h <NEWUID> {} \;
find / -group <OLDGID> -exec chgrp -h <NEWGID> {} \;
usermod -g <NEWGID> <LOGIN>
change nova user:
|