firecracker icon indicating copy to clipboard operation
firecracker copied to clipboard

Cant Start microVM

Open andodeki opened this issue 1 year ago • 7 comments

I have followed the Getting started guide

https://github.com/firecracker-microvm/firecracker/blob/main/docs/getting-started.md to install Firecracker and Jailer in QEMU VM installed in MacBookPro11,1 Intel based Late 2012.

[After starting Firecracker in a separate terminal and starting a microVM in another i get an error {"fault_message":"Internal error while starting microVM: Failed to validate KVM support: Error creating KVM object. [No such file or directory (os error 2)]"} ]

To Reproduce

  1. https://github.com/firecracker-microvm/firecracker/blob/main/docs/getting-started.md#starting-firecracker
  2. Error : {"fault_message":"Internal error while starting microVM: Failed to validate KVM support: Error creating KVM object. [No such file or directory (os error 2)]"}
  3. added sudo to the firecracker command i got a different error when trying to start the microVM curl: (7) Failed to connect to localhost port 80 after 0 ms: Couldn't connect to server

Expected behaviour

to ssh into the microVM

Environment

Please supply the following information):

  • Firecracker version. $ firecracker --help | head -n1 Firecracker v1.4.1

  • Host and guest kernel versions. $ uname -r 6.2.0-33-generic

  • Rootfs used. https://github.com/firecracker-microvm/firecracker/blob/main/docs/getting-started.md#getting-a-rootfs-and-guest-kernel-image

  • Architecture. $ uname -m x86_64

  • Any other relevant software versions.

  • I installed Firecracker and jailer in a QEMU VM v8.1.1 in a MacBookPro11,1 Intel based Did not start jailer v1.4.1

Additional context

How has this bug affected you? I cant start the using the technology for the first time.

What are you trying to achieve? To install PosgtresDB in the VM and a server.

Do you have any idea of what the solution might be? Still not figured this out

Checks

  • [Yes] Have you searched the Firecracker Issues database for similar problems?
  • [Yes] Have you read the existing relevant Firecracker documentation?
  • [No] Are you certain the bug being reported is a Firecracker issue?

andodeki avatar Sep 25 '23 14:09 andodeki

Hi @andodeki ,

I think the issue is that nested virtualization is not enabled for QEMU guest you are running.

Could you please confirm the output of:

sudo dmesg | grep kvm

and

cat /sys/module/kvm_intel/parameters/nested

Could you also confirm if you followed this section to check if you have access to kvm? Ideally on Intel you should see :

kvm_intel 348160 0 kvm 970752 1 kvm_intel irqbypass 16384 1 kvm

If this is not the same as what you see then you'll need to follow QEMU documentation to enable nested virtualization before running Firecracker.

wearyzen avatar Sep 25 '23 18:09 wearyzen

Hi @sudanl0 I did check for lsmod | grep kvm

but it had no kvm_intel entry in the output

$ cat /sys/module/kvm_intel/parameters/nested cat: /sys/module/kvm_intel/parameters/nested: No such file or directory

andodeki avatar Sep 25 '23 21:09 andodeki

Ihave tried to enable Virtualisation now iget a different error atleast now the firecracker api is getting hit when itry to start the microVM. this is the error { "fault_message":"Logger initialization failure: The component is already initialized." } { "fault_message":"The kernel file cannot be opened: No such file or directory (os error 2)" } { "fault_message":"Invalid block device path: ./ubuntu-22.04.ext4" } { "fault_message":"Cannot start microvm without kernel configuration." }

andodeki avatar Sep 26 '23 12:09 andodeki

Hi @andodeki , thanks for the update. Could you try using absolute paths for the kernel and rootfs files and share the exact steps you tried?

Also, as a future reference for community members could you please share the steps you used to create qemu with virtualization enabled?

wearyzen avatar Sep 26 '23 16:09 wearyzen

I used absolute paths then the original error reappeared

I read somewhere to press the Cmd+Option+P+R at reboot for 20sec to activated Virtualization in MacOs but that is as far I got to solve the KVM error issue

andodeki avatar Sep 29 '23 15:09 andodeki

Hi @andodeki,

For KVM errors, could you please refer QEMU documentation to confirm if nested virtualization is working?

For the logger failure:

{"fault_message":"Logger initialization failure: The component is already initialized."} This error is harmless and is seen if you try to configure logger multiple times.

For the below error Firecracker looks for kernel and rootfs in cwd and fails to find them:

{
    "fault_message":"The kernel file cannot be opened: No such file or directory (os error 2)" 
}
{
    "fault_message":"Invalid block device path: ./ubuntu-22.04.ext4" 
}

I think we can narrow down the issue if you shared the exact steps you tried to run Firecracker and the path where the files are kept.

wearyzen avatar Oct 02 '23 12:10 wearyzen

Hi @andodeki, may we know if this is still an issue for you?

wearyzen avatar Apr 08 '24 09:04 wearyzen

Hi @andodeki, I hope you're doing well. We are closing this issue due to inactivity. Please feel free to reopen if you are still experiencing problems launching Firecracker, and can provide the information requested by @wearyzen.

roypat avatar Aug 12 '24 11:08 roypat