TLDR: it appears that serial console output might be needed for Rump kernels on 
EC2 HVM. Nothing I have done has managed to get a Rump kernel to display EC2 
System Log messages from an HVM instance.


Martin says "Regarding EC2 HVM, that shouldn't *require* you to use a serial 
console, after all you can boot Windows on it which most definitely requires 
VGA?”. At first glance this sounds 100% right to me but now I’m not so sure….

I haven’t yet found a definitive statement on this but there seems to be 
anecdotal evidence that EC2 HVM does not display VGA text mode console output, 
although I have some questions about whether this is entirely correct.

************What is Amazon EC2Config?
It appears that Windows machines run the Amazon EC2Config service which does 
many things, one of which is to write message to the EC2 System Console. Refer 
here for info:
http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/UsingConfig_WinAMI.html
• Write event log entries to the console to help with troubleshooting (this 
task is disabled by default and must be enabled in order to run at instance 
start).
• Write to the console that Windows is ready.

That seems to suggest maybe EC2 isn’t displaying the Windows VGA display in its 
log.

************What does the Xen project say?
The Xen project has a couple of pages that don’t outright say that VGA is not 
used for the console, but do instuct to use serial port for console.

http://wiki.xenproject.org/wiki/Xen_FAQ_Console
I have an Xen image that was built for a graphical console (VNC). Is there any 
way to change it to the non-graphical console (xen console)?
For HVM guest, you need to enable serial port on domU config file (example 
here: http://pastebin.com/fb6fe631), and setup domU to use serial port (ttyS0 
on Linux) by modifying (for Linux domU) /boot/grub/menu.lst, /etc/inittab, and 
/etc/securetty.
How do I run xl console to an HVM DomU?
By default "xl console" on an HVM guest will attach to the virtual serial port, 
but this requires serial = "pty" in your guest configuration file.
This requires that your guest OS is configured to use the serial console (e.g. 
serial console for a Linux guest)

http://wiki.xenproject.org/wiki/Xen_Common_Problems#Console
Can I set up Xen HVM Linux guest to display the kernel boot messages on "xl 
console" ?
Yes, you can. You need to add this line to the "/etc/xen/<hvmguest>" 
configuration file in dom0:
serial='pty'
And then in the HVM guest grub.conf (inside the HVM VM) configure kernel 
logging to the (virtual) serial port like this:
etc etc….

Just as an FYI there was some good console info here:
http://www-archive.xenproject.org/files/xensummit_4/xensummit_linux_console_slides.pdf


************What does Amazon say?
However these two page says something that contradicts the assertion that VGA 
output is not displayed:
http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-GetConsoleOutput.html
"For Linux instances, the instance console output displays the exact console 
output that would normally be displayed on a physical monitor attached to a 
computer. This output is buffered because the instance produces it and then 
posts it to a store where the instance's owner can retrieve it.
For Windows instances, the instance console output includes output from the 
EC2Config service."

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html
"For Linux/Unix instances, the instance console output displays the exact 
console output that would normally be displayed on a physical monitor attached 
to a computer. This output is buffered because the instance produces it and 
then posts it to a store where the instance's owner can retrieve it."
“For Windows instances, the instance console output displays the last three 
system event log errors.” 

************What do random people on the Internet say?
https://lists.projectatomic.io/projectatomic-archives/atomic-devel/2014-July/msg00019.html
Everything I've found in random blog posts suggests that the correct console 
device for HVM images in EC2 is ttyS0, but tty0 is the one I have listed last, 
and I'm getting cloud-init output.  I am more certain that hvc0 is *not* the 
right device, since attempts to write to it under HVM return “No such device or 
address".

https://forums.aws.amazon.com/thread.jspa?messageID=553638 
"Add (or replace console=*) console=ttyS0 to kernel line"

https://github.com/andsens/bootstrap-vz/issues/136 
("The console on HVM images needs to be set to ttyS0.” 



Out of interest I booted a Windows HVM machine and here is the output of its 
EC2 System Log:

2015/09/17 01:38:05Z: EC2ConfigMonitorState: 0
2015/09/17 01:38:06Z: Windows sysprep configuration complete.
2015/09/17 01:38:10Z: AMI Origin Version: 2015.08.12
2015/09/17 01:38:10Z: AMI Origin Name: 
Windows_Server-2008-SP2-English-64Bit-Base
2015/09/17 01:38:10Z: OS: Microsoft Windows NT 6.0.6002
2015/09/17 01:38:10Z: OsVersion: 6.0
2015/09/17 01:38:10Z: OsProductName: Windows Server (R) 2008 Datacenter
2015/09/17 01:38:10Z: OsBuildLabEx: 6002.23762.amd64fre.vistasp2_ldr.150721-0605
2015/09/17 01:38:10Z: Language: en-US
2015/09/17 01:38:10Z: EC2 Agent: Ec2Config service v3.8.294
2015/09/17 01:38:17Z: Driver: Citrix PV Ethernet Adapter v5.9.960.49119
2015/09/17 01:38:17Z: Driver: Citrix PV SCSI Host Adapter v6.0.2.56921
2015/09/17 01:38:18Z: Message: Waiting for meta-data accessibility...
2015/09/17 01:38:20Z: Message: Meta-data is now available.
2015/09/17 01:38:23Z: AMI-ID: ami-43e21c07
2015/09/17 01:38:23Z: Instance-ID: i-2a4c8b98
2015/09/17 01:38:24Z: Ec2SetPassword: Enabled
2015/09/17 01:38:24Z: RDPCERTIFICATE-SUBJECTNAME: WIN-E7UK0XVPQ00
2015/09/17 01:38:24Z: RDPCERTIFICATE-THUMBPRINT: 
EE9417809EBCF123C80D6F2C4721A91558073E89
2015/09/17 01:38:25Z: Username: Administrator

2015/09/17 01:38:34Z: Message: Windows is Ready to use


Reply via email to