Unable to login to ubuntu vm created by DIB

Bug #1766228 reported by Esha Seth on 2018-04-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
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_USER_USERNAME=ubuntu DIB_DEV_USER_PASSWORD=passw0rd ./disk-image-create -a ppc64el -o ubuntu-xenial-vm5 -t raw -x vm ubuntu devuser openssh-server --logfile xenial.txt

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_USER_PWDLESS_SUDO=1 also in above command still ubuntu login/password appears and does not allow to proceed.

Attaching the log file

Esha Seth (eshaseth) wrote :
Ian Wienand (iwienand) wrote :

It looks to me that devuser has run correctly

---
2018-04-23 11:22:03.290 | ++ export DIB_DEV_USER_USERNAME=ubuntu
2018-04-23 11:22:03.290 | ++ DIB_DEV_USER_USERNAME=ubuntu
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_USER_PWDLESS_SUDO=
2018-04-23 11:22:03.290 | ++ DIB_DEV_USER_PWDLESS_SUDO=
2018-04-23 11:22:03.290 | ++ export DIB_DEV_USER_AUTHORIZED_KEYS=
2018-04-23 11:22:03.290 | ++ DIB_DEV_USER_AUTHORIZED_KEYS=
2018-04-23 11:22:03.290 | ++ export DIB_DEV_USER_PASSWORD=passw0rd
2018-04-23 11:22:03.290 | ++ DIB_DEV_USER_PASSWORD=passw0rd

...

2018-04-23 11:22:01.807 | dib-run-parts Running /tmp/in_target.d/install.d/50-devuser
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_target.d/devuser-ssh-authorized-keys ']'
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

Esha Seth (eshaseth) wrote :

using 'devuser' as the username worked and I can login via VNC console
but openssh-server even though installed , ssh does not work to and from the vm.
Even ipv4 address is not assigned.

Ian Wienand (iwienand) wrote :

I think this probably highlights that we should check if there is already a user with the same name, because that is confusing. I'm not sure about the network setup

Changed in diskimage-builder:
importance: Undecided → Low
status: New → Triaged
Ian Wienand (iwienand) wrote :

I'm actually not sure it is the username. Unfortunately my testing environment is broken (can't get to consoles in the vm's) so once that's fixed I'll try it again

Fix proposed to branch: master
Review: https://review.openstack.org/563860

Changed in diskimage-builder:
assignee: nobody → Ian Wienand (iwienand)
status: Triaged → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments