Hcsshim Supporting Split Disk#20
Open
josephknierman wants to merge 1 commit intojohnsonshih:private-peekfrom
Open
Hcsshim Supporting Split Disk#20josephknierman wants to merge 1 commit intojohnsonshih:private-peekfrom
josephknierman wants to merge 1 commit intojohnsonshih:private-peekfrom
Conversation
johnsonshih
reviewed
Oct 14, 2022
| } | ||
| } | ||
|
|
||
| func (vm *VirtualMachineSpec) GetDiskInformation(diskPath string) (controlNumber int, err error) { |
Owner
johnsonshih
reviewed
Oct 14, 2022
| } | ||
| } | ||
|
|
||
| func (vm *VirtualMachineSpec) GetDiskInformation(diskPath string) (controlNumber int, err error) { |
Owner
johnsonshih
reviewed
Oct 14, 2022
| return 0, err | ||
| } | ||
|
|
||
| for lun := 0; lun < 256; lun++ { |
Owner
Author
There was a problem hiding this comment.
as far as i can tell there is no way to find the next free lun though any hcs/hcsshim calls. unless we want to make a sperate service to track the lun for each vm we create, we will have to get it through trial and error. The spec will not help us in this case since it is not stored anywhere and will not be populated if we call the GetVirtualMachineSpec function to retrieve the VirtualMachineSpec struct. I can start the lun count at 2 since 0 and 1 are required for creation.
johnsonshih
reviewed
Oct 14, 2022
| return 0, errors.New("diskpath not found in attached devices") | ||
| } | ||
|
|
||
| func (vm *VirtualMachineSpec) AttachVhd(vhdPath string) (lun int, err error) { |
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows the hcsshim to create a configuration spec that includes additional disks at creation. This should be used for disks that are required for the image to boot. Functions for attaching/detaching disks is a given vm is included. A command for getting the lun of a attach disk is also included, however this has the condition that only the initial creator of the spec is able to use it properly. This is because the current hcsshim will not retrieve the spec when spec when getting the VirtualMachineSpec from a VMID. see getHcsSpec to see why. As far as I can tell there is not way to get this spec from the hcs functions either.