Introduction:
After having had some stability problems, with running Xen DOMUs under Ubuntu 16.04/Xen 4.6, I decided to upgrade to Ubuntu 16.10/Xen 4.7.
Unfortunately, as I tried to start any of the DOMUs with the option -c to see the console content, the following error message was displayed and I got kicked out and no console.
xenconsole: Could not read tty from store: Success
I searched for hours in the Internet to find a solution. This morning I found an article where the version of Xen was much earlier but the problem was the same.
Cause:
The daemon xenconsoled was not running. Loading this daemon beforehand seems to have solved this issue, which got me in real trouble with my clients screaming against such long downtime of the servers. For some reason the DOMUs just hung as well.
Solution:
Start the daemon with the command:
/usr/lib/xen-4.7/bin/xenconsoled --pid-file=/var/run/xenconsoled.pid
Note:
You can make sure that this daemon will start automatically by using one of the following 2 methods:
Start the daemon using the @reboot cron job as follows:
crontab -e
Content:
@reboot /bin/sleep 15; /usr/lib/xen-4.7/bin/xenconsoled
OR
Start the daemon using Systemd start method.
touch /etc/systemd/system/xenconsoled.service
vim /etc/systemd/system/xenconsoled.service
Content of xenconsoled.service
[Unit]
Description=Xen Console Daemon service
[Service]
Type=forking
ExecStart=/usr/lib/xen-4.7/bin/xenconsoled --pid-file=/var/run/xenconsoled.pid
ExecStop=/usr/bin/killall xenconsoled
Restart=on-failure
RestartSec=3
[Install]
WantedBy=default.target
Execute those commands to register the service for boot start and start it now manually.
systemctl enable xenconsoled
systemctl daemon-reload
service xenconsoled start