x86上安装diskimage-builder(二)

安装好python2.7

[root@host-10-10-18-131 ~]# ln -s /usr/bin/python2.7  /usr/bin/python
[root@host-10-10-18-131 ~]# ln -s /usr/bin/pip2.7  /usr/bin/pip
[root@host-10-10-18-131 ~]# pip install virtualenv
[root@host-10-10-18-131 ~]# mkdir dib-env
[root@host-10-10-18-131 ~]# virtualenv -p /usr/bin/python2.7 dib-env
created virtual environment CPython2.7.17.final.0-64 in 487ms
  creator CPython2Posix(dest=/root/dib-env, clear=False, global=False)
  seeder FromAppData(download=False, pip=bundle, wheel=bundle, setuptools=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv)
    added seed packages: pip==20.1.1, setuptools==44.1.1, wheel==0.34.2
  activators PythonActivator,CShellActivator,FishActivator,PowerShellActivator,BashActivator
[root@host-10-10-18-131 ~]# 
[root@host-10-10-18-131 ~]# source dib-env/bin/activate
(dib-env) [root@host-10-10-18-131 ~]# pip install diskimage-builder   -i https://mirrors.aliyun.com/pypi/simple/
(dib-env) [root@host-10-10-18-131 ~]# pip install ironic-python-agent-builder
(dib-env) [root@host-10-10-18-131 ~]# cd dib-env/
(dib-env) [root@host-10-10-18-131 dib-env]# find ./ -name ironic-python-agent-ramdisk
./share/ironic-python-agent-builder/dib/ironic-python-agent-ramdisk
(dib-env) [root@host-10-10-18-131 dib-env]# cd ./share/ironic-python-agent-builder/dib/
(dib-env) [root@host-10-10-18-131 dib]# pwd
/root/dib-env/share/ironic-python-agent-builder/dib
(dib-env) [root@host-10-10-18-131 dib]# cd -
/root/dib-env
(dib-env) [root@host-10-10-18-131 dib-env]# 
(dib-env) [root@host-10-10-18-131 dib-env]# export ELEMENTS_PATH=/root/dib-env/share/ironic-python-agent-builder/dib
(dib-env) [root@host-10-10-18-131 dib-env]# env DIB_DEBUG_TRACE=3 DIB_RELEASE=7  disk-image-create ironic-python-agent-ramdisk  centos  -o ironic-deploy -a x86_64

猜你喜欢

转载自www.cnblogs.com/dream397/p/13187717.html