Some news on the Hyper-V support under Samba ...

Richard Sharpe realrichardsharpe at gmail.com
Mon Jul 27 00:38:32 UTC 2015


On Sun, Jul 26, 2015 at 3:49 PM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
> Hi folks,
>
> Earlier in the week DB approached me and indicated that he had gotten
> a certain way with Hyper-V support for Samba after applying my earlier
> patches etc but was stuck with one more thing. We chatted about it and
> I said I would look at implementing that extra thing if he didn't.

DB is Dario Bazan.

> He went ahead and wrote something and got it working, but it turns out
> that the key piece in the current master is to hack out the following
> test:
>
> ----------------------------------------------------------
> --- a/source3/smbd/smb2_create.c
> +++ b/source3/smbd/smb2_create.c
> @@ -910,12 +910,14 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX
>  *mem_ctx,
>   }
>   }
>
> +#if #SVHDX_NOT_WANTED
>   if (svhdx != NULL) {
>   /* SharedVHD is not yet supported */
>   tevent_req_nterror(
>   req, NT_STATUS_INVALID_DEVICE_REQUEST);
>   return tevent_req_post(req, ev);
>   }
> +#endif
>
>   /* these are ignored for SMB2 */
>   in_create_options &= ~(0x10);/* NTCREATEX_OPTIONS_SYNC_ALERT */
> ------------------------------------------------------------------
>
> In any event, with these clues, we now have:
>
> ------------------------------------------------------------------
> PS C:\Users\Administrator> net use
> New connections will not be remembered.
>
>
> Status       Local     Remote                    Network
>
> -------------------------------------------------------------------------------
> OK           Z:        \\192.168.2.17\sample     Microsoft Windows Network
> The command completed successfully.
>
> PS C:\Users\Administrator> New-VM -Name rjstest2 -MemoryStartupBytes
> 256MB -NewVHDPath Z:\RJSTEST3.VHDX -NewVHDSizeBytes 10000000000
>
> Name     State CPUUsage(%) MemoryAssigned(M) Uptime   Status
> ----     ----- ----------- ----------------- ------   ------
> rjstest2 Off   0           0                 00:00:00 Operating normally
> ------------------------------------------------------------------
>
> I have also seen a screen-shot of a VM starting ...
>
> Attached is a patch that locates all the bits and pieces that might
> help, although Windows seems to recover from them not being available
> and does not even need the resiliency patch.
>
> Many thanks to DB for bring this to my attention. When he gives me
> approval I will supply his name since he deserves credit for finally
> cracking this nut.
>
> --
> Regards,
> Richard Sharpe
> (何以解憂?唯有杜康。--曹操)



-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)



More information about the samba-technical mailing list