Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtio disk not supported #23

Open
hadmut opened this issue Nov 21, 2023 · 8 comments
Open

virtio disk not supported #23

hadmut opened this issue Nov 21, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@hadmut
Copy link

hadmut commented Nov 21, 2023

Describe the bug

Hi,
I am not really sure whether this is a bug or an intentional company decision.

Today I read a recommendation to use Photon OS, wanted to try it, and found, that it is not possible to install it in a virtual machine: It just does not find the disk device /dev/vda to install on.

The reason is, that

/usr/lib/python3.11/site-packages/photon_installer/device.py

calls lsblk to look for disks with option '-I', '7,8,179,202,254,259', which keeps /dev/vda (major 253) out of the list.

I wonder if this is intentionally restricted to vmware environments, has technical reasons, or is just an unintentional omission.

regards

Reproduction steps

  1. run the iso installer image in kvm/qemu with virtual disk, if=virtio
  2. try to install it
  3. notice that photon-installer fails and aborts because no disk can be found.
    ...

Expected behavior

Installation

Additional context

No response

@hadmut hadmut added the bug Something isn't working label Nov 21, 2023
@dcasota
Copy link

dcasota commented Nov 21, 2023

Hi,
the virtual hardware of the boot media must be sata. See vmware/photon#1393

@oliverkurth
Copy link
Contributor

Thanks for reporting! This is most likely an oversight, I don't think we intentionally exclude KVM. I can give it a try by adding 253 to the list. I am not familiar with KVM though.

@dcasota IIUC, this is about finding the hard disk to install to, not the CD device to install from.

@YustasSwamp
Copy link

Hi @hadmut , thanks for raising this.
/dev/vda device driver uses dynamic major number allocation. It can be anything in the range [240-254] as mentioned here https://www.kernel.org/doc/Documentation/admin-guide/devices.txt
Seems like in your case 254 is already occupied by some other device.
I remember we already added 254 for the same reasons (for vda support), probably it makes sense to include entire range or at least last N elements.
And we are always open for external contributions))

@YustasSwamp
Copy link

@oliverkurth we should be less restrictive in block device discovery mask.

@YustasSwamp
Copy link

Let's remove a mask ("-I 7,8,179,202,254,259") and allow user to pick any disk.

@hadmut
Copy link
Author

hadmut commented Nov 21, 2023

@dcasota: Good hint. Providing the disk as sata makes the installation run.

Unfortunately, just calling qemu/kvm and omitting the if= parameter doesn't make the disk a sata disk. It takes the parameter -M q35 to emulate a particular hardware model, which makes my machine complain about a missing CPU feature, but runs. Nevertheless, virtio should be supported.

@oliverkurth
Copy link
Contributor

I have it fixed locally. I will push the fix soon, and give some instructions how to use it.

@oliverkurth
Copy link
Contributor

I have created a PR with a fix, and instructions on building your own ISO: #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants