Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtofs: errors when accessing with c++ std::filesystem #950

Closed
MichaelDietzel opened this issue Aug 1, 2023 · 2 comments
Closed

virtofs: errors when accessing with c++ std::filesystem #950

MichaelDietzel opened this issue Aug 1, 2023 · 2 comments
Assignees

Comments

@MichaelDietzel
Copy link

MichaelDietzel commented Aug 1, 2023

Describe the bug
I am trying to launch the game factorio (1.1.87) from my virtiofs. However I get an error message that apparently originates from c++ std::filesystem. Translated to english it is something like: "weakly_canonical: There is no file system detected on the disk. Make sure all required file system drivers are loaded and the disk is not damaged." Launching from a real ntfs works flawlessly.

I tried the following, but it did not help:

  • I tried the factorio-version from steam as well as the paid version and the free demo directly downloaded from factorio.com (afaik without drm).
  • I first tried the drivers from virtio-win-0.1.229.iso from fedora, then I copiled them myself from master.
  • I set the registry key for virtiofs to be case insensitive (does not seem to work well with the drivers from virtio-win-0.1.229.iso, works kind of ok with master)
  • I set the registry key for virtiofs to report itself as nfts (does not work at all with the drivers from virtio-win-0.1.229.iso, but it works with master).

My bug report in the factorio forums where they tell they just use c++ std::filesystem.

To Reproduce
Steps to reproduce the behaviour:

  1. set up a windows 10 vm that can run factorio from a regular ntfs. It probably needs graphics acceleration, I passed through a Nvidia GTX 1060. Maybe you do not even need the graphics acceleration as the error may trigger before needing any. I have not tested it without, though.
  2. install virtiofs using winfsp 2.0
  3. set up virtiofs on Z:, configured to be case insensitive + report to be ntfs
  4. download the zip-version of the free demo of factorio from factorio.com and unpack it on Z:
  5. launch factorio (\bin\x64\factorio.exe)

Expected behavior
Factorio launches without any error message. As do a few other steam-games I tested.

Screenshots
Factorio virtiofs

Host:

  • Disto: Ubuntu 22.04
  • Kernel version: 5.15.0-67 with a patch for creative x-fi soundcard passthrough
  • QEMU version: 6.2.0
  • libvirt version: 8.0.0
  • The storage for virtiofs is on zfs

VM:

  • Windows 10 21H2
  • virtiofs
  • Driver version or commit hash that was used to build the driver: 0.1.229.iso and 65cea19
@viktor-prutyanov
Copy link
Collaborator

The issue is the same as #517

#include <iostream>
#include <filesystem>

int main()
{
	auto p = std::filesystem::path("Z:\\");

	try
	{
		auto p2 = std::filesystem::weakly_canonical(p);
		std::cout << p2 << std::endl;
	}
	catch (const std::exception& ex)
	{
		std::cout << ex.what() << std::endl;
	}

	return 0;
}

With -m Z:

weakly_canonical: The volume does not contain a recognized file system.                                                 Please make sure that all required file system drivers are loaded and that the volume is not corrupted.: "Z:\" 

With -m \\.\Z (global mount):

Z:\\

@viktor-prutyanov
Copy link
Collaborator

@MichaelDietzel
There is a workaround for your use: use global mount (i.e. mount \\.\Z: instead of Z:\)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants