HCK-CI / AutoHCK

AutoHCK is a tool for automating HCK/HLK testing, doing all the boilerplate steps in the process leaving you with simply choosing which driver you want to test on what os.
BSD 2-Clause "Simplified" License
26 stars 15 forks source link

Install mode does not work in MBR (non-UEFI) configuration due to QEMU CLI error (master) #472

Open zjmletang opened 4 days ago

zjmletang commented 4 days ago

I am experiencing some issues when using the latest code from the master branch. After configuring everything accordingly, I attempted to run the following command: bin/ns bin/auto_hck install -p Win2022x64 --force

Unfortunately, this results in an error. the log is here. AutoHCK.log However, when I use the version of AutoHCK configured automatically by the AutoHCK-Installer, the installation is successful.

Could you please clarify if there are any prerequisite configuration requirements for using the latest code from the AutoHCK master branch? I am unsure if the issue lies with my usage or if there are additional steps needed.

Thank you for your assistance!

kostyanf14 commented 4 days ago

In the master branch, we add the feature to have automatically entered the namespace (b076a5f). So you must run bin/auto_hck install -p Win2022x64 --force without bin/ns. Currently, we have a lot of changes and updating behavior in AutoHCK in comparison with the previous version.

In the log, I see qemu-system-x86_64: -device ide-cd,drive=iso_drive_2,bus=ide.2,bootindex=2: Bus 'ide.2' not found looks like QEMU CLI is broken. This is very strange.

zjmletang commented 3 days ago

@kostyanf14 ,Yes, it’s quite strange. I encounter the same issue when using bin/auto_hck install -p Win2022x64 --force. I tested it on the same machine, and using the old version of AutoHCK (automatically by the AutoHCK-Installer) works just fine.In these two tests, since they were conducted on the same machine, the QEMU environment is the same. The log for the old version of AutoHCK is shown below. AutoHCK.log

kostyanf14 commented 3 days ago

@zjmletang Can you please test master + revert https://github.com/HCK-CI/AutoHCK/commit/ad96f2d658a5d7744138634d07537246bef77fb0 ?

zjmletang commented 2 days ago

@kostyanf14 ,This can work properly.

@zjmletang Can you please test master + revert ad96f2d ?

kostyanf14 commented 2 days ago

qemu-system-x86_64: -device ide-cd,drive=iso_drive_2,bus=ide.2,bootindex=2: Bus 'ide.2' not found - in MBR mode in UEFI mode everything works

kostyanf14 commented 2 days ago

The reason of the error is that the PC machine type supports only 2 IDE buses (0 and 1) with 2 units (master and slave). The Q35 machine type supports 6 IDE (SATA) buses.

Before ad96f2d658a5d7744138634d07537246bef77fb0 we specify only the -drive flag in QEMU CLI and QEMU adds the corresponding device automatically but even in this case when more than 4 -drive will be specified QEMU will be failed.

Currently, we need max 4 IDE/SATA devices: boot image, Windows ISO, HLK setup scripts ISO, HLK ISO (optional). There are 2 ways to fix the issue:

  1. Update AutoHCK to set bus/units properly
  2. Update AutoHCK to attach ISO as a USB device. In this case, we also will not have any limitations with ISO attaching.

@akihikodaki @YanVugenfirer What do you think?

YanVugenfirer commented 2 days ago

Are we using PC machine today?

kostyanf14 commented 2 days ago

Yes, we have 2 setup with PC and AutoHCK support PC for now

akihikodaki commented 1 day ago

How difficult will it be to migrate those setups from pc to q35? pc is a very old and unrealistic configuration so ideally we shouldn't use it.

kostyanf14 commented 1 day ago

no difficulty, q35 is fully supported. Just default is PC and problem with PC only

kostyanf14 commented 1 day ago

to migrate we just need to reinstall images

akihikodaki commented 14 hours ago

Let's do the migration and switch the default to q35.