Microsoft ❤️ Linux? Microsoft ❤️ running its Windows' SQL Server software on Linux

Embrace, extend, er, enter


In March, when Microsoft announced plans to release SQL Server for Linux, Scott Guthrie, EVP of Microsoft's cloud and enterprise group, said, "This will enable SQL Server to deliver a consistent data platform across Windows Server and Linux, as well as on-premises and cloud."

The release of the first public preview of SQL Server for Linux on Wednesday reveals just how consistent that platform is: It's the Windows version of SQL Server running on the Windows NT kernel as a guest app, more or less.

When Microsoft declared its love for Linux, it appears to have been looking in the mirror.

Microsoft could have ported SQL Server to run as a native Linux application. Instead, it has chosen to use its Drawbridge application sandboxing technology.

SQL Server for Linux runs atop a Drawbridge Windows library OS – a user-mode NT kernel – within a secure container called a picoprocess that communicates with the host Linux operating system through the Drawbridge application binary interface.

In other words, Microsoft's SQL Server for Linux is really the Windows SQL Server executable with a small Windows 8 kernel glued underneath, all running in a normal Linux process.

Drawbridge references can be found in an 8.4MB library found at /opt/mssql/lib/system.sfp. The /opt/mssql/bin/sqlservr binary is really a loader – having studied its code, we found it brings components into a sandbox and performs integrity checks and whitelisting to make sure it is allowed to do so, and then runs the contained SQL Server executable.

The Register asked Microsoft to explain itself but has not heard back.

Virtualization has helped blur the boundaries between operating systems, a trend that's been underway for years. Mac users have been able to boot into Windows through Boot Camp or virtualization software like Parallels. Linux users have been able to run Windows apps using Wine.

More recently, Android users have gained the ability to run Android apps on Chromebooks. And Mirage OS, a project backed by Xen and the Linux Foundation, allows developers to write apps in a native OS like macOS and compile them into a unikernel that runs under the Xen hypervisor.

Containerization has encouraged further levels of abstraction and cross-platform compatibility, even as it distances users from their software. It's difficult to care much about operating systems when many containers get launched and shut down in less than a minute.

Drawbridge containers promise less overhead than traditional virtualization. "The Drawbridge picoprocess interface surfaces threads, private virtual memory, and I/O streams instead of low-level hardware abstractions like CPUs, MMUs, and device registers," Microsoft explains.

"These higher-level abstractions allow for much more efficient implementations of OS code hosted within the picoprocess. These higher-level abstractions also allow for much more efficient resource utilization."

Drawbridge also obviates the labor-intensive process of rewriting Windows applications to use Linux and POSIX calls. It also means, in theory, Microsoft can use this technology to bring its other Windows server applications to Linux with minimal changes, using SQL Server as a starting point.

Where once Linux was a cancer to Microsoft, now Windows is growing inside of Linux. ®

Microsoft SQL Server for Linux reverse-engineered by Chris Williams.


Other stories you might like

  • Cheers ransomware hits VMware ESXi systems
    Now we can say extortionware has jumped the shark

    Another ransomware strain is targeting VMware ESXi servers, which have been the focus of extortionists and other miscreants in recent months.

    ESXi, a bare-metal hypervisor used by a broad range of organizations throughout the world, has become the target of such ransomware families as LockBit, Hive, and RansomEXX. The ubiquitous use of the technology, and the size of some companies that use it has made it an efficient way for crooks to infect large numbers of virtualized systems and connected devices and equipment, according to researchers with Trend Micro.

    "ESXi is widely used in enterprise settings for server virtualization," Trend Micro noted in a write-up this week. "It is therefore a popular target for ransomware attacks … Compromising ESXi servers has been a scheme used by some notorious cybercriminal groups because it is a means to swiftly spread the ransomware to many devices."

    Continue reading
  • Twitter founder Dorsey beats hasty retweet from the board
    As shareholders sue the social network amid Elon Musk's takeover scramble

    Twitter has officially entered the post-Dorsey age: its founder and two-time CEO's board term expired Wednesday, marking the first time the social media company hasn't had him around in some capacity.

    Jack Dorsey announced his resignation as Twitter chief exec in November 2021, and passed the baton to Parag Agrawal while remaining on the board. Now that board term has ended, and Dorsey has stepped down as expected. Agrawal has taken Dorsey's board seat; Salesforce co-CEO Bret Taylor has assumed the role of Twitter's board chair. 

    In his resignation announcement, Dorsey – who co-founded and is CEO of Block (formerly Square) – said having founders leading the companies they created can be severely limiting for an organization and can serve as a single point of failure. "I believe it's critical a company can stand on its own, free of its founder's influence or direction," Dorsey said. He didn't respond to a request for further comment today. 

    Continue reading
  • Snowflake stock drops as some top customers cut usage
    You might say its valuation is melting away

    IPO darling Snowflake's share price took a beating in an already bearish market for tech stocks after filing weaker than expected financial guidance amid a slowdown in orders from some of its largest customers.

    For its first quarter of fiscal 2023, ended April 30, Snowflake's revenue grew 85 percent year-on-year to $422.4 million. The company made an operating loss of $188.8 million, albeit down from $205.6 million a year ago.

    Although surpassing revenue expectations, the cloud-based data warehousing business saw its valuation tumble 16 percent in extended trading on Wednesday. Its stock price dived from $133 apiece to $117 in after-hours trading, and today is cruising back at $127. That stumble arrived amid a general tech stock sell-off some observers said was overdue.

    Continue reading

Biting the hand that feeds IT © 1998–2022