[kata-dev] Regarding, Kata 2.0.0, kata-runtime, qemu OVMF

Christophe de Dinechin cdupontd at redhat.com
Tue Jan 5 19:24:45 UTC 2021



> On 5 Jan 2021, at 17:21, Gupta, Sandeep <Sandeep.Gupta at amd.com> wrote:
> 
> [AMD Official Use Only - Internal Distribution Only]
> 
> Hi Developers,
> One more please - for Kata 2.0.0, kata-runtime, qemu OVMF
> 
> In /etc/kata-containers/configuration.toml --
> 
> ======
> # WARNING: - any parameter specified here will take priority over the default
> # parameter value of the same name used to start the virtual machine.
> # Do not set values here unless you understand the impact of doing so as you
> # may stop the virtual machine from booting.
> # To see the list of default parameters, enable hypervisor debug, create a
> # container and look for 'default-kernel-parameters' log entries.
> kernel_params = " root=/dev/vda1 rootflags=data=ordered,errors=remount-ro agent.log=debug initcall_debug"
> 
> # Path to the firmware.
> # If you want that qemu uses the default firmware leave this option empty
> #firmware = "/usr/local/share/qemu/OVMF_CODE.fd.kata"
> firmware = ""
> ==========
> 
> If I use the default firmware - I get correct results :
> 
> # ctr run --runtime io.containerd.run.kata.v2 -t --rm docker.io/library/busybox:latest sh
> / #
> / # uname -a
> Linux sandeepg-ubuntu 5.6.0-sev-sev-es-5.6-v3.container #3 SMP Tue Nov 3 06:38:40 UTC 2020 x86_64 GNU/Linux
> / #
> 
> # ps -eaf | grep -i qemu
> 
> root      360867       1  0 15:56 ?        00:00:01 /usr/local/bin/qemu-system-x86_64 -name sandbox-sh -uuid 72820914-dcce-4cea-a01f-3cf9851d136d -machine q35,accel=kvm,kernel_irqchip -cpu host,pmu=off -qmp unix:/run/vc/vm/sh/qmp.sock,server,nowait -m 2048M,slots=10,maxmem=129755M -device pci-bridge,bus=pcie.0,id=pci-bridge-0,chassis_nr=1,shpc=on,addr=2,romfile= -device virtio-serial-pci,disable-modern=false,id=serial0,romfile= -device virtconsole,chardev=charconsole0,id=console0 -chardev socket,id=charconsole0,path=/run/vc/vm/sh/console.sock,server,nowait -device virtio-scsi-pci,id=scsi0,disable-modern=false,romfile= -object rng-random,id=rng0,filename=/dev/urandom -device virtio-rng-pci,rng=rng0,romfile= -device vhost-vsock-pci,disable-modern=false,vhostfd=3,id=vsock-1189071429,guest-cid=1189071429,romfile= -device virtio-9p-pci,disable-modern=false,fsdev=extra-9p-kataShared,mount_tag=kataShared,romfile= -fsdev local,id=extra-9p-kataShared,path=/run/kata-containers/shared/sandboxes/sh/shared,security_model=none,multidevs=remap -rtc base=utc,driftfix=slew,clock=host -global kvm-pit.lost_tick_policy=discard -vga none -no-user-config -nodefaults -nographic --no-reboot -daemonize -object memory-backend-ram,id=dimm1,size=2048M -numa node,memdev=dimm1 -kernel /usr/share/kata-containers/vmlinuz-sev-es-5.6-v3.container -initrd /usr/share/kata-containers/kata-containers-initrd.img -append tsc=reliable no_timer_check rcupdate.rcu_expedited=1 i8042.direct=1 i8042.dumbkbd=1 i8042.nopnp=1 i8042.noaux=1 noreplace-smp reboot=k console=hvc0 console=hvc1 cryptomgr.notests net.ifnames=0 pci=lastbus=0 quiet panic=1 nr_cpus=240 scsi_mod.scan=none root=/dev/vda1 rootflags=data=ordered,errors=remount-ro agent.log=debug initcall_debug -pidfile /run/vc/vm/sh/pid -smp 1,cores=1,threads=1,sockets=240,maxcpus=240
> root      360966  360958  0 16:05 pts/2    00:00:00 grep --color=auto -i qemu
> 
> 
> But if I use :   firmware = "/usr/local/share/qemu/OVMF_CODE.fd.kata"
> I get Error:
> 
> # ctr run --runtime io.containerd.run.kata.v2 -t --rm docker.io/library/busybox:latest s
> ctr: failed to launch qemu: exit status 1, error messages from qemu log: qemu: could not load PC BIOS '/usr/local/share/qemu/OVMF_CODE.fd.kata'
> : unknown
> 
> Any suggestions please.

I did a quick look. The runtime apparently uses the -bios option when the firmware option is passed, not the -drive option as I thought it would. I'm not entirely sure you can boot OVMF that way. I don't have any idea at the moment why it worked with version 1.x. If you could share with me the 1.x qemu command line option with the firmware option, I'm curious to see what it is.

Thanks
Christophe

> 
> --Thanking You
> --Sandeep
> 
> _______________________________________________
> kata-dev mailing list
> kata-dev at lists.katacontainers.io
> http://lists.katacontainers.io/cgi-bin/mailman/listinfo/kata-dev




More information about the kata-dev mailing list