virtio-win / virtio-win-guest-tools-installer

120 stars 19 forks source link

Installer fails to start VdService on Windows 2016 after virt-v2v conversion #3

Open nyoxi opened 4 years ago

nyoxi commented 4 years ago

Ona VM previously converted with virt-v2v the installer fails in the 'Starting services' phase with error:

Service 'VdService' (VdService) failed to start. Verify that you have sufficient privileges to start system services.

I can share the installer log if you tell me where to post it. I am not sure what role virt-v2v plays in this (if any), but I haven't seen this error yet on clean Windows 2016 installation.

Gal-Zaidman commented 4 years ago

Hi Tomáš, can you please share the installation log? a guide if you need any: https://www.advancedinstaller.com/user-guide/qa-log.html

My first guess is the fact that VdService has several dependencies, they are probably not satisfied

nyoxi commented 4 years ago

Ah, no the problem is not getting the log. I just had problem attaching the file. But it turned out to be configuration issue in my browser, so here it is.

virtio.log

I also did few small tests and the problem does not seem to be related to virt-v2v at all as I expected. It's more related to the libvirt XML and devices.

Gal-Zaidman commented 4 years ago

I was looking into the log, and I see that in the InstallDriverPackages phase all the drivers fail to install because of:


DIFXAPP: INFO:   Installation did not occur because the hardware isn't currently present.
DIFXAPP: INFO:   No drivers installed. No devices found that match driver(s) contained in
DIFXAPP: INFO: The device(s) for which the driver is being installed has not been plugged into the computer.

that explains why you are getting an error from VdService, because it is dependent on VirtioSerial, and because serial is not installed the vdservice can't start. At the current state the installation fails if any of the services fail to install, I should probably need to not fail the installation and generate a report for what was successful and what wasn't, but that would be a different issue.

So we need to understand:

nyoxi commented 4 years ago

I was looking into the log, and I see that in the InstallDriverPackages phase all the drivers fail to install because of:


DIFXAPP: INFO:   Installation did not occur because the hardware isn't currently present.
DIFXAPP: INFO:   No drivers installed. No devices found that match driver(s) contained in
DIFXAPP: INFO: The device(s) for which the driver is being installed has not been plugged into the computer.

that explains why you are getting an error from VdService, because it is dependent on VirtioSerial, and because serial is not installed the vdservice can't start. At the current state the installation fails if any of the services fail to install, I should probably need to not fail the installation and generate a report for what was successful and what wasn't, but that would be a different issue.

OK that's substantially wrong. You should install all the selected drivers to the local driver store without requiring the devices to be present. More importantly, you should make sure the boot critical drivers are installed properly so it is for example safe to switch from IDE to virtio-scsi on next boot. Similarly if the services fail to start because some virtio devices are not present it should not be fatal either.

So we need to understand:

* what are the devices that are available on your env?

Pretty minimal VM -- IDE disk and cdrom, rtl8139 NIC, it has spice+qxl configured but is missing virtio-serial controller as you correctly guessed. Here is the domain XML:

vm.xml.gz

* does that happen in any other v2v or just on 2016?

Happened to me also for 2012R2. But if what you said above is true it is not related to v2v at all. It can happen to you for example with virt-install too or whenever you manage the VM configuration manually.

* if you trigger installation od the driver with the inf, does the driver still fail to install?

* try installing spice agent and driver with spice package, is the installation successful?

I will need to reinstall the Windows to check that. I'll let you know.

nyoxi commented 4 years ago
* if you trigger installation od the driver with the inf, does the driver still fail to install?

Yes, it says "installation completed successfully".

* try installing spice agent and driver with spice package, is the installation successful?

If I select only these two the installation fails.

Gal-Zaidman commented 4 years ago

I was looking into the log, and I see that in the InstallDriverPackages phase all the drivers fail to install because of:


DIFXAPP: INFO:   Installation did not occur because the hardware isn't currently present.
DIFXAPP: INFO:   No drivers installed. No devices found that match driver(s) contained in
DIFXAPP: INFO: The device(s) for which the driver is being installed has not been plugged into the computer.

that explains why you are getting an error from VdService, because it is dependent on VirtioSerial, and because serial is not installed the vdservice can't start. At the current state the installation fails if any of the services fail to install, I should probably need to not fail the installation and generate a report for what was successful and what wasn't, but that would be a different issue.

