-serial there maps to hvc consoles.
The first is always the normal boot console and that is fine as it eventually is a login console.
But the root console on ttyS1 socket is not set up correctly.
The second -serial argument that autopkgtest adds is mapped to hvc1 by the guest.
That and the fact that the setup commands did not run correctly renders it useless.
To get it working let the guest spawn a root console on hvc1 and autpkgtest will works there:
To do so I went into the base image:
$ sudo kvm -m 2048 -smp 4 -nographic -net nic,model=virtio -net user,hostfwd=tcp::10022-:22 -drive file=/home/ubuntu/cpaelzer/adt-zesty-ppc64el-cloud.img,cache=unsafe,if=virtio,index=0
There I placed a modified version of the autpkgtest.service file (hvc1 instead of ttyS1)
[Unit]
Description=autopkgtest root shell on hvc1
ConditionPathExists=/dev/hvc1
I hit the same - or very very similar - on ppc64el today.
After a: ubuntu- cloud -a ppc64el -r zesty -s 20G -m http:// ports.ubuntu. com/ubuntu- ports
adt-buildvm-
Things are not working.
-serial there maps to hvc consoles.
The first is always the normal boot console and that is fine as it eventually is a login console.
But the root console on ttyS1 socket is not set up correctly.
The second -serial argument that autopkgtest adds is mapped to hvc1 by the guest.
That and the fact that the setup commands did not run correctly renders it useless.
To get it working let the guest spawn a root console on hvc1 and autpkgtest will works there: tcp::10022- :22 -drive file=/home/ ubuntu/ cpaelzer/ adt-zesty- ppc64el- cloud.img, cache=unsafe, if=virtio, index=0
To do so I went into the base image:
$ sudo kvm -m 2048 -smp 4 -nographic -net nic,model=virtio -net user,hostfwd=
There I placed a modified version of the autpkgtest.service file (hvc1 instead of ttyS1) autopkgtest root shell on hvc1 ists=/dev/ hvc1
[Unit]
Description=
ConditionPathEx
[Service] tty-fail
ExecStart=/bin/sh
StandardInput=
StandardOutput=tty
StandardError=tty
TTYPath=/dev/hvc1
SendSIGHUP=yes
# ignore I/O errors on unusable hvc1
SuccessExitStatus=0 208 SIGHUP SIGINT SIGTERM SIGPIPE
[Install] multi-user. target
WantedBy=
And finally I had to explicitly enable it in this case:
$ systemctl enable autopkgtest
When reproducing with the double -serial arg set in direct invocation I could confirm that htere is now a /bin/sh spawned on hvc1
After shutting down from that autopkgtest worked on ppc64el