OpenStack Inject Password

OpenStack Inject Password

问题说明
在 OpenStack 的 nova.conf 配置 libvirt_inject_password 为 true,但是还是注入不了密码。于是解决了这个问题,记录下相关信息。
前提要求
  • 必须安装 libguestfs 相关包
  • 虚拟机的镜像必须是Linux的,而且需要有两个文件/etc/passwd, /etc/shadow
安装
  • CentOS

    yum install libguestfs python-libguestfs libguestfs-tools-c
    
  • Ubuntu

    apt-get install python-guestfs libguestfs-tools guestfish guestfsd
    
    update-guestfs-appliance
    
    chmod 0644 /boot/vmlinuz*
    
    usermod -a -G kvm root
    
  • Gentoo

    emerge libguestfs
    
配置
  • vim /etc/nova/nova.conf

    libvirt_inject_password = true
    
  • vim /etc/openstack-dashboard/local_settings.py

    OPENSTACK_HYPERVISOR_FEATURES = {
    	'can_set_mount_point': True,
        'can_set_password': True,
    }
    
重新启动
  • CentOS

    service openstack-nova-compute restart
    
  • Ubuntu

    /etc/init.d/nova-compute restart
    
0%