The generic import cmdlet passes all received arguments to
the specialized import cmdlets. The resource parameters for
providing memory and cpu values were added to the vmcx based
cmdlet but not the xml based cmdlet. This adds the to the
xml based cmdlet and includes configuration adjustment if set.
When importing a box that was built with more resources than is
available on the current system, import would fail. If the memory
and/or cpu values are set in the Vagrantfile configuration, provide
them when importing the guest. This allows the values to be modified
prior to registering the new guest preventing a resource unavailability
error.
Fixes#12180
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.
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.
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.