Azure / AKS-Edge

Welcome to the Azure Kubernetes Service (AKS) Edge repo.
MIT License
56 stars 37 forks source link

Allow relocation of VHDX for Mariner VM - honor HyperV Settings #117

Closed kvietmeier closed 1 year ago

kvietmeier commented 1 year ago

Describe the bug On a system with a small system drive but a larger second drive, it should be possible to install the VM using an alternate path for the VHDX or to honor the settings in HyperV.

It appears the installer script is simply comparing the requested "DataSizeInGB" with available space on the C: drive. "DataSizeInGB": 500

Drives: C 554.12 376.69 FileSystem C:\ E 0.13 894.13 FileSystem E:\

HyperV is correctly configured to store VHDX files in a folder on the E: Drive.

To Reproduce Set DataSizeInGB lrager than free space on C: while HyperV is configured to store VHDX on a drive with plenty of space. Run: New-AksEdgeDeployment -JsonConfigFilePath .\aksedge-config-full.json

[05/04/2023 14:53:28] Verifying Host Requirements for Linux node(s)

 - Verifying static IP support for selected configuration
 - Verifying host requirements for selected configuration (510 GB disk size, 16884 MB memory, 4 CPUs)

[05/04/2023 14:53:28] Verifying Host OS can support requested configuration

[05/04/2023 14:53:28] Verifying required storage, RAM and number of cores are available

 - Drive 'C:' has 376 GB free
 - A minimum of 510 GB disk space is required on drive 'C:'

[05/04/2023 14:53:28] Exception Caught!!!

 - Not enough disk space is available on drive 'C:'. (AksEdge-Core.psm1:6734)

[05/04/2023 14:53:29] Host machine does not fulfill system requirements for Linux deployment

Expected behavior Allow the user to configure where to store VHDX besides C: or honor current HyperV settings.

Environment (please complete the following information):

  "SchemaVersion": "1.6",
  "Version": "1.0",
  "DeploymentType": "ScalableCluster",

Additional context Add any other context about the problem here.

parameshbabu commented 1 year ago

Hyper-V settings are not used here. Please refer to https://learn.microsoft.com/en-us/azure/aks/hybrid/aks-edge-howto-setup-machine#install-aks-edge-essentials for configuring the vhdxdir during the msi install process.

kvietmeier commented 1 year ago

So more of a documentation issue. I see the option in the msi command line. If I read the docs more carefully I see it mentioned as an option. Maybe have a side note calling out, "If you want to locate the Mariner/Windows vhdx on another drive you should use the VHDXDIR option" might be helpful.

msiexec.exe /i AksEdge-kXs-x.x.xxx.x.msi INSTALLDIR=C:\Programs\AksEdge VHDXDIR=C:\vhdx

Thanks! I think you can close this as "not a bug".... Or resolved.

I did find the vhdx, it is in the "Program Files" folder, not where I expected it.