On Thu, Sep 21, 2023 at 04:50:26PM +0200, Lee Garrett wrote:
After testing it again today, the guest agent is still not installed, however this time the C:\Program Files\Guestfs\Firstboot\log.txt exists:
starting firstboot service running "C:\Program Files\Guestfs\Firstboot\scripts\5000-0001-wait-pnp.bat" 1 file(s) moved. Wait for PnP to complete .... exit code 0 running "C:\Program Files\Guestfs\Firstboot\scripts\5000-0002-install-qemu-ga-x86_64-msi-ps1.bat" 1 file(s) moved. Removing any previously scheduled qemu-ga installation ERROR: The system cannot find the file specified. Scheduling delayed installation of qemu-ga from qemu-ga-x86_64.msi SUCCESS: The scheduled task "Firstboot-qemu-ga" has successfully been created. .... exit code 0 running "C:\Program Files\Guestfs\Firstboot\scripts\5000-0003-uninstall-VMware-Tools.bat" 1 file(s) moved. uninstalling VMware Tools .... exit code 0 uninstalling firstboot service Service uninstalled successfully
The folder scripts is empty, all scripts are in scripts-done. The contents of the folder are: 5000-0001-wait-pnp.bat 123 5000-0001-wait-pnp.log 5000-0002-install-qemu-ga-x86_64-msi-ps1.bat 5000-0003-uninstall-VMware-Tools.bat 5000-0003-uninstall-VMware-Tools.log
Note that the .log is missing for qemu-ga.
This is what we'd expect, except maybe the missing log for qemu-ga. It's a little odd that it is missing, but it's also possible that the log file doesn't get written if there's no output.
At least today I could twice provision the windows 11 VM, and in both cases the main log.txt was generated by the time I checked. How are the services scheduled? Could it be that they were delayed by > 1h?
Yes, we do actually try to delay qemu-ga installation. It should only be delayed for about 120 seconds (not 1 hour). https://github.com/libguestfs/libguestfs-common/blob/e70d89a58dae068be2e19c7... However there have been timezone bugs with this in the past (and maybe there still are), see the sordid history in these two links: https://github.com/libguestfs/libguestfs-common/blob/e70d89a58dae068be2e19c7... Which TZ are you in? Rich.
On 11.09.23 21:29, Richard W.M. Jones wrote:
If we suspect that the whole firstboot mechanism might not be working with the new version of Windows, one way to test it (on this one, or a freshly installed Windows VM) would be:
$ virt-customize -a windows.img --firstboot-command 'echo hello'
and see if "hello" is written in some form to the log.txt file inside the guest after it boots.
If that doesn't work then it's likely some change in Windows which is breaking firstboot support.
Rich.
Regards, Lee
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org