OK that's substantially wrong. You should install all the selected drivers to the local driver store without requiring the devices to be present.

I'm installing them to the local driver store.

More importantly, you should make sure the boot critical drivers are installed properly so it is for example safe to switch from IDE to virtio-scsi on next boot.

That is an interesting case, I'm not sure how it can be done with DIFx, meaning reporting and stoping the installation if a critical driver hasn't found a device (like the serial on this case). In the next version, we will need to move away from DIFx probably to CA to install and I think we can implement it in a CA. Can you state what are the boot critical drivers?

Similarly if the services fail to start because some virtio devices are not present it should not be fatal either.

You are correct it shouldn't fail the installation, but we should find a way to report it.

So we need to understand:

* what are the devices that are available on your env?

Pretty minimal VM -- IDE disk and cdrom, rtl8139 NIC, it has spice+qxl configured but is missing virtio-serial controller as you correctly guessed. Here is the domain XML:

vm.xml.gz

OK, so try to configure it correctly and let me know if the error returns

* does that happen in any other v2v or just on 2016?

Happened to me also for 2012R2. But if what you said above is true it is not related to v2v at all. It can happen to you for example with virt-install too or whenever you manage the VM configuration manually.

* if you trigger installation od the driver with the inf, does the driver still fail to install?

* try installing spice agent and driver with spice package, is the installation successful?

I will need to reinstall the Windows to check that. I'll let you know.

Gal-Zaidman commented 4 years ago
* if you trigger installation od the driver with the inf, does the driver still fail to install?

Yes, it says "installation completed successfully".

* try installing spice agent and driver with spice package, is the installation successful?

If I select only these two the installation fails.

I meant try to use the spice package, but nevermind we know why it fails, I will need to get service installtion failer not to fail the installtion, that is easy... the hard part is how to report exactly what passed and what didn't

Chaython commented 4 years ago

Same issue Windows 10 1909 - VDService failed to start Start VDService (spice agent) via services - Error 1075: the dependency service does not exist or has been marked for deletion - check dependencies - none I am using spice, though no device in device manager. Installer should default to install when needed

Gal-Zaidman commented 4 years ago

We will soon have a new build which hopefully fixes the issue. Notice that on spice there is only an officially supported driver for Win10, so If you want to use it on win16 you will need to manually install the driver on win16 and only then the agent will work as expected.

s0mm3rb commented 4 years ago

@Gal-Zaidman any news on when the issue will be fixed in a new build? still the same on win10 1909 with 1.173-7 host is proxmox 6.1-3 thanks regards

Gal-Zaidman commented 4 years ago

Hi I was under the impression that the installation error was fixed on 1.173-7. I'm keeping this issue open because of the v2v use case which is not related specifically to VdService. @s0mm3rb can you describe what are you experiencing ?

freefrank commented 4 years ago

same error here. The error appears during installation on the fresh install of Windows. And the installer revert to initial and remove every driver it installed (like nic drivers etc.).

bokehsec commented 4 years ago

I also have the same issue with a fresh install of Windows 10 1809. Not using v2v.

Gal-Zaidman commented 4 years ago

Still can't reproduce, @freefrank @bokehsec can you please provide the installation logs?

freefrank commented 4 years ago

I just figured it out, Windows refused to install the driver cuz no signature with the driver, thus vdservice not able to start. Disable driver signature check solved it.

Gal Zaidman notifications@github.com 于2020年3月2日周一 上午3:18写道:

Still can reproduce, @freefrank https://github.com/freefrank @bokehsec https://github.com/bokehsec can you please provide the installation logs?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/virtio-win/virtio-win-guest-tools-installer/issues/3?email_source=notifications&email_token=AAFRIY3OWYHG4F44KB3G5ZTRFOBX5A5CNFSM4JQBSP5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENOXRHI#issuecomment-593328285, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFRIY7WBUXDGFMQC32XGHLRFOBX5ANCNFSM4JQBSP5A .

sertraline commented 4 years ago

same here using Windows 2019 LTSC original iso. Disabling signature check didn't help. Not using v2v.

log: https://hastebin.com/raw/vunupaqole

NCC-Lykos commented 4 years ago

Same issue...

Edit: I should note this is a fresh Windows install, no conversion. Windows Server 2016 Core

virtio.log

Disabled driver signature check, did not solve.

NCC-Lykos commented 4 years ago

I had to install every driver manually with pnputil, reboot the system and then I ran the installer again and it completed.

jaylik commented 4 years ago

Also with W10 Ent 1909 there is problem with installation - without Spice Agent, virtio guest tools install just fine

Gal-Zaidman commented 4 years ago

same here using Windows 2019 LTSC original iso. Disabling signature check didn't help. Not using v2v.

log: https://hastebin.com/raw/vunupaqole

Thanks for posting your logs, Looking at your logs I see: No matching devices found in INF ...

This means that the DIFX can't match the drivers to the devices, so it is a problem with the setup, installing the drivers themselves should not work either. Please try installing them manually I think that it will not work, in that case you can:

Gal-Zaidman commented 4 years ago

I had to install every driver manually with pnputil, reboot the system and then I ran the installer again and it completed.

I see that some drivers fail to install on your system look for "No matching devices found in INF" in the logs, I wounder way is that. But the installation failed because VirtioSerial failed and Spice agent expects it. When you installer serial manually did it got installed?

Anyway I will create a new version that will not fail in case of service installation failure for the time being. We will soon have an exe wrapper for all the MSIs that should prevent does issues

thmai11 commented 4 years ago

I confirm with W10 Ent 1909 (proxmox host) if you remove the Spice Agent it installs successfully

isanych commented 4 years ago

Same error for me on Windows Server 1903 on Proxmox 6.1 with virtio-win-0.1.173-8 I have to disable both spice agent and spice driver in order to get rid of an error. After that installation completes successfully, but there are no drivers installed and no question from windows about trusting RedHat signed drivers. So have to use good old method:

pnputil /add-driver E:\NetKVM\2k19\amd64\netkvm.inf /install
pnputil /add-driver E:\Balloon\2k19\amd64\balloon.inf /install
pnputil /add-driver E:\pvpanic\2k19\amd64\pvpanic.inf /install
pnputil /add-driver E:\qxldod\2k19\amd64\qxldod.inf /install
pnputil /add-driver E:\vioinput\2k19\amd64\vioinput.inf /install
pnputil /add-driver E:\viorng\2k19\amd64\viorng.inf /install
pnputil /add-driver E:\vioserial\2k19\amd64\vioser.inf /install
pnputil /add-driver E:\qemupciserial\2k19\amd64\qemupciserial.inf /install
pnputil /add-driver E:\qemufwcfg\2k19\amd64\qemufwcfg.inf /install
E:\guest-agent\qemu-ga-x86_64.msi
xcopy /I E:\Balloon\2k19\amd64 "C:\Program Files\Balloon"
"C:\Program Files\Balloon\blnsvr.exe" -i
cvandesande commented 4 years ago

Got the installer working after installing the "Channel Spice" hardware in libvirt. Device type: "spicevmc"

GnaXi commented 4 years ago

I've stumbled onto the same issue, however I have only been able to reproduce it with boot in Windows 10 set to UEFI. If I run a legacy boot version of Windows 10, I am able to install it without any issues.

Just thought that I would put that out there, since no one else seems to have mentioned it! :)

YanVugenfirer commented 4 years ago

@GnaXi That's probably because with UEFI secure boot is enabled and then all the drivers should be MS signed.

GnaXi commented 4 years ago

I was able to run it without any issues when removing Spice as a component and then just downloaded the spiace-guest-tools directly from https://www.spice-space.org/download.html instead. (For anyone needing a workaround)

don-rumata commented 3 years ago

Also with W10 Ent 1909 there is problem with installation - without Spice Agent, virtio guest tools install just fine

Install all components without spice agent:

virtio-win-gt-x64.msi /qn ADDLOCAL=FE_balloon_driver,FE_network_driver,FE_pvpanic_driver,FE_qemufwcfg_driver,FE_qemupciserial_driver,FE_qxl_driver,FE_spice_driver,FE_viorng_driver,FE_vioscsi_driver,FE_vioserial_driver,FE_viostor_driver

https://ovirt.org/documentation/virtual_machine_management_guide/#Installing_the_Guest_Agents_and_Drivers_on_Windows