Reputation: 1100
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)?
Upvotes: 10
Views: 35584
Reputation: 914
I had this problem, or something very similar. It gave the same warning and, while it would then boot, it was unusably slow.
I fixed it it by adding -machine ubuntu,accel=kvm
to the qemu-system-x86_64
command line.
Upvotes: 4
Reputation: 101
You missed out giving the RAM size to be used by the VM. The default RAM allocated by qemu is 128M, which in your case was not sufficient, I guess. Try passing
-m 512
Upvotes: 4
Reputation: 754
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.
Upvotes: 4