-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Labels
category: context windowsWindows OS contextualization packagesWindows OS contextualization packagescommunityIssue created by OpenNebula CommunityIssue created by OpenNebula Communitystatus: acceptedThe issue is valid and will be planned for fix or implementationThe issue is valid and will be planned for fix or implementationtype: bugSomething isn't workingSomething isn't working
Milestone
Description
Description
Windows contextualization script context.ps1 assumes that Windows system partition drive letter is "C:". This is in most cases true, but the drive letter can be changed or it rarely changes during some system restore/recovery operations.
To Reproduce
- Prepare fresh virtual machine
- Install Windows 10, but do not finish OOBE (Out of box experience)
- Boot to audit mode by pressing CTRL + ALT + F3 on first page of OOBE
- Install OpenNebula contextualization package
- Ensure the Windows partition is the last one on the system drive
- If that's not the case, remove Windows RE partition at the end of the drive or shrink the Windows partition
- Run command prompt as Administrator
- Export the registry key HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices by using the following command:
- reg export HKLM\SYSTEM\MountedDevices C:\registry_backup.reg
- Change the C: drive letter to something other in C:\registry_backup.reg file
- Recommend opening notepad as administrator in command prompt window
- notepad C:\registry_backup.reg
- Recommend opening notepad as administrator in command prompt window
- Run the Windows Sysprep tool with the following parameters:
- %WINDIR%\system32\sysprep\sysprep.exe /generalize /quit /oobe
- Import the changed registry file using the following command:
- reg import C:\registry_backup.reg
- Reboot the virtual machine and finish the OOBE (Out of the box experience)
- Expand the system drive in OpenNebula
- Change some contextualization parameters to trigger the contextualization
- Example: Add variable TEMP with some value to the context
- Wait at least 30+ seconds for context to pick up the changes and rerun the contextualization
- Check that Windows partition has not been expanded by contextualization-script
Expected behavior
- Contextualization script should resize the Windows partition even if it's drive letter is different from default drive letter C:
Recommendation
- Environmental variable SYSTEMDRIVE should be used instead of C:
Details
- Affected Component: context-windows
- Version: 6.10.0-2
Additional context
- Microsoft documentation for changing the drive letter: https://learn.microsoft.com/en-us/troubleshoot/windows-server/backup-and-storage/restore-system-boot-drive-letter
- OpenNebula context log representing the issue: opennebula-context.log
Progress Status
- Code committed
- Testing - QA
- Documentation (Release notes - resolved issues, compatibility, known issues)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
category: context windowsWindows OS contextualization packagesWindows OS contextualization packagescommunityIssue created by OpenNebula CommunityIssue created by OpenNebula Communitystatus: acceptedThe issue is valid and will be planned for fix or implementationThe issue is valid and will be planned for fix or implementationtype: bugSomething isn't workingSomething isn't working