vmware / photon-os-installer

Photon OS Installer
Other
12 stars 18 forks source link

Photon-os-installer partitioning fails on Azure V2 virtual machine with Photon OS 4.0 #15

Closed dcasota closed 1 year ago

dcasota commented 1 year ago

Describe the bug

On an Azure V2 virtual machine with Photon OS 4.0, photon-os-installer launches successfully, but quits the ui with Oops, Installer got interrupted. right in the partitioning phase.

Reproduction steps

  1. Photon OS Azure V2 virtual machine template created using create-AzImage-PhotonOS and provisioned an Azure virtual machine Standard E4s v3 (4 vcpus, 32 GB RAM) using create-AzVM_FromImage-PhotonOS. Extended the disk /dev/sda size to 128GB.
  2. Follow build instruction of photon-os-installer and make a directory from extracted Photon OS iso with rpms.
  3. Started photon-os-installer ui
    root@ph01 [ /iso ]# /photon-os-installer/dist/photon-installer -i iso -o /photon/stage/common/data/build_install_options_all.json -r /iso/RPMS --log-path /iso/log.txt
  4. Follow ui instructions. The ui workflow stops after the partitioning phase with the error message Oops, Installer got interrupted.
  5. The disk which should be partitioned during the setup is /dev/sdb. The fdisk output after the error above:

    root@ph01 [ /iso ]# fdisk -l
    Disk /dev/sda: 128 GiB, 137438953472 bytes, 268435456 sectors
    Disk model: Virtual Disk    
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: 65E65F8C-A02E-4267-877E-5D32D4E64A7C
    
    Device     Start       End   Sectors  Size Type
    /dev/sda1   2048     10239      8192    4M BIOS boot
    /dev/sda2  30720 268435422 268404703  128G Linux filesystem
    /dev/sda3  10240     30719     20480   10M EFI System
    
    Partition table entries are not in disk order.
    
    Disk /dev/sdb: 64 GiB, 68719476736 bytes, 134217728 sectors
    Disk model: Virtual Disk    
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: A254A041-FCD9-4C7C-BFCF-D565C43C3611
    
    Device     Start       End   Sectors Size Type
    /dev/sdb1   2048     10239      8192   4M BIOS boot
    /dev/sdb2  10240     30719     20480  10M EFI System
    /dev/sdb3  30720 134217694 134186975  64G Linux filesystem
    root@ph01 [ /iso ]#

    Unfortunately there is no log output.

fyi On Azure serial console, during photon-os-installer-ui step of password dialog, typing and correcting the password does not work. The workaround is to take a step back and forward again.

Expected behavior

Photon-os-installer installs Photon OS successfully. In case of an issue, photon-os-installer provides debug information.

Additional context

No response

dcasota commented 1 year ago

With the early 5.0 Photon OS beta bits and using disk2vhd and the ventoy tool, I've build a vhd from the iso. The create-azimage-PhotonOS script , described above in 1), has been updated. Unfortunately there is no progress on redirecting the photon-os-installer ui to the Azure serial console. The screenshot of boot diagnostics of the vm shows the EULA screen of photon-os-installer though.

Are the injected serial console params in grub.cfg, isolinux.cfg and menu.cfg okay?

In /boot/grub2/grub.cfg. "serial --unit=0 --speed=115200" added. In /isolinux/isolinux.cfg, "serial 0 115200" added. In /isolinux/menu.cfg on the line beginning with "append initrd=", " console=ttyS0,115200" appended.

jaankit commented 1 year ago

Hi @dcasota , Thanks for raising the issue.

Could you please share the logs in /var/log/installer.log ? We have taken a note of UI issue and password typing and correcting issue on Azure serial console .

dcasota commented 1 year ago

Hi @jaankit,

Yes, I will share the logs as soon as possible. trace-details.txt

dcasota commented 1 year ago

@jaankit can you give a working example of the new syntax? Actually, photon-installer fails.

root@ph4 [ /photon ]# /photon-os-installer/dist/photon-installer -i azure -c /photon/stage/common/data/packages_azure_expanded.json -r /photon/stage/RPMS/ -o /photon/stage/common/data/build_install_options_all.json
Traceback (most recent call last):
  File "photon-installer.py", line 39, in <module>
  File "installer.py", line 105, in __init__
    if os.path.exists(self.working_directory) and os.path.isdir(self.working_directory) and working_directory == '/mnt/photon-root':
  File "genericpath.py", line 19, in exists
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
[2720617] Failed to execute script 'photon-installer' due to unhandled exception!

Remark: previously, the iso build make in /photon successfully ended with a /photon/stage/photon-4.0-3f406caab.iso in 15 hours, on an azure standard E8s v3. This was by far the fasted build make because the last phase with mkisofs terminated much more faster.

dcasota commented 1 year ago

lab to make Photon-OS-installer versatile on Azure isn't maintained for the moment. -> close ticket

jaankit commented 1 month ago

@jaankit can you give a working example of the new syntax? Actually, photon-installer fails.

Please have a look at https://github.com/vmware/photon-os-installer/tree/master/docker#create-an-azure-image https://github.com/vmware/photon-os-installer/tree/master/examples/azure

replace "poi-debug" with "projects.packages.broadcom.com/photon/installer:ob-23999758" if you don't want to build your own container image.