0

I'm trying to run the OS of my x64 NAS in a VM with kvm and libvirt. I made an image of the internal flash with dd. The image has a few partitions, starting with an EFI partition.

virt-install -n mynas --os-type none --ram 1024 --vcpus 2 --boot uefi \
    --disk path=mmc.img,bus=virtio,format=raw

The initram boots fine but fails when trying to mount /dev/mmcblk0p2.. this is because the disk is seen as /dev/vda, not as a flash device.

Is there a way to get my disk detected as /dev/mmcblk0 in the guest?

  • I've never heard of KVM providing virtual MMC devices. Your options are basically SATA, SCSI, USB and VirtIO. None of those will do what you want. – Michael Hampton Dec 06 '18 at 15:45
  • They seem to use the 'sd' interface [here](https://wiki.linaro.org/PeterMaydell/KVM/HowTo/KVMGuestSetup) and there's a section in the source code: `SD Memory Card emulation as defined in the "SD Memory Card Physical layer specification, Version 2.00` – Stefaan Ghysels Dec 07 '18 at 09:32
  • Hm, `if=sd` does seem to be a valid option for qemu. Looks like libvirt supports it in domain XML, but I'm not sure if `virt-install` will take it. You can always try `bus=sd` and see what happens. – Michael Hampton Dec 07 '18 at 14:41
  • Ugh.. it seems they removed SD card support for x64 hosts: https://bugzilla.redhat.com/show_bug.cgi?id=1387218 – Stefaan Ghysels Dec 10 '18 at 11:17
  • Are you actually using qemu-kvm-rhev? Your post doesn't say. – Michael Hampton Dec 10 '18 at 12:28
  • No, just the default kvm package from apt in debian stretch. Anyways, I'll give the mailing list a shot... even though [this similar question](http://lists.nongnu.org/archive/html/qemu-discuss/2017-01/msg00061.html) didn't get answered either. – Stefaan Ghysels Dec 10 '18 at 13:02

0 Answers0