New Question
0

Sysprep failed while cloudbase-init changed hostname and GPU driver can't be load correctly

asked 2018-07-24 11:26:56 +0300

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Description
I made a win2012r2 64bit image with a gpu passthrough, and I installed the NVIDIA driver correctly. Of course, inside the image there is a cloud-base init.
Then I create a new instance with a gpu card passthrough by the image.But when I logged into the vm I found that the gpu card wasn't recognized by the system. The device manger indicated the gpu card was a Video Controller(VGA Compatiable) categorized as unknown devices. Moreover, the device manager showed that system didn't load any drivers for this device.
Related logs
In setupapi.dev , I found the following errors:
Class installer: Enter 15:59:36.807
inf: AddService=nvlddmkm,0x00000002,nvnvlddmkmserviceInstall,nvnvlddmkmeventlogging__02 (oem12.inf line 2084)
!!! dvi: Add Service: Failed to open service control manager.
!!! dvi: Error 1115: A system shutdown is in progress.
!!! dvi: Error while installing services.
!!! dvi: Error 1115: A system shutdown is in progress.
!!! dvi: Class installer: failed(0x0000045b)!
!!! dvi: Error 1115: A system shutdown is in progress.
dvi: CoInstaller 2: Enter (Post Processing) 15:59:36.823

And I found the cloud-base init log like that:
2018-07-09 15:59:33.771 2472 INFO cloudbaseinit.init [-] Executing plugins for stage 'MAIN':
2018-07-09 15:59:33.771 2472 INFO cloudbaseinit.init [-] Executing plugin 'SetHostNamePlugin'
2018-07-09 15:59:33.787 2472 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.osutils.windows.WindowsUtils' loadclass c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27
2018-07-09 15:59:33.787 2472 DEBUG cloudbaseinit.metadata.services.base [-] Using cached copy of metadata: 'openstack/latest/meta
data.json' getcache_data c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\metadata\services\base.py:92
2018-07-09 15:59:33.787 2472 INFO cloudbaseinit.utils.hostname [-] Setting hostname: win12-gpu-0709
2018-07-09 15:59:33.802 2472 INFO cloudbaseinit.init [-] Rebooting
2018-07-09 15:59:33.865 1732 INFO cloudbaseinit.init [-] Process execution ended with exit code: 0

Also, I noticed a bug in launchpad and a bug in microsoft community

So can I think this problem's root cause is sethostname cause reboot make sysprep failed?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2018-07-26 16:55:54 +0300

avladu gravatar image

Hello,

This seems like a concurrency issue between cloudbase-init, which initiates a reboot while a service is installed by one of the nvidia driver inf directives. This happens when the sysprep's generalize step is configured to not persist the already installed drivers, and when drivers are reloaded, the inf directives for each are also executed (https://docs.microsoft.com/en-us/wind...).

Can you give more details on how did you generate the Windows image (host/tools) and what sysprep unattend.xml have you used?

A possible solution for your problem: if you generate the Windows image on a KVM host, install the drivers and cloudbase-init, then sysprep it with PersistAllDeviceInstalls on true, it should skip the driver reload and service install at the first boot.

Thank you,
Adrian

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2018-07-24 11:26:56 +0300

Seen: 1,733 times

Last updated: Jul 26 '18