Issue
I am trying to install ubuntu in one of the qcow2 images I have created, using the below command
sudo qemu-system-x86_64 -enable-kvm -nographic -smp 8 -m 8G -cpu qemu64 -cdrom ubuntu-19.10-live-server-amd64.iso -boot d ubuntu-19.10-live-server-amd64.qcow2
First it spits out a warning, and then just hangs
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
SeaBIOS (version 1.13.0-1ubuntu1)
iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+BFF8C9F0+BFECC9F0 CA00
Booting from DVD/CD...
ISOLINUX 6.04 20190226 ETCD Copyright (C) 1994-2015 H. Peter Anvin et al
Loading bootlogo...
Initializing gfx code...
I have searched a lot and got a number of solutions and possible problems but none worked.
1) Have tried with Ubuntu 20 also, but same error.
2) VT-x not enabled.
It is enabled, lscpu shows
Virtualization: VT-x
Hypervisor vendor: KVM
Flags: .. vmx ..
3) Try with -cpu qemu64. Did not work
4) use qemu-system-i386 instead of qemu-system-x86_64. But that fails with a different error
This kernel requires an x86-64 CPU, but only detected an i686 CPU.
Unable to boot - please use a kernel appropriate for your CPU.
5) I did find out that the "SVM" CPU bit corresponds to "AMD Secure Virtual Machine", which confused me since my CPU is Haswell.
Help!
Solution
I found what the issue was.
While using nested virtualization, the option -cpu host works. This advises qemu to use the same cpu format as the host, which in our case is also a VM, and which mostly will be using the host CPU format too..
The above setting works,
unless; you are using nested virtualization over a virtualbox, and trying to run qemu on the VM. Then, to make this work, we have to skip enable-kvm and the -cpu option altogether. It does make the qemu VM run slow, but it works.
Answered By - Haris
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.