lanefu 346 Posted May 27 Share Posted May 27 (edited) Been dreaming of this one for a while. Finally got a weekend to focus on it recently. I'm hoping someone is eager to take what I've done and move It along some more. Here's what we have so far. * a linux 'family' called virtual.conf * a kernel config called linux-virtual-current.config * a board called virtual-qemu.wip The result is a full HVM accelerated armbian image with a kernel compiled with all the virtio drivers for disk, network and video. Also a u-boot.bin made for qemu that can boot the image when used as the qemu bios/firmware I've ran it as a VM on ubuntu using plain qemu on a Ampere eMag box.. and using UTM (qemu) on Apple M1 in MacOS this is using u-boot, not uEFI.. and you need to copy the u-boot.bin manually from cache/sources/u-boot...../u-boot.bin and use it as your chosen bios for qemu. I left some quick breadcrumbs on how to launch within the board config file. I want to keep the u-boot option, but obviously we need this to support uEFI booting to be viable for the masses. Next steps: * automatically resize and convert resulting image to qcow2 format * solve how to add cloud-init to image * solve for installing grubEFI for booting and whatever partition layout is needed * figure a proper way to write uboot to the image so thet qemu can boot without loading as a bios * strip extra hardware drivers out of kernel and make this thing lean PS Did I mention Desktop Works too? Edited July 18 by lanefu qcow2 image now produced 4 Quote Link to post Share on other sites More sharing options...
lanefu 346 Posted May 27 Author Share Posted May 27 For those wondering Why? Here's several possible reasons because we can better opportunities for automated testing of changes faster manual testing easier to test desktop builds (I actually hate flashing sdcard and having to touch hardware) Broaden visibility of armbian as a platform for compute 0 Quote Link to post Share on other sites More sharing options...
hexdump 66 Posted May 27 Share Posted May 27 @lanefu - as you mentioned the m1 mac: there is a very nice brew package around, which gives you a qemu there which even sends opengl via virgl and angle to the m1 gpu - not the fastest in the world, but better and more cpu saving than software rendering - https://github.com/knazarov/homebrew-qemu-virgl 1 Quote Link to post Share on other sites More sharing options...
lanefu 346 Posted May 27 Author Share Posted May 27 oh man that is sweet... will definitely check it out. thanks! 0 Quote Link to post Share on other sites More sharing options...
lanefu 346 Posted July 12 Author Share Posted July 12 quick update.. armbian now produces a qcow2 image for the virtual-qemu build... I installed virgl but still working on a script to launch... 1 Quote Link to post Share on other sites More sharing options...
why2 0 Posted July 18 Share Posted July 18 @lanefu awesome work and well done! What can I do with the wip file? I would like to try your work. Do you have any step-by-step guide to start the Armbian VM? 0 Quote Link to post Share on other sites More sharing options...
lanefu 346 Posted July 19 Author Share Posted July 19 10 hours ago, why2 said: @lanefu awesome work and well done! What can I do with the wip file? I would like to try your work. Do you have any step-by-step guide to start the Armbian VM? the WIP file is for building with the armbian build tools... I have some crappy tips in there for qemu. okay so here's a really quick n dirty download UTM for Mac Download zip and extract. this UTM config https://armbian.lane-fu.com/virtual-qemu/Armbian UTM.zip there will be a .utm file and a u-boot.bin file download one of the virtual-emu images from our nightlies or try whatever is here https://armbian.lane-fu.com/virtual-qemu/. don't forget to extra xz file find utm and right click and choose show package contents(edited) [8:15 PM] then you'll expand and put this u-boot.bin in this subfolder open the UTM file then clone it to a new virtual machine edit the new virtual machine goto the drives tab click that little trash can to delete the previous image click import drive to load the new image that you downloaded and make sure you set the interface to virtio because it will default to IDE you'll need to fiddle around with display settings possibly.. the high dpi flag etc. I think I've added to default on the newer images. make sure spice-vdagent is installed. .. this is all I can help with for now. You're on your own from here Please turn this into some better documentation if you can. ideally someone needs to figure out a process around this and document it 0 Quote Link to post Share on other sites More sharing options...
why2 0 Posted July 26 Share Posted July 26 Am 19.7.2021 um 05:02 schrieb lanefu: then you'll expand and put this u-boot.bin in this subfolder Thanks @lanefu , I can mount UTM and see the Contents folder. However, the volume drive is mounted in read only mode, so that I can't copy u-boot.bin to the folder. /Volumes/UTM/UTM.app on /private/var/folders/ns/bkcwhmm106j0_scbdvv_x29c0000gn/T/AppTranslocation/7DABB818-AE48-4EBF-9012-FF45CF3B9602 (nullfs, local, nodev, nosuid, read-only, noowners, quarantine, nobrowse, mounted by User). How can I mount the folder with read-write? 0 Quote Link to post Share on other sites More sharing options...
lanefu 346 Posted July 27 Author Share Posted July 27 4 hours ago, why2 said: Thanks @lanefu , I can mount UTM and see the Contents folder. However, the volume drive is mounted in read only mode, so that I can't copy u-boot.bin to the folder. /Volumes/UTM/UTM.app on /private/var/folders/ns/bkcwhmm106j0_scbdvv_x29c0000gn/T/AppTranslocation/7DABB818-AE48-4EBF-9012-FF45CF3B9602 (nullfs, local, nodev, nosuid, read-only, noowners, quarantine, nobrowse, mounted by User). How can I mount the folder with read-write? You need to install UTM rather than trying to run it from the disk image... UTM is a hypervisor. 0 Quote Link to post Share on other sites More sharing options...
why2 0 Posted July 27 Share Posted July 27 Thanks, I can copy files to the UTM folder now. But I have another issue now. After setting the UTM and importing the image file (.img from the .img.xz file), I see an error "Error trying to start shared directory: The file couldn’t be opened because it isn’t in the correct format.". I set the interface to virtIO. Do I need to add a new second drive? You wrote "make sure spice-vdagent is installed". However, `brwe install spice-vdagent`doesn't find the app or library. 0 Quote Link to post Share on other sites More sharing options...
lanefu 346 Posted July 27 Author Share Posted July 27 spice-vdagent in linux the VM. not sure what's going on there.. can't really help. 0 Quote Link to post Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.