LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 06-03-2021, 05:24 PM   #1
marietto
Member
 
Registered: Aug 2010
Posts: 96

Rep: Reputation: 17
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 ?

Last edited by marietto; 06-03-2021 at 05:47 PM.
 
Old 06-04-2021, 02:21 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
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.
 
Old 06-05-2021, 02:00 AM   #3
marietto
Member
 
Registered: Aug 2010
Posts: 96

Original Poster
Rep: Reputation: 17
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.
 
Old 06-05-2021, 02:21 AM   #4
marietto
Member
 
Registered: Aug 2010
Posts: 96

Original Poster
Rep: Reputation: 17
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.
 
Old 06-05-2021, 02:47 AM   #5
marietto
Member
 
Registered: Aug 2010
Posts: 96

Original Poster
Rep: Reputation: 17
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.
 
Old 06-05-2021, 04:44 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Quote:
Originally Posted by marietto View Post
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.
 
Old 06-08-2021, 03:48 AM   #7
marietto
Member
 
Registered: Aug 2010
Posts: 96

Original Poster
Rep: Reputation: 17
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"
 
Old 06-08-2021, 05:35 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
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 …
 
Old 06-09-2021, 02:01 AM   #9
marietto
Member
 
Registered: Aug 2010
Posts: 96

Original Poster
Rep: Reputation: 17
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
 
Old 06-09-2021, 06:23 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
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.
 
Old 06-09-2021, 11:14 AM   #11
marietto
Member
 
Registered: Aug 2010
Posts: 96

Original Poster
Rep: Reputation: 17
coming back to the first question,It does not work because there is a bug :

https://gitlab.com/libvirt/libvirt/-/issues/177
 
Old 06-10-2021, 06:45 AM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Well, if you're saying the software is buggy, it looks like you've found the problem.
 
Old 06-11-2021, 05:10 AM   #13
marietto
Member
 
Registered: Aug 2010
Posts: 96

Original Poster
Rep: Reputation: 17
I'm not the one that told it. I'm not so experienced. And anyway,there isn't any fix,yet.
 
Old 06-11-2021, 06:23 AM   #14
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
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.
 
  


Reply

Tags
uefi bios, virt-install, virtual containers



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
init: execv(“/system/bin/init”) failed / No such file or directory / cyclic reboots while trying to virtualize android on my jetson nano marietto Linux - Virtualization and Cloud 3 04-05-2021 11:59 AM
LXer: Trimmed-down Jetson Nano module ships on $99 Linux dev kit LXer Syndicated Linux News 0 03-20-2019 12:10 AM
LXer: Nano-iTX carrier for Jetson TX2 offers mini-PCIe add-ons LXer Syndicated Linux News 0 04-15-2017 05:42 AM
difference between value *value and value * value PoleStar Linux - Newbie 1 11-26-2010 03:37 PM
Questions about enum. What would be a good use of enum? RHLinuxGUY Programming 5 06-11-2006 01:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 02:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration