harvester / harvester

Open source hyperconverged infrastructure (HCI) software
https://harvesterhci.io/
Apache License 2.0
3.72k stars 311 forks source link

[BUG] CD-ROM device should not need size #2189

Open poldiderjungdrache opened 2 years ago

poldiderjungdrache commented 2 years ago

Describe the bug

There is a bit of wired UI behaviour with CD-ROM devices for VMs. When creating a VM and adding a device of type CD-ROM, size remains as mandatory field although the ISO image should define the size:

2022-04-25_09-29-05

To Reproduce Steps to reproduce the behavior:

  1. Create VM
  2. fill basic data
  3. Go to Volumes tab
  4. Select type CD-ROM and select ISO image, size field remains active and is mandatory

Expected behavior

When selecting type CD-ROM size should be not required as it is denied by the image assigned.

Support bundle

supportbundle_17ecbbe0-3abd-43f0-9267-4cbb33e6282d_2022-04-25T07-22-57Z.zip

Environment:

Additional context Add any other context about the problem here.

poldiderjungdrache commented 2 years ago

Funny thing is if you under provision the CD-ROM (like lets say set it to 1GB although the ISO is larger than 1GB). The VM does not boot off the install ISO and dumbs me in the EFI Shell:

2022-04-25_16-50-33
w13915984028 commented 2 years ago

@FrankYang0529 your idea? thanks.

simonflood commented 1 year ago

I bumped into this one today in that I tried booting a VM from a newly uploaded ISO and my first thought it was a corrupt download. After comparing the MD5 checksum of the original file (itself checked against source) with corresponding backing image in Harvester I knew the upload was sound.

The ISO is 11,231,297,536 bytes in size which Harvester lists as 10 GB but it's slightly over which caused the boot to trip. Stopping the VM and increasing the size of the CD-ROM device(!) to 11G allowed the VM to boot from the ISO.

Here's some screenshots showing the failed boot and change of CD-ROM device size(!)

Screenshot from 2023-08-10 17-47-28 Screenshot from 2023-08-10 17-56-48

Time to remove the CD-ROM device size or at least automatically set it to match the corresponding ISO (although that would cause a problem if you subsequently change the ISO to a different one which is smaller as it seems you can't reduce the size of the CD-ROM device as I found out in my playing).

tserong commented 6 months ago

I'm looking at this as part of https://github.com/harvester/harvester/issues/4905

harvesterhci-io-github-bot commented 3 months ago

Pre Ready-For-Testing Checklist

harvesterhci-io-github-bot commented 3 months ago

Automation e2e test issue: harvester/tests#1289