MAAS-CLI命令导入自定义镜像

我是研究僧i 提交于 2020-01-11 02:37:33

(1)建立key

生成api.key

PROFILE=admin
API_KEY_FILE=api.key (new file)
sudo maas-region apikey --username=$PROFILE > $API_KEY_FILE
cat api.key 
pyQKDDM8N2AnxqQ2yM:cNczRxF39sfRa2fCWB:D7vzzWe7XNCZZXbtc9FndDhTkdMvm4hk

(2)登录maas

 maas  login admin http://localhost:5240/MAAS/api/2.0
API key (leave empty for anonymous access):     ####这里输入上面生成的key
You are now logged in to the MAAS server at
http://localhost:5240/MAAS/api/2.0/ with the profile name 'admin'.
For help with the available commands, try:
  maas admin --help

(3)导入镜像

maas $username boot-resources create name=centos/centos6 title="CentOS-6" architecture=amd64/generic  content@=tarball.tgz  ##content@=后面接镜像路径

(4)导入的镜像位置

/var/lib/maas/boot-resources/current/centos/amd64/generic/centos6/uploaded/
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!