microsoft / microsoft/Windows-classic-samples

Should I use Resource Pools to add a VHDX-file to my HyperV VM?

Open
#240 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
5.7k
Forks
3.3k
PR merge metrics
No merged PRs in 30d

Description

Hi,

I am trying to figure out how to add a .vhdx file to an existing VM. It seems like this can be done with the ResourcePools example, but I have not succeeded.

Here is an example:
My VM folder - c:\program files\myvm
My Vhdx file - c:\program files\myvm\Virtual Hard Disks

Should I then write:
ResourcePoolSamples.exe CreatePool VHD "myvmPoolId" "myvmPoolName" [p]c:\program files\myvm[p] [p][h]c:\program files\myvm\Virtual Hard Disks[h][p]

(I have tried to write the arguments directly in the program.cs, and that helped a bit). But still, before I continue to change a lot more, it would be nice to know if I am in the right direction. I am really guessing a lot...

I found a solution using some code from https://github.com/jscarle/HyperV.NET, at least it worked for setting the number of processors, and I think it will be similar with the VHDX files.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ResourcePools example and its Program.cs entry point, then compare the reported CreatePool VHD invocation with how the sample parses its arguments. Done means establishing whether the VHDX path and pool parameters are supported and documenting the correct usage or identifying the missing sample guidance.

Written by the indexing model from the issue text.

Assessment

Domain
infrastructure
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.