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 6 at 15:45
  • They seem to use the 'sd' interface here 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 7 at 9: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 7 at 14:41
  • Ugh.. it seems they removed SD card support for x64 hosts: bugzilla.redhat.com/show_bug.cgi?id=1387218 – Stefaan Ghysels Dec 10 at 11:17
  • Are you actually using qemu-kvm-rhev? Your post doesn't say. – Michael Hampton Dec 10 at 12:28

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.