"Failed to retrieve the machine identifier data."

Hello,

When building and running the GUILinuxVirtualMachineSampleApp, I immediately get the error :

"Failed to retrieve the machine identifier data."

The app runs with a black window and an infinite loop icon without the file picker prompt as expected.

Hardware : MacBook Pro M2 OS : macOS 13.2.1

Can't understand what's causing it relatively to the VZGenericMachineIdentifier object.

Any insight or suggestion would be more than appreciated.

Thanks in advance :).

Sincerely,

hex0x40

Replies

The machine identifier is created the first time the app is launched. The method createAndSaveMachineIdentifier() is where the identifier is created. It is only invoked if the GUI Linux VM.bundle doesn't exist.

My guess is the first time the sample code was run, this failed somehow. It could be:

  • A breakpoint was set during creation and execution was stopped.
  • The disk was full at the time of creation.

If there is no data you need to save in the VM, the easiest way to get back on track is to delete the bundle and let the sample app create a new empty one.

Thanks a lot BenjaminApple for your insights.

Unfortunately, it doesn't even get to the point of having the bundle created. Fresh new machine, already reinstalled, etc. Can't understand the error.

Will dig it further. Thanks again.

In my case, the problem was that the code creates a 64GB disk image for the linux installation, which my machine didn't have enough capacity for.

Reducing it on line 53 solved the problem:

try mainDiskFileHandle.truncate(atOffset: 64 * 1024 * 1024 * 1024)

Regards,

Jalal Almutawa

I bumped into the same problem and @jmutawa 's response solved my issue, but with a quirk:

  • The first time I run the project, I was messing around and did not continue with the VM creation with an ISO.
  • The second time I tried to run, it started to give the error.

It was annoying until I checked line 10-15, and then see this 64GB big VM file my user folder. Apparent that it was created in my first attempt, but It was not used for subsequent runs.

Removing that file first emptied enough space already but reducing its disk size also helped a lot more.

I spoke too early as somewhere else there is another problem I fail to fix:

  • for some reason, even if you change disk size, it still holds 64GB value and creates a disk of that size regardless of your change.
  • change the bundle path in line 10, and only then your manually changed size will be used.

Now it fails on line 237: "failed to start". But this might be because I tried to use a network installer iso image.

Can't say downloading a full iso would fix it, because I am now tired of trying and give up for the moment.

  • Did you ever find a solution to this? I'm having the exact same problem as you Yilmazdurmaz. I'm about to give up.

Add a Comment