Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmdlet support to LiveMount Hyper-V #450

Closed
aeva-assured opened this issue Sep 17, 2019 · 3 comments
Closed

cmdlet support to LiveMount Hyper-V #450

aeva-assured opened this issue Sep 17, 2019 · 3 comments

Comments

@aeva-assured
Copy link

Is your feature request related to a problem? Please describe.

When trying to use existing cmdlet "New-RubrikMount" to mount a HyperVVM I got the following response:

`PS C:\Users\user\Documents> New-RubrikMount -id bf6cd3a0-0b8b-445b-bb06-86b6c8df739a -Poweron:$false -HostID HypervServer:::efd5b192-534d-4709-a0ef-08d13e6681ca
WARNING: rubrik_error
WARNING: Invalid snappable type: HypervVirtualMachine for snappable: 431f2a92-270d-4d11-a521-6b6678ee4529-933AF92E-D50E-413E-A01A-5FFBE812C99D
The remote server returned an error: (422) Unprocessable Entity.
At C:\Program Files\WindowsPowerShell\Modules\Rubrik\4.0.0.490\Private\Submit-Request.ps1:77 char:21
+                     throw $_.Exception
+                     ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], WebException
    + FullyQualifiedErrorId : The remote server returned an error: (422) Unprocessable Entity.`

Describe the solution you'd like

cmdlet should detect snappable type or allow type flag to be set so that it will support livemounts of multiple types

Describe alternatives you've considered

I have a working work-around leveraging the "invoke-RubrikRESTCall" and building the POST body manually. This satisfies for most of my use-cases but would be fall closer in line with the existing cmdlets that have managed volume mounts, nasshare, vcenter vmdkmount, volumegroupmount, etc...

Additional context

Adding mount-types to the cmdlet will help for when AHV becomes available, additionally for streamlining EC2 mounts and Azure mounts

@mwpreston
Copy link
Contributor

Thanks for creating the issue @aeva-assured ! I think this may best align with the rest of the module if we created a New-RubrikHyperVMount cmdlet or something along those lines...

Andrew - do you have examples of how you are using Invoke-RubrikRestCall now for Hyper-V Live Mounts? It'd be good to see what information you are passing that way we can be sure we capture everything you need...

Thx!

@aeva-assured
Copy link
Author

I'm not doing anything different than we'd do with the vmware mounts. I definitely rename, enable/disable network, enable/disable power, options for specifying where I'm recovering to.

$body  = @{'vmName'=$($mountname);'disableNetwork'=$false;'powerOn'=$false;'hostId'='HypervServer:::efd5b192-534d-4709-a0ef-08d13e6681ca'}
    $job = Invoke-RubrikRESTCall -Endpoint hyperv/vm/snapshot/$($latestsnap.id)/mount -api internal -Method POST -Body $body

@shamsway
Copy link
Contributor

Resolved by #565

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants