130 Commits

Author SHA1 Message Date
RudiMT
431d91593a Output message in json
Would limit new console output to systems that do not already support EnhancedSessionTransportType. The vast majority of systems supports it and should not print additional messages.
2023-02-14 15:49:46 -08:00
RudiMT
ba562f273b Add check if EnhancedSessionTransportType is supported by the current version of HyperV 2023-02-14 15:49:46 -08:00
RudiMT
e14aa1e430 Formatting as in main 2023-02-14 15:49:46 -08:00
RudiMT
0867fbd9d8 Add check if EnhancedSessionTransportType is supported by the current version of HyperV 2023-02-14 15:49:46 -08:00
Chris Roberts
2696c3d74d Import the security module for access check
The 7.3.0 release of powershell cleaned up some stray things that
should require the import of the security module to be available.
It causes issues with pre-7.3 versions of powershell that attempt
to load the newer module so we run a check and restrict the module
version based on the powershell version.
2022-11-22 11:05:18 -08:00
Chris Roberts
a02b9b6b2f Use detected device when iterating over available addresses 2021-07-27 08:07:39 -07:00
Chris Roberts
1148658a53 Remove loops since only single device is desired 2021-06-25 15:16:56 -07:00
Rui Lopes
cc9ddc084c fix the hyperv guest ip detection by limiting the search to the vagrant management network interface (the first network interface of the vm) 2021-03-13 11:20:00 +00:00
sophia
e3223b67ff Fix if statement to use '-and' syntax
Docs for powershell:
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_logical_operators?view=powershell-7
2020-08-07 17:24:49 -05:00
cam
3dd7c89bf0 hyper-v: Hyper-V: add support for EnhancedSessionTransportType. Addresses #9823 2020-08-06 16:02:26 -07:00
Chris Roberts
64490299c3 Include check for support of the SecureBootTemplate parameter 2020-07-28 15:10:57 -07:00
Stephan Wild
4ff1ff5bc0 Set secure boot template setting for hyperv 2020-07-10 20:38:32 +02:00
Brian Cain
38445935dd
Ensure params are UInt32 rather than string 2020-06-30 14:23:34 -07:00
Brian Cain
1d8db27340
Fixup handling parameters for hyper-v powershell disk scripts 2020-06-30 14:22:41 -07:00
Brian Cain
9e8343fc93
Automatically add all passed in parameters to hyper-v command 2020-06-30 14:22:41 -07:00
Brian Cain
f798afa0c0
Attempt to pass along parameters 2020-06-30 14:22:41 -07:00
Brian Cain
2de5ef0bf2
Fix typo in new_vhd powershell script name 2020-06-30 14:22:41 -07:00
Brian Cain
5405aaac82
Remove disk file after detaching from hyper-v guest 2020-06-30 14:22:41 -07:00
Brian Cain
b3a7bd4566
Add dismount_vhd powershell script 2020-06-30 14:22:41 -07:00
Brian Cain
f792b58704
Add functionality to clean up stale disks for hyper-v guests 2020-06-30 14:22:41 -07:00
Brian Cain
f3f229c681
Resize hyper-v disks 2020-06-30 14:22:41 -07:00
Brian Cain
bb2195b692
Add ability to create and attach disks to hyper-v guests 2020-06-30 14:22:41 -07:00
Brian Cain
66a22b190a
Add powershell script for Get-VHD 2020-06-30 14:22:41 -07:00
Brian Cain
fb39bd7ed0
Use uppercase Name for getting vm name 2020-06-30 14:22:41 -07:00
Brian Cain
6835429538
Grab correct name to pass along to disk command 2020-06-30 14:22:41 -07:00
Brian Cain
a20418ad43
Format output from json to return to hyper-v driver 2020-06-30 14:22:41 -07:00
Brian Cain
59bbf9736a
Add powershell script for retreiving disk info for a hyper-v guest 2020-06-30 14:22:41 -07:00
Brian Cain
83922333d5
Use UInt64 type instead of String for DiskSize 2020-06-30 14:22:41 -07:00
Brian Cain
d451151ff8
Add resize disk driver method 2020-06-30 14:22:41 -07:00
Brian Cain
06799f0ff1
Add driver scripts for disk management 2020-06-30 14:22:41 -07:00
Brian Cain
60f2c14b82
Update attach disk script 2020-06-30 14:22:41 -07:00
Brian Cain
26e5cf1d02
Add powershell script for attaching a harddisk to a guest 2020-06-30 14:22:41 -07:00
Brian Cain
7be0a6807a
Fix mixed tabs on get_vm_status script 2020-06-30 14:22:41 -07:00
Sophia Castellarin
1a45f302e3
Merge pull request #11499 from soapy1/hyperv-integrationservice-non-ascii-names
Use service id for enabling/disabling vm integration services
2020-04-17 09:53:35 -04:00
sophia
d5cd4da0e0 Use service id for enabling/disabling vm integration services
ref:
https://github.com/PlagueHO/LabBuilder/issues/183
ref service name to id:
https://social.technet.microsoft.com/Forums/de-DE/154917de-f3ca-4b1e-b3f8-23dd4b4f0f06/getvmintegrationservice-sprachabhngig?forum=powershell_de
2020-04-13 09:39:53 -04:00
ibrahim.dursun
fb8180a843
Fix #11271: catch IdentityNotMappedException
Some IdentityReferences cannot be translated to
[System.Security.Principal.SecurityIdentifier] because they don't map to
a SecurityIdentifier.

An example is:
IdentityReference : APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES

In such case, it is better to catch the exception and treat it as $false.
2020-03-03 15:57:21 +00:00
Matt Shanahan
6caa7bfa86 Fixes issue hashicorp#10973: checks that VMMS WMI reference is null & throws appropriately 2019-07-19 07:48:03 +02:00
Chris Roberts
7750d6182d
Merge pull request #10410 from chrisroberts/f-hyperv-net-typo
Fix typo in hyper-v network configuration detection script
2018-11-13 15:43:03 -08:00
Chris Roberts
8f49e05ad4
Merge pull request #10406 from chrisroberts/e-hyperv-destroy
Disable automatic checkpoints prior to VM removal
2018-11-13 15:22:11 -08:00
Chris Roberts
9dd137633a Fix typo in hyper-v network configuration detection script 2018-11-13 15:11:04 -08:00
Chris Roberts
0ea4dcdc6e Disable automatic checkpoints prior to VM removal 2018-11-13 13:09:12 -08:00
Chris Roberts
83ed01869d Ignore errors when generating new VM configuration
The default error action is to stop. When generating the initial
VM configuration during import, if the Compare-VM command fails
it results in a generic error message. Instead the error should
be ignored so the source VM can be inspected and a useful error
message can be returned to the user.
2018-11-13 12:21:17 -08:00
Chris Roberts
1ece44ca84 Remove module loading from vlan script 2018-11-02 10:42:28 -07:00
Chris Roberts
080dd748ef
Merge pull request #10265 from chrisroberts/f-win-chktyp
Only configure CheckpointType if available to be configured.
2018-10-09 14:47:15 -07:00
Chris Roberts
88469d99f7 Only configure CheckpointType if available to be configured. 2018-10-04 15:24:05 -07:00
Chris Roberts
9c1ab2bd9f Wrap automatic checkpoint enable to prevent inadvertent execution 2018-10-04 15:16:58 -07:00
Chris Roberts
1f74aedeaa Check for automatic checkpoint support before configuring
The AutomaticCheckpointsEnabled option may not always be available
depending on the version in use. Check for support before applying
the configured value. If automatic checkpoints are to be enabled
and support is not available, force an error.
2018-09-05 13:37:45 -07:00
Chris Roberts
9c149ba8b1 Only enable ExposeVirtualizationExtensions if available within Hyper-V version 2018-07-31 13:33:41 -07:00
Chris Roberts
110600970a
Merge pull request #10000 from chrisroberts/f-hyperv-access-localized
Fix Hyper-V access check
2018-07-18 16:39:54 -07:00
Chris Roberts
8aa74a03a0 Differentiate checkpoints and automatic checkpoints
Provide separate configuration settings for enabling/disabling
checkpoints and automatic checkpoints with Hyper-V provider.
2018-07-13 15:23:09 -07:00