I want to use QEMU
to debug my compiled kernel linux-4.13.4
on Ubuntu 16.04.3 LTS
I follow the following steps:
sudo apt-get install qemu
qemu-system-x86_64 -s -S -kernel /home/wxf/kernelSources/linux-4.13.4/arch/x86_64/boot/bzImage -initrd /boot/initrd.img-4.13.4
Note:
-s shorthand for -gdb tcp::1234
-S freeze CPU at startup (use 'c' to start execution)
But I get the following warning:
warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
The terminal stops there and I cannot input other commands.
The QEMU window pops up when I run it but it is stopped.
How to eliminate the warning and is it normal(since it is not an error information)?
Frankly speaking, I don't know how to handle that warning, can it be ignored or have you to do something with it. But I suppose the main problem is that you cannot run the VM. If so, you need to properly determine where to enter that c
to start the VM. :)
QEMU has several graphical interfaces (and AFAIK can even be run in plain console). Suppose we have identical defaults for which UI to use (probably, the GTK one). When I run similar command (qemu-system-x86_64 -s -S -kernel ...
), I can switch to the monitor console of QEMU by pressing Ctrl+Alt+2 (just 2, not F2). There I press c
(and Enter, it seems to behave like regular terminal) and then switch to the VM display by Ctrl+Alt+1.