***********************************************************************************
其他命令:
1. 首先批量更改UID GID
2. 修改NFS权限
3. 运行迁移命令时遇到错误
解决:
https://www.mirantis.com/blog/tutorial-openstack-live-migration-with-kvm-hypervisor-and-nfs-shared-storage/
迁移日志:
迁移前查看命令:
动态迁移命令:
调试命令:
指定配置文件运行compute:
重启nova服务命令:
cinder块存储删除命令:
虚拟机上cinder磁盘挂载命令:
创建镜像命令:
***********************************************************************************
Ubuntu进入Recovery模式后,无法修改文件的问题
***********************************************************************************
查看连接命令
其他命令:
chmod o+x /var/lib/nova/instances
ly-controller:/ /var/lib/nova/instances nfs4 defaults 0 0
ls -ld /var/lib/nova/instances/
***********************************************************************************
1. 首先批量更改UID GID
find / -uid 117 -exec chown -h 120 '{}' \+
find / -gid 127 -exec chgrp -h 130 '{}' \+
***********************************************************************************
2. 修改NFS权限
gedit /etc/libvirt/qemu.conf
去掉user = "root"的注释
usermod -u 140 nova
groupmod -g 150 nova
***********************************************************************************
3. 运行迁移命令时遇到错误
Live Migration failure: operation failed: Failed to connect to remote libvirt URI qemu+tcp://ly-compute2/system: unable to connect to server at 'ly-compute2:16509': Connection refused
解决:
https://www.mirantis.com/blog/tutorial-openstack-live-migration-with-kvm-hypervisor-and-nfs-shared-storage/
迁移日志:
2014-12-21 05:13:19.668 2105 INFO nova.compute.manager [-] [instance: c2093336-f9fe-470c-aef6-e10e34e3eba8] VM Paused (Lifecycle Event)
2014-12-21 05:13:19.781 2105 INFO nova.compute.manager [-] [instance: c2093336-f9fe-470c-aef6-e10e34e3eba8] During sync_power_state the instance has a pending task (migrating). Skip.
2014-12-21 05:13:19.783 2105 INFO nova.compute.manager [-] [instance: c2093336-f9fe-470c-aef6-e10e34e3eba8] VM Paused (Lifecycle Event)
2014-12-21 05:13:19.854 2105 INFO nova.compute.manager [-] [instance: c2093336-f9fe-470c-aef6-e10e34e3eba8] During sync_power_state the instance has a pending task (migrating). Skip.
2014-12-21 05:13:22.307 2105 INFO nova.compute.manager [-] [instance: c2093336-f9fe-470c-aef6-e10e34e3eba8] VM Stopped (Lifecycle Event)
2014-12-21 05:13:22.314 2105 INFO nova.compute.manager [-] [instance: c2093336-f9fe-470c-aef6-e10e34e3eba8] _post_live_migration() is started..
2014-12-21 05:13:22.400 2105 INFO nova.compute.manager [-] [instance: c2093336-f9fe-470c-aef6-e10e34e3eba8] During sync_power_state the instance has a pending task (migrating). Skip.
2014-12-21 05:13:22.447 2105 WARNING nova.virt.libvirt.utils [-] systool is not installed
2014-12-21 05:13:22.493 2105 WARNING nova.virt.libvirt.utils [-] systool is not installed
2014-12-21 05:13:23.022 2105 INFO nova.compute.manager [-] [instance: c2093336-f9fe-470c-aef6-e10e34e3eba8] Migrating instance to ly-compute2 finished successfully.
2014-12-21 05:13:23.023 2105 INFO nova.compute.manager [-] [instance: c2093336-f9fe-470c-aef6-e10e34e3eba8] You may see the error "libvirt: QEMU error: Domain not found: no domain with matching name." This error can be safely ignored.
***********************************************************************************
迁移前查看命令:
nova list
nova service-list
nova-manage vm list
动态迁移命令:
nova live-migration test1 ly-compute2
nova live-migration test1 ly-compute1
调试命令:
import pydevd
pydevd.settrace('192.168.0.124', port=13768, stdoutToServer=True, stderrToServer=True)
指定配置文件运行compute:
/usr/bin/nova-compute --config-file=/etc/nova/nova.conf --config-file=/etc/nova/nova-compute.conf
重启nova服务命令:
service nova-api restart
service nova-compute restart
cinder块存储删除命令:
lvdisplay
ls /dev/cinder-volumes/
lvremove /dev/cinder-volumes/volume-63992eab-e922-4ede-9c86-cb33f1d0f60c
虚拟机上cinder磁盘挂载命令:
mkfs.ext4 /dev/vdb
mkdir–p /vol1
mount /dev/vdb /vol1
(可能会提示error:couldn't mount because of unsupported optional features(240) 不过不影响使用
创建镜像命令:
glance image-create --name cirros-0.3.0-i386 --disk-format vmdk --container-format bare --file /root/Desktop/cirros-0.3.0-i386-disk.vmdk --is-public True --is-protected False --progress
***********************************************************************************
Ubuntu进入Recovery模式后,无法修改文件的问题
mount -o remount rw /
注释掉/etc/fstab中的NFS配置命令
***********************************************************************************
查看连接命令
lsof -i