LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   ERROR internal error: Unexpected enum value 0 for virDomainDeviceAddressType trying to emulate raspberry pi 3 on the jetson nano (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/error-internal-error-unexpected-enum-value-0-for-virdomaindeviceaddresstype-trying-to-emulate-raspberry-pi-3-on-the-jetson-nano-4175695980/)

marietto 06-03-2021 05:24 PM

ERROR internal error: Unexpected enum value 0 for virDomainDeviceAddressType trying to emulate raspberry pi 3 on the jetson nano
 
Hello.

it's more of a challenge,to be able to emulate the raspberry pi 3 on my Jetson nano (aarch64) using virt-install. I'm learning how to do that by reading heavily here :

https://github.com/dhruvvyas90/qemu-rpi-kernel

I tried to do something like this :

Code:

virt-install
--name pi \
--machine raspi3 \
--cpu arm1176 \
--memory 1024 \
--import \
--disk /root/Desktop/zi/Work/Android/Raspy/Debian/2019-09-26-raspbian-buster-lite.img,format=raw,bus=virtio \
--network user,model=virtio \
--video vga \
--graphics spice \
--rng device=/dev/urandom,model=virtio \
--boot 'uefi=RPI_EFI.fd,dtb=bcm2710-rpi-3-b-plus.dtb,kernel=kernel8.img,kernel_args=root=/dev/vda2 rootwait panic=1 dwc_otg.fiq_fsm_enable=0'\
--events on_reboot=destroy


But I get this error :


ERROR internal error: Unexpected enum value 0 for virDomainDeviceAddressType


I've got the UEFI BIOS file from here :


https://github.com/andreiw/Raspberry...ASE/RPI_EFI.fd


I'm not sure if it isn't the right efi file to use in this specific configuration or if it is,but I'm passing the parameter badly. What do you suggest me to do ?

business_kid 06-04-2021 02:21 PM

That isn't a general error, that's a software problem and a very specific error. I expect that level of detail will go once the bugs are ironed out nof virt-install.

What does google say?

Keep reading on github, keep trying stuff if you want, because a jetson nano is not an rpi 3. Frankly we don't have a clue because we have no useful information to go on - not even a link to the jetson nano.

marietto 06-05-2021 02:00 AM

me too. I don't know where I can look for specific help. I doubt that the folks at the jetson nano forum can help.

marietto 06-05-2021 02:21 AM

is there a way to reach the same goal without using virt-install ? I'm not tied to it. This is the part that gets my interest :

--network user,model=virtio

because at the moment,the only supported network interface seems to be this :

nic="-netdev user,id=net0,hostfwd=tcp::5022-:22 -device usb-net,netdev=net0"

that I don't like.

marietto 06-05-2021 02:47 AM

It's odd anyway,because if I remove the uefi parameter,like this :

--boot 'dtb=bcm2710-rpi-3-b-plus.dtb,kernel=kernel8.img,kernel_args=root=/dev/vda2 rootwait panic=1 dwc_otg.fiq_fsm_enable=0'

it says that it needs uefi :

ERROR unsupported configuration: ACPI requires UEFI on this architecture Domain installation does not appear to have been successful.

business_kid 06-05-2021 04:44 AM

Quote:

Originally Posted by marietto (Post 6256533)
me too. I don't know where I can look for specific help. I doubt that the folks at the jetson nano forum can help.

I'd try them. I'd suggest to keep on asking & reading. You're trying to do the improbable. It possibly may work. Knock yourself out.

marietto 06-08-2021 03:48 AM

I tried this configuration :

qemu-system-aarch64 \
--machine virt \
--cpu cortex-a57 \
--m 1024 \
--drive file=/var/www/html/2019-09-26-raspbian-buster-lite.img,format=raw \
--device virtio-net-device,netdev=mynet \
--netdev tap,id=mynet,ifname=tap0,script=no,downscript=no,vhost=on \
--kernel kernel8.img \
--append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootwait panic=1 dwc_otg.fiq_fsm_enable=0" \
--no-reboot \
--display sdl \
--serial mon:stdio

but it freezes on "Waiting for root device /dev/mmcblk0p2"

business_kid 06-08-2021 05:35 AM

Translating that, it's got grub or something, and it's trying to read the second partition on some MMC card, but it's waiting …

marietto 06-09-2021 02:01 AM

The raspberry pi board model in QEMU does not support virtio, because it is a model of the real raspi hardware, which does not have a PCI bus that you could plug a virtio device into. If you don't care about modelling the actual hardware and just need "arm linux", use the virt board. If you do care about using the actual hardware, then you have to live with the limitations of the actual hardware, I'm afraid. – Peter Maydell 2 days ago

When I run the VM on top of the host os like this it is able to boot :

qemu-system-aarch64 \
--machine raspi3 \
--cpu arm1176 \
--m 1024 \
--drive file=/var/www/html/2019-09-26-raspbian-buster-lite.img,format=raw \
--netdev user,id=net0,hostfwd=tcp::5022-:22 -device usb-net,netdev=net0 \
--dtb bcm2710-rpi-3-b-plus.dtb \
--kernel kernel8.img \
--append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootwait panic=1 dwc_otg.fiq_fsm_enable=0" \
--no-reboot \
--display none \
--serial mon:stdio

As Peter Maydell said the only network interface supported with the raspi 3 machine is the one that I have used : --netdev user,id=net0,hostfwd=tcp::5022-:22 -device usb-net,netdev=net0 because the raspi 3 has no pci and no virtio devices. But anyway,when the raspbian image is loaded,I see only the lo interface and I get these error messages :

root@raspberrypi:/home/pi# ifconfig eth0
eth0: error fetching interface information: Device not found

root@raspberrypi:/home/pi# ifup eth0
ifup: unknown interface eth0

business_kid 06-09-2021 06:23 AM

You can debug that with the usual techniques
  1. lspci output - get the hex number
  2. modules
  3. firmware
  4. maybe kernel config

At least trace the problem - it will be easier to fix then.

marietto 06-09-2021 11:14 AM

coming back to the first question,It does not work because there is a bug :

https://gitlab.com/libvirt/libvirt/-/issues/177

business_kid 06-10-2021 06:45 AM

Well, if you're saying the software is buggy, it looks like you've found the problem.

marietto 06-11-2021 05:10 AM

I'm not the one that told it. I'm not so experienced. And anyway,there isn't any fix,yet.

business_kid 06-11-2021 06:23 AM

When there's a patch, a new version will probably come out, or some new option to work around it. OSS is quick to fix these usually.


All times are GMT -5. The time now is 02:41 AM.