Disable Hyper-V extension on ARM by huzaifa-d · Pull Request #2858 · microsoft/devhome

var supportedOperations = ComputeSystemOperations.ApplyConfiguration;
var revertOperation = Guid.Empty.Equals(ParentCheckpointId) ? ComputeSystemOperations.None : ComputeSystemOperations.RevertSnapshot;
switch (GetState())
{
case ComputeSystemState.Running:
// Supported operations when running
return ComputeSystemOperations.ShutDown |
supportedOperations = ComputeSystemOperations.ShutDown |
ComputeSystemOperations.Terminate |
ComputeSystemOperations.Save |
ComputeSystemOperations.Pause |
ComputeSystemOperations.CreateSnapshot |
ComputeSystemOperations.Restart |
ComputeSystemOperations.ApplyConfiguration |
revertOperation;
break;
case ComputeSystemState.Stopped:
// Supported operations when stopped
return ComputeSystemOperations.Start |
supportedOperations = ComputeSystemOperations.Start |
ComputeSystemOperations.CreateSnapshot |
ComputeSystemOperations.Delete |
ComputeSystemOperations.ApplyConfiguration;
break;
case ComputeSystemState.Saved:
// Supported operations when saved
return ComputeSystemOperations.Start |
supportedOperations = ComputeSystemOperations.Start |
ComputeSystemOperations.CreateSnapshot |
ComputeSystemOperations.Delete |
ComputeSystemOperations.ApplyConfiguration |
revertOperation;
break;
case ComputeSystemState.Paused:
// Supported operations when paused
return ComputeSystemOperations.Terminate |
supportedOperations = ComputeSystemOperations.Terminate |
ComputeSystemOperations.Save |
ComputeSystemOperations.Resume |
ComputeSystemOperations.CreateSnapshot |
ComputeSystemOperations.ApplyConfiguration |
revertOperation;
break;
}
// Before applying the configuration we start the VM. So we will allow the ApplyConfiguration to be the base supported operation
// for the VM.
return ComputeSystemOperations.ApplyConfiguration;
// Disable ApplyConfiguration for ARM
var arch = RuntimeInformation.ProcessArchitecture;
if (arch == Architecture.Arm64 || arch == Architecture.Arm || arch == Architecture.Armv6)
{
supportedOperations &= ~ComputeSystemOperations.ApplyConfiguration;
}
return supportedOperations;
var supportedOperations = ComputeSystemOperations.None;
var revertOperation = Guid.Empty.Equals(ParentCheckpointId) ? ComputeSystemOperations.None : ComputeSystemOperations.RevertSnapshot;
switch (GetState())
{
case ComputeSystemState.Running:
// Supported operations when running
supportedOperations = ComputeSystemOperations.ShutDown |
ComputeSystemOperations.Terminate |
ComputeSystemOperations.Save |
ComputeSystemOperations.Pause |
ComputeSystemOperations.CreateSnapshot |
ComputeSystemOperations.Restart |
revertOperation;
break;
case ComputeSystemState.Stopped:
// Supported operations when stopped
supportedOperations = ComputeSystemOperations.Start |
ComputeSystemOperations.CreateSnapshot |
ComputeSystemOperations.Delete;
break;
case ComputeSystemState.Saved:
// Supported operations when saved
supportedOperations = ComputeSystemOperations.Start |
ComputeSystemOperations.CreateSnapshot |
ComputeSystemOperations.Delete |
revertOperation;
break;
case ComputeSystemState.Paused:
// Supported operations when paused
supportedOperations = ComputeSystemOperations.Terminate |
ComputeSystemOperations.Save |
ComputeSystemOperations.Resume |
ComputeSystemOperations.CreateSnapshot |
revertOperation;
break;
}
// Disable ApplyConfiguration for ARM
var arch = RuntimeInformation.ProcessArchitecture;
if (arch == Architecture.Arm64 || arch == Architecture.Arm || arch == Architecture.Armv6)
{
return supportedOperations;
}
return supportedOperations | ComputeSystemOperations.ApplyConfiguration;