Difference between revisions of "Xen FAQ Console"

From Xen
(Moved questions that were in wrong category)
 
 
(6 intermediate revisions by 2 users not shown)
Line 6: Line 6:
 
hvc0 on pv_ops kernel). It's similar to setting up domU for serial console, you just need to change ttyS0 to hvc0. An example of domU setup that can use both xvc0 and vnc console is here : http://pastebin.com/f6a5022bf
 
hvc0 on pv_ops kernel). It's similar to setting up domU for serial console, you just need to change ttyS0 to hvc0. An example of domU setup that can use both xvc0 and vnc console is here : http://pastebin.com/f6a5022bf
   
=== How do I remove an active virtual machine? ===
+
=== How do I run xl console to an HVM DomU? ===
xm shutdown or xm delete
 
   
  +
By default "xl console" on an HVM guest will attach to the virtual serial port, but this requires <code>serial = "pty"</code> in your guest configuration file.
=== How do I run xm console to a WindowsXP DomU? ===
 
   
  +
This requires that your guest OS is configured to use the serial console (e.g. serial console for a Linux guest)
You can't xm console to that (I'm not sure you can xm console to any hvm, but I know you can't to
 
one that doesn't have a console).
+
=== How do I connect to or detach from a console? ===
  +
You can connect to a console directly when starting a domU:
   
  +
<pre><nowiki>
=== I start a new DomainU (Guest) and some text scrolls by for launching the guest but then it just sits there with Continue and no actions takes place? ===
 
  +
# xl create -c your-DomU-config
  +
</nowiki></pre>
   
  +
This command will start a domU and connect to it's console immediately.
The console for this new DomainU is not properly available for you; fix this by adding xtra="xencons=tty" in the configuration file. This will bring up a login screen directly for your new DomainU.
 
   
  +
If you want to connect to a domU console that is already running you can do so using the domain name:
=== One of our CentOS 5.3 randomly reboots, at different times of the day, and I can't see why it's doing it. I have looked through the logs, but don't see any thing in there that shows me why it has rebooted. How can I debug this? ===
 
   
  +
<pre><nowiki>
The problem is that when the box panics, it stops syslogd, so you don't get the panic output in /var/log. The best way to fix this is to setup a logging serial console.
 
  +
# xl console your-DomU-name
  +
</nowiki></pre>
  +
  +
Detach from a console depends on the system / keyboard layout.
  +
*Default: <CTRL> ']'
  +
*German keyboard :<CTRL> '5' (Works for Putty and gnome-terminal)
  +
*German keyboard (Mac): <CTRL> <ALT> '6'
  +
*Swedish keyboard (Mac with iTerm): <CTRL> 'å'
  +
  +
  +
  +
<!-- Leave this at the end -->
  +
== Where do I find more Console FAQs? ==
  +
See [[Xen_Common_Problems#Console|Xen Common Problems#Console]]
  +
  +
[[Category:Xen]]
  +
[[Category:FAQ]]
  +
[[Category:Users]]
  +
[[Category:Beginners]]

Latest revision as of 14:38, 14 October 2015

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.

If it's PV guest, you need to set up domU to use xen console (which is xvc0 on current xen version, hvc0 on pv_ops kernel). It's similar to setting up domU for serial console, you just need to change ttyS0 to hvc0. An example of domU setup that can use both xvc0 and vnc console is here : http://pastebin.com/f6a5022bf

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)

How do I connect to or detach from a console?

You can connect to a console directly when starting a domU:

# xl create -c your-DomU-config

This command will start a domU and connect to it's console immediately.

If you want to connect to a domU console that is already running you can do so using the domain name:

# xl console your-DomU-name

Detach from a console depends on the system / keyboard layout.

  • Default: <CTRL> ']'
  • German keyboard :<CTRL> '5' (Works for Putty and gnome-terminal)
  • German keyboard (Mac): <CTRL> <ALT> '6'
  • Swedish keyboard (Mac with iTerm): <CTRL> 'å'


Where do I find more Console FAQs?

See Xen Common Problems#Console