Hi Roman,
On Thu, 2016-05-12 at 17:57 +0300, Roman Kagan wrote:
On Thu, May 12, 2016 at 03:29:15PM +0200, Cédric Bosdonnat wrote:
> To add this support, two things are needed:
> * make the existing code searches for either the viostor
> or the SUSE VMDP (Virtual Machine Driver Pack) files.
>
> * add a firstboot script setting up VMDP.
>
> Note that 2 firstboot scripts are intentionally added for the VMDP
> setup. This is due to windows potentially rebooting after loading
> the
> virtio block driver. It may happen that this reboot interrupts the
> VMDP
> setup in the firstboot script, we thus make sure the setup is run a
> second time in case it needs to finish the previous run.
Have you been able to identify the reason of this reboot? Isn't it
triggered by the PnP manager?
I guess it is, and, since we copy over the drivers with all the stuff
to
properly install them, the PnP manager will do so completely
unsynchronized to our firstboot activity, so all scripts are in
danger.
I think this should better be resolved generically, by not running
the
scripts until PnP completes (that includes reboots).
I agree, but so far I couldn't find a way to be sure that firstboot
executes after all potential reboots. Even when playing with the
service dependencies I still couldn't find a working solution.
Using the function you mentioned the other day could be an option, but
that has to be implemented in the pvvxsvc or rhsrvany tool, and there
is a restriction to it: it can't be run from the service main callback.
The solution I found here with my colleague working on VMDP is a
compromise to get things right at least for VMDP setup.
> @@ -66,11 +66,19 @@ let rec install_drivers g inspect
systemroot
> root current_cs rcaps =
> else (
> (* Can we install the block driver? *)
> let block : guestcaps_block_type =
> - let has_viostor = g#exists (driverdir // "viostor.inf") in
> + let filenames = ["virtio_blk"; "vrtioblk";
"viostor"] in
> + let driver_name = try (
> + List.find (
> + fun driver_file ->
> + let source = driverdir // (driver_file ^ ".sys") in
> + g#exists source
> + ) filenames
> + ) with Not_found -> "" in
> + let has_viostor = not (driver_name = "") in
So you have somehow managed to decouple virtio_blk from the balloon
driver, haven't you?
Yes. Older versions of the VMDP drivers didn't have those coupled. And
newer (not yet released) won't have it too. I'm just avoiding the
latest VMDP drivers in v2v for this reason ;)
--
Cedric