ESXi-Arm Fling

 View Only
  • 1.  Native raspberry pi images running as vm

    Posted Apr 26, 2021 10:52 PM

    So just picked up raspberry pi and installed esxi-arm on it.

    Is there an easy way to emulate an SD card with an .img written to it in the virtual machines?

    I'd like to run Hassos natively. Hass.io provides an .img file.  The other installs are running it under a docker install, not native.

    I've tried mounting a vmdk disk in a running raspbian install, then using 
    dd if=image.img of=/dev/sdb

    and it writes the image to the disk, but from there i can't seem to make it boot.
    I've tried running the resulting disk as ide and scsi. 
    as an IDE, the machine won't even start.
    as a scsi disk, the machine doesn't recognize the boot information.

    i think i get closest using qemu-img to convert the disk to vmdk
    The results in an error 2 invalid disk type

    using vmkfstools -i qemuconverted.vmdk vmwarenative
    which converts it from a workstation vmdk to an esxi vmdk


    there is a method for taking the the raspian OS image and adding grub to it using a debian-netboot ISO in rescue mode, but this doesn't work for the hassio disk. (to wit, i can mount the above disk, even see some files on it but i can't add grub to it)

    It looks like i have the disk, i just want the virtual machine to recognize that disk as being in the sdcard slot so it will boot.

    ideally, ESXI-arm would allow us to add an "SDCARD" device that takes an img as the value.



  • 2.  RE: Native raspberry pi images running as vm

    Broadcom Employee
    Posted Apr 27, 2021 02:44 AM

    Hi,

    I've looked at Hassio to run in a ESXi Arm VM in the past. Unfortunately the "native image" has an "unusual"  structure, which makes it not practical to add grub, as you have found. At this stage, the best would be to contact Hassio developers so that they provide an image for arm64 to boot with grub.

    And use docker in the meantime...

    Cyprien



  • 3.  RE: Native raspberry pi images running as vm

    Posted Apr 27, 2021 02:41 PM

    Thanks Cyprien, yeah bad news for me i guess. I'm running homeassistant app under raspbian in the meantime, but there is some functionality that is lost there. This is a smaller issue, or specific instance, of the general problem. Is there not a way to emmulate the SD card being attached to the virtual machine?  I guess maybe VMware is emulating the processor more than the actual pi itself? Is the lack of being able to boot a matter of the virtual BIOS not understanding how?



  • 4.  RE: Native raspberry pi images running as vm

    Broadcom Employee
    Posted Apr 27, 2021 02:51 PM

    You are correct, ESXi Arm Fling is emulating a generic machine, and nothing specific to the Pi (no wifi, no bluetooth, no spi for the virtual machines..). ESXi Arm Fling also runs on much bigger machines than the Pi

    And yes, ESXi Arm Fling is providing a UEFI firmware (or BIOS if you want), adapted to the virtual machine environment. It can not run the RPi boot loader directly.

    I suggest you bring the subject to Hassio developers: they should be able to create images for arm64 (virtual) machines using UEFI, They do it for x86, it's not so different!