Unable to login to ubuntu vm created by DIB
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
diskimage-builder |
In Progress
|
Low
|
Ian Wienand |
Bug Description
I am using following command to generate a RAW image filefor Ubuntu xenial via DIB:
/dib/env/bin$ sudo DIB_RELEASE=xenial DIB_DEV_
Although the image gets created as.raw and has a .d with the element values etc, but I am unable to login to the vm deployed using this image by nova boot and passing the network ip address etc.
I copy the .raw image to a disk volume, import it in myprivate cloud env on openstack, in glance then create image with it and deploy the vm with this image specifying ip address , network etc.
However when I try to ssh or VNC access this vm then it does not accept ubuntu/passw0rd as valid creds. Hence I am unable to get inside the vm and do further processing.
I have tried the DIB_DEV_
Attaching the log file
It looks to me that devuser has run correctly
--- USER_USERNAME= ubuntu USER_USERNAME= ubuntu USER_PWDLESS_ SUDO= USER_PWDLESS_ SUDO= USER_AUTHORIZED _KEYS= USER_AUTHORIZED _KEYS= USER_PASSWORD= passw0rd USER_PASSWORD= passw0rd
2018-04-23 11:22:03.290 | ++ export DIB_DEV_
2018-04-23 11:22:03.290 | ++ DIB_DEV_
2018-04-23 11:22:03.290 | ++ export DIB_DEV_USER_SHELL=
2018-04-23 11:22:03.290 | ++ DIB_DEV_USER_SHELL=
2018-04-23 11:22:03.290 | ++ export DIB_DEV_
2018-04-23 11:22:03.290 | ++ DIB_DEV_
2018-04-23 11:22:03.290 | ++ export DIB_DEV_
2018-04-23 11:22:03.290 | ++ DIB_DEV_
2018-04-23 11:22:03.290 | ++ export DIB_DEV_
2018-04-23 11:22:03.290 | ++ DIB_DEV_
...
2018-04-23 11:22:01.807 | dib-run-parts Running /tmp/in_ target. d/install. d/50-devuser target. d/devuser- ssh-authorized- keys ']'
2018-04-23 11:22:01.808 | + set -eu
2018-04-23 11:22:01.808 | + set -o pipefail
2018-04-23 11:22:01.809 | + user_shell_args=
2018-04-23 11:22:01.809 | + '[' -n '' ']'
2018-04-23 11:22:01.809 | + useradd -m ubuntu
2018-04-23 11:22:01.815 | + set +x
2018-04-23 11:22:01.815 | Setting password.
2018-04-23 11:22:01.824 | + '[' -n '' ']'
2018-04-23 11:22:01.824 | + '[' -f /tmp/in_
2018-04-23 11:22:01.824 | + chown -R ubuntu:ubuntu /home/ubuntu
2018-04-23 11:22:01.829 | dib-run-parts 50-devuser completed
---
The only thing I can think here is that when using the ubuntu cloud image, there is probably already an ubuntu user; possibly this only allows ssh based login?
I would try setting DIB_DEV_ USER_USERNAME to "devuser" instead of ubuntu as a first guess