| 1 | # VhdOptions |
| 2 | |
| 3 | Describes a session VHD requirement or a named session VHD volume. |
| 4 | |
| 5 | ```csharp |
| 6 | public sealed class VhdOptions |
| 7 | { |
| 8 | public VhdOptions(string name, ulong size, VhdType type); |
| 9 | |
| 10 | public string Name { get; set; } |
| 11 | public ulong Size { get; set; } |
| 12 | public VhdType Type { get; set; } |
| 13 | public VhdOwner? Owner { get; set; } |
| 14 | } |
| 15 | ``` |
| 16 | |
| 17 | Notes: |
| 18 | |
| 19 | - Use `SessionSettings.VhdRequirements` for session-level storage requirements. |
| 20 | - Use `Session.CreateVhdVolume(...)` for named session volumes. |
| 21 | - `Owner` is intended for named-volume creation and is rejected on `SessionSettings.VhdRequirements`. |
| 22 | |
| 23 | Example: |
| 24 | |
| 25 | ```csharp |
| 26 | var vhd = new VhdOptions("cache", 2UL * 1024 * 1024 * 1024, VhdType.Dynamic) |
| 27 | { |
| 28 | Owner = new VhdOwner { Uid = 1000, Gid = 1000 } |
| 29 | }; |
| 30 | ``` |