Re: [GSOC][NEWBIE]

Jamgadepatil Shivraj Shashikant <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <MAZPR01MB6846CE4CD66E672155B54A28F83A2@MAZPR01MB6846.INDPRD01.PROD.OUTLOOK.COM>
Hello iMil,
Thanks a lot for the help. I was able to set up the qemu VM following the commands you specified.
Once again thanks a lot for your help.

Thanking you,
Shivraj

________________________________
From: Emile 'iMil' Heitor <[email protected]>
Sent: Thursday, March 28, 2024 10:23 PM
To: Jamgadepatil Shivraj Shashikant <[email protected]>; [email protected] <[email protected]>
Subject: Re: [GSOC][NEWBIE]

External Email


On 3/28/24 17:44, Jamgadepatil Shivraj Shashikant wrote:

> I even tried gziped kernel image stored in releasedir directory, so I
> guess it's not only PVH boot that was causing the problem. I suspected I
> might have built the kernel incorrectly, so I also tried booting from
> the daily kernel build provided on the github but the kvm error persists.
> qemu command I am using for booting the system is: qemu-system-x86_64 -m
> 2048 -kernel netbsd-GENERIC.gz -drive
> if=virtio,file=disk.qcow2,format=qcow2 -enable-kvm

Don't gzip the kernel, here's an example session:

$ git branch
* perf
$ ./build.sh -U -u -j4 -T obj/tooldir -m amd64 tools
$ ./build.sh -U -u -j4 -T obj/tooldir -m amd64 kernel=MICROVM
$ KERNEL=sys/arch/amd64/compile/obj/MICROVM/netbsd
$ IMG=NetBSD-10.99.10-amd64-live.img # fetch and gunzip this from
https://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/202403200640Z/images/NetBSD-10.99.
10-amd64-live.img.gz
$ qemu-system-x86_64 \
         -M microvm,x-option-roms=off,rtc=on,acpi=off,pic=off \
         -enable-kvm -m 512 -cpu host,+invtsc \
         -append "root=ld0a console=com rw -v" -display none \
         -device virtio-blk-device,drive=hd0 \
         -drive file=${IMG},format=raw,id=hd0 \
         -netdev user,id=net0,hostfwd=tcp::10022-:22 \
         -device virtio-net-device,netdev=net0 \
         -kernel ${KERNEL} -serial mon:stdio

FYI I'll be mostly AFK till next Tuesday.

Cheers,

--
------------------------------------------------------------------------
Emile `iMil' Heitor <imil@{home.imil.net,NetBSD.org}> | https://imil.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.