I just wanna start a vm based on x86_64 via qemu, everything goes as expected(e.g. showing the console and login part) when I run the command below
qemu-system-x86_64 \
-nographic \
-smp 4 \
-kernel ~/Documents/linux-6.1.1/arch/x86_64/boot/bzImage \
-hda jammy_rootfs_ext4.img \
-m 4G \
-append "root=/dev/sda console=ttyS0 ignore_loglevel"
outcome:
Ubuntu 22.04.1 LTS x8664 ttyS0
x8664 login: sam
Password:
Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 6.1.1 x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
...
sam@x8664:~$
however the weirdest part comes when adding options -enable-kvm
to the command above, which looks like this
qemu-system-x86_64 \
-nographic \
-smp 4 \
-kernel ~/Documents/linux-6.1.1/arch/x86_64/boot/bzImage \
-hda jammy_rootfs_ext4.img \
-enable-kvm \
-cpu host \
-m 4G \
-append "root=/dev/sda console=ttyS0 ignore_loglevel"
then there was no output for half of an hour before killing qemu, but the top
tool showed the qemu-system-x86_64
task kept taking up the nearly full use of CPU during that time
the host is a virtual machine running on VirtualBox with Ubuntu Jammy Desktop, and the intel vt has been enabled shown by the command below
sudo kvm-ok
[sudo] password for qwer:
INFO: /dev/kvm exists
KVM acceleration can be used
Can anyone give some suggestion? Waiting any useful help!(cuz being tortured by this for weeks)