虚拟机元数据挂载方式改为cdrom方式

环境信息

Ubuntu14.04 操作系统,M 版本 OpenStack

1.获取所有计算节点

source  openrc && nova service-list  |grep -v conductor |grep compute |awk '{print$6}' > config_drive_compute.txt

2.把genisoimage安装包传输到每个计算节点

Centos 操作系统不需要装包

ansible -i  config_drive_compute.txt all -m copy -a  "src=/root/genisoimage_9%3a1.1.11-2ubuntu3_amd64.deb dest=/root/"

3.执行修改脚本

ansible -i config_drive_compute.txt all -m script -a "/root/han/reset_config_drive_format.sh"

脚本内容

#!/bin/bash
cp /etc/nova/nova.conf /etc/nova/nova.conf.reset_config_drive_format
sed -i "s/^.*config_drive_format.*$/config_drive_format=iso9660/" /etc/nova/nova.conf
dpkg -i genisoimage_9%3a1.1.11-2ubuntu3_amd64.deb
sleep 1
service nova-compute  restart
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。