Surendra Sharma

Surendra Sharma

Search This Blog

Showing posts with label xmcloud. Show all posts
Showing posts with label xmcloud. Show all posts

Saturday, September 6, 2025

Fixing Sitecore XM Cloud Local Installation Issues with Docker and BitLocker

When setting up Sitecore XM Cloud locally, many developers face errors with Docker Desktop on Windows. The root cause is often the latest Docker versions (e.g., 4.45) conflicting with BitLocker encryption and storage drivers.

In this blog, I’ll walk you through the actual problem, the errors you may encounter, and the fixes that finally worked for me.

The Problem: Docker Desktop + BitLocker

After updating Docker Desktop to the latest version, I started facing issues running Sitecore XM Cloud containers. Even a simple container test like:

docker run --isolation=hyperv mcr.microsoft.com/windows/nanoserver:ltsc2022 cmd /c echo hello

failed with errors such as:

FSCTL_EXTEND_VOLUME \\?\Volume{GUID}: The media is write protected.

and later:

hcsshim::ExpandScratchSize failed in Win32: The system cannot find the file specified. (0x2)

This turned out to be a conflict between Docker’s Windows storage driver and BitLocker encryption.

Solution 1: Downgrade Docker Desktop


The easiest fix is to downgrade Docker Desktop to a stable version without this bug. Version 4.37.1 works perfectly.

Steps:
1. Uninstall Docker Desktop (latest version).
2. Download and install Docker Desktop 4.37.1 (https://docs.docker.com/desktop/release-notes/).
3. Restart your machine.

Solution : Update Docker Engine Settings

Another issue you may face is the buildkit warning when building containers:

Docker Compose is configured to build using Bake, but buildkit isn't enabled

To fix this, update your Docker Engine configuration:

{
  "dns": [
    "8.8.8.8"
  ],
  "experimental": false,
  "features": {
    "buildkit": false
  }
}

After saving the file, restart Docker Desktop for changes to take effect.

Solution : Fixing the hcsshim::ExpandScratchSize Error

If you see this error:

hcsshim::ExpandScratchSize failed in Win32: The system cannot find the file specified. (0x2)

it means your Docker Windows storage layers are corrupted.

Fix: Clean Docker’s Windows storage

Run this PowerShell as Administrator:

Stop-Service com.docker.service
Stop-Service docker

# Remove Windows container layers
Remove-Item -Recurse -Force "C:\ProgramData\Docker\windowsfilter" -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force "C:\ProgramData\Docker\containers" -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force "C:\ProgramData\Docker\image\windowsfilter" -ErrorAction SilentlyContinue

Start-Service com.docker.service
Start-Service docker

Now, test with a clean Windows container:

docker pull mcr.microsoft.com/windows/servercore:ltsc2022
docker run --rm --isolation=hyperv mcr.microsoft.com/windows/servercore:ltsc2022 cmd /c echo hello


✅ You should now see: hello

Final Thoughts

If you’re running Sitecore XM Cloud locally on Windows, here’s the checklist that worked for me:
- Downgrade Docker Desktop to 4.37.1
- Add correct Docker Engine settings to disable buildkit
- Clean up corrupted windowsfilter storage if you hit hcsshim::ExpandScratchSize errors

With these steps, I was finally able to get Sitecore XM Cloud running smoothly on my local machine without Docker crashes.

Monday, April 10, 2023

Reasons to move from Sitecore XP to Sitecore XM Cloud

As businesses continue to evolve and innovate, their digital strategies and web development needs must also adapt. In recent years, we have seen a shift towards using cloud-based platforms for web development and deployment, and the adoption of JavaScript-based frameworks for front-end development. Sitecore, a leading digital experience platform, has embraced this trend with the introduction of Sitecore XM Cloud and Next.js. 

If you currently have a Sitecore XP MVC-based website, you may be wondering why you should consider moving to Sitecore XM Cloud and Next.js. Today, we will explore some of the key benefits of making the move, and why it could be the right choice for your business. 

Here are some of the key reasons why businesses may want to consider moving from Sitecore XP to Sitecore XM Cloud: 

  • .NET Framework
  • Scalability
  • Improved Performance
  • Reduced Costs
  • Flexibility
  • Security
  • Faster time to market
  • Global reach
  • Ease of use
  • Improved collaboration
  • Continuous innovation
  • Better customer experiences
  • Reduced complexity
  • Lower total cost of ownership .NET Framework Since the .NET framework is on its way out, it would be wise to steer clear of it and redirect attention towards Javascript frameworks. As cloud is the future, it's a favorable time to start investing and focusing on cloud-based technologies. Scalability One of the main benefits of Sitecore XM Cloud is its scalability. Sitecore XM Cloud is a cloud-based platform that is designed to handle large amounts of traffic and data, making it ideal for businesses that need to scale quickly to meet demand. With Sitecore XM Cloud, businesses can easily scale up or down as needed, without having to worry about infrastructure management or capacity planning. Improved Performance Sitecore XM Cloud also offers improved performance compared to Sitecore XP. Sitecore XM Cloud is designed for high availability and reliability, ensuring that your website or application is always up and running. Additionally, Sitecore XM Cloud includes a range of performance optimization tools, such as Content Delivery Networks (CDNs) and caching, which can improve page load times and reduce server response times. Reduced Costs Another benefit of Sitecore XM Cloud is that it can help businesses reduce costs. Sitecore XM Cloud is a fully managed service, which means that businesses don't need to worry about infrastructure management or maintenance. This can significantly reduce the costs associated with managing and maintaining an on-premises infrastructure. Flexibility Sitecore XM Cloud also offers greater flexibility than Sitecore XP. Sitecore XM Cloud is a headless platform, which means that it can be integrated with a wide range of front-end frameworks, allowing developers to use the tools and frameworks that they are most comfortable with. This can help businesses build highly customized, tailored solutions for their clients. Security Sitecore XM Cloud provides enhanced security features, such as automatic updates and patches, proactive monitoring, and 24/7 security operations support. This can help businesses ensure that their websites and applications are protected against cyber threats. Faster time to market Sitecore XM Cloud includes a range of pre-built templates and components, which can help businesses get their websites and applications up and running quickly. This can significantly reduce the time to market for new digital experiences. Global reach Sitecore XM Cloud is designed to support businesses with a global presence. It includes a range of features, such as geo-targeting, multi-language support, and local hosting options, which can help businesses deliver personalized, localized experiences to users around the world. Ease of use Sitecore XM Cloud includes a user-friendly interface that makes it easy for businesses to manage their digital experiences. It also includes a range of tools for content management, analytics, and personalization, which can help businesses improve the efficiency and effectiveness of their digital operations. Improved collaboration Sitecore XM Cloud includes collaboration tools that can help teams work together more effectively. Continuous innovation Sitecore XM Cloud is a cloud-based platform that is continually updated with new features and capabilities. This means that businesses can benefit from the latest innovations and best practices without having to worry about upgrading their infrastructure or software. Better customer experiences Sitecore XM Cloud is designed to help businesses deliver exceptional customer experiences across all channels and touchpoints. By leveraging the power of Sitecore XM Cloud, businesses can create personalized, targeted experiences that engage and delight their users, driving loyalty and advocacy. Reduced complexity Sitecore XM Cloud is designed to simplify the digital experience management process, making it easier for businesses to manage and optimize their websites and applications. By reducing complexity, businesses can free up resources to focus on other areas of their business, such as innovation, product development, and customer engagement. Lower total cost of ownership Sitecore XM Cloud can help businesses reduce their total cost of ownership by eliminating the need for on-premises infrastructure and reducing maintenance and management costs. Additionally, Sitecore XM Cloud includes flexible pricing options, which can help businesses tailor their costs to their specific needs and usage patterns. Conclusion There are many reasons why businesses may want to consider moving from Sitecore XP to Sitecore XM Cloud. By leveraging the scalability, performance, security, flexibility, collaboration, insights, innovation, customer experience, and simplicity of Sitecore XM Cloud, businesses can achieve their digital transformation goals and drive growth and success in the digital age.

Here is video for the same