Troubleshooting: Difference between revisions

From Proxmox VE
Jump to navigation Jump to search
m (Created to lower FAQ page contents)
 
No edit summary
 
(16 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== I can't switch virtual consoles in Linux KVM guests with alt-F1, alt-F2... ==
== Switch novnc KVM console ==


I can't switch virtual consoles in Linux KVM guests with alt-F1, alt-F2...
VNC viewer does not pass some key combinations or they may be intercepted by your operating system.
VNC viewer does not pass some key combinations or they may be intercepted by your operating system.


Line 8: Line 9:


  sendkey alt-f3
  sendkey alt-f3


== How can I send sysrq to Linux KVM guests? ==
== How can I send sysrq to Linux KVM guests? ==
Line 27: Line 27:




== How can I access Linux guests through a serial console? ==
== How can I access Linux guests through a serial terminal ==
 
Sometimes, it is necessary to access the guest through a serial console:
* you lost network access to the guest and VNC is either too slow for you or don't have the features you need (i.e. easy copy/paste between other terminals)
* your guest freezes or kernel panics, you want to debug it, but it's impossible to capture all messages on VNC screen
* you are familiar with <code>xm console <guest></code> from Xen and you want to use a similar feature here
 
 
The necessary steps are:
* on Proxmox VE host, in guest's configuration file in <code>/etc/qemu-server/<VMID>.conf</code> add:
 
args: -serial unix:/var/run/qemu-server/<VMID>.serial,server,nowait
 
This will open console in <code>/var/run/qemu-server/<VMID>.serial</code> socket file, which can be accessed by minicom or other serial communication program.
 
An alternative is to add:
 
args: -serial tcp:localhost:6000,server,nowait
 
With this, you can connect to guest's serial console with telnet. Note that with telnet, any passwords will be visible on the screen.
 


* on guest, in /etc/inittab, look for lines similar to the ones below and make sure you have "ttyS0" there - this would be your serial console:
See [[Serial Terminal]]
 
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty ttyS0
 
If you want kernel messages to be shown on both serial and VGA consoles, you have to add a kernel parameter in your bootloader's configuration. For grub, it would be these "console" entries:
 
kernel (hd0,0)/boot/vmlinuz root=LABEL=guest-root console=ttyS0 console=tty0
 
 
To access the guest from minicom, configure it to use a path such as <code>unix#/var/run/qemu-server/<VMID>.serial</code> in "cOnfigure Minicom -> Serial port setup -> Serial Device".
 
 
To use multiple minicom configurations for several guests, create a file like /etc/minicom/minirc.someguest for each of your guests, with contents:
 
pu port            unix#/var/run/qemu-server/<VMID>.serial
pu minit
pu mreset
 
 
Then, start the console with:
 
minicom someguest
 
 
See also http://www.proxmox.com/forum/showthread.php?p=5615


==  How can I assign a physical disk to a VM? ==
==  How can I assign a physical disk to a VM? ==
Line 89: Line 44:


==  How can I assign a physical disk to a CT? ==
==  How can I assign a physical disk to a CT? ==
{{Note|Article about the stable Proxmox VE 4.x releases}}
See [[Linux_Container#pct_container_storage|Linux_Container]]
{{Note|Article about the old stable Proxmox VE 3.x releases}}
See http://wiki.openvz.org/Bind_mounts
See http://wiki.openvz.org/Bind_mounts


Line 97: Line 59:


== NFS Client Mount Error: "mount.nfs: No such device" ==
== NFS Client Mount Error: "mount.nfs: No such device" ==
{{Note|Article about the old stable Proxmox VE 3.x releases}}
By default NFS cannot be mounted in VZ containers. See this page to set-it-up: [http://wiki.openvz.org/NFS OpenVZ: NFS]
By default NFS cannot be mounted in VZ containers. See this page to set-it-up: [http://wiki.openvz.org/NFS OpenVZ: NFS]
See also this page to make an host's directory visible to a container: [http://wiki.openvz.org/Bind_mounts OpenVZ: Bind mounts]
See also this page to make an host's directory visible to a container: [http://wiki.openvz.org/Bind_mounts OpenVZ: Bind mounts]


== See also ==
[[Category:Troubleshooting]]
* [[:Category:Troubleshooting]]
* [[:Category:HOWTO]]

Latest revision as of 13:15, 28 November 2016

Switch novnc KVM console

I can't switch virtual consoles in Linux KVM guests with alt-F1, alt-F2... VNC viewer does not pass some key combinations or they may be intercepted by your operating system.

To send custom key combinations to the guest, go to "Monitor" in Virtual Machine Configuration for a given guest and use "sendkey" command.

For example, to switch to the third console (tty3) you would use:

sendkey alt-f3

How can I send sysrq to Linux KVM guests?

Similarly to the above, go to "Monitor" in Virtual Machine Configuration for a given guest and use "sendkey" command.

For example, to issue "Emergency Sync", you would use:

sendkey alt-sysrq-s

In the VNC viewer for the given guest you should see:

SysRq : Emergency Sync

You should also see this entry if you run "dmesg" on this guest.

See also http://en.wikipedia.org/wiki/Magic_SysRq_key for a full reference of possible combinations.


How can I access Linux guests through a serial terminal

See Serial Terminal

How can I assign a physical disk to a VM?

You don't have to do anything at host level (i.e. not add to fstab or anything), just set is as available directly to the KVM guest:

qm set <vmid> -ide# /dev/sdb

Or:

qm set <vmid> -ide# /dev/disk/by-id/[your disk ID]

...since having the drive letter change (should you add a drive) might have unintended consequences.

Also see /etc/qemu-server/<vmid>.conf if you want to add it editing the conf file by hand (i.e. adding ide1: /dev/sdb2). After that you can run the VM as usual, and you will have the new storage device available inside it. Beware that you can't assign it to more than one running VM if the filesystem is not designed for such scenario.

How can I assign a physical disk to a CT?

Yellowpin.svg Note: Article about the stable Proxmox VE 4.x releases

See Linux_Container

Yellowpin.svg Note: Article about the old stable Proxmox VE 3.x releases

See http://wiki.openvz.org/Bind_mounts

"error: out of partition" after a fresh install

The error message below may happens when you had two or more harddrives connected during the installation. Try to disconnect all but one disk.

error: out of partition.
grub rescue>

NFS Client Mount Error: "mount.nfs: No such device"

Yellowpin.svg Note: Article about the old stable Proxmox VE 3.x releases

By default NFS cannot be mounted in VZ containers. See this page to set-it-up: OpenVZ: NFS See also this page to make an host's directory visible to a container: OpenVZ: Bind mounts