UTM Archives - ISbyR https://isbyr.com/tag/utm/ Infrequent Smarts by Reshetnikov Sun, 11 Feb 2024 22:20:10 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 Fix time drift on UTM Windows VM https://isbyr.com/fix-time-drift-on-utm-windows-vm/ https://isbyr.com/fix-time-drift-on-utm-windows-vm/#respond Wed, 17 Jan 2024 22:08:43 +0000 https://isbyr.com/?p=1145 I mainly use Mac for work, but occasionally need access to a Windows box. I am using UTM to achieve that. I have noticed that if you leave your Windows VM running and then your host Mac goes to sleep (overnight for example), there will be a time drift on the VM. So here is … Continue reading Fix time drift on UTM Windows VM

The post Fix time drift on UTM Windows VM appeared first on ISbyR.

]]>
I mainly use Mac for work, but occasionally need access to a Windows box. I am using UTM to achieve that. I have noticed that if you leave your Windows VM running and then your host Mac goes to sleep (overnight for example), there will be a time drift on the VM. So here is how to fix time drift on UTM Windows VM.

Discovery and manual approach

The first thing I checked was if the time is set automatically, and yes it is

Then I tried to turn it off/on – and it helped! It fixed the time drift on the UTM Windows VM.

But that only lasted until the next time MAC went to sleep… 🙁

Semi-automatic approach

While toggling the switch using Windows UI I noticed that a pop-up message was displayed

That gave me an idea: instead of manually toggling the time switch, why don’t I run the above command?! Hmm, but what kind of parameters should I use?

Luckily there was the “Show more details” link.

So, I put the below command inside a batch file and every time I access the UTM Windows VM I just run it manually.

it.C:\Windows\System32\SystemSettingsAdminFlows.exe SetInternetTime 1

While not a fully an automatic approach it saves me from going into Time settings and toggling the switch.

How to automatically fix time drift on UTM Windows VM

Now if you want a fully hands-off approach just create a scheduled job to run this batch for you.

You could either do it on a scheduled basis, like let’s say every 5 minutes, or better on a certain “wake-up” Windows event. Once I figure out what is the best event to use as the trigger I’ll update this section.

More posts about UTM

The post Fix time drift on UTM Windows VM appeared first on ISbyR.

]]>
https://isbyr.com/fix-time-drift-on-utm-windows-vm/feed/ 0
Centos – repair corrupt boot drive https://isbyr.com/centos-repair-corrupt-boot-drive/ https://isbyr.com/centos-repair-corrupt-boot-drive/#comments Tue, 25 Jan 2022 06:35:26 +0000 http://isbyr.com/?p=681 After unexpected shutdown of my Mac, UTM VMs (that were running at that time) failed to start with following message “Entering emergency mode. Exit the shell to continue”, After digging a little it turned out that the problem was a corrupt boot drive. To fix it: Restart the VM in UTM In the boot menu … Continue reading Centos – repair corrupt boot drive

The post Centos – repair corrupt boot drive appeared first on ISbyR.

]]>
After unexpected shutdown of my Mac, UTM VMs (that were running at that time) failed to start with following message “Entering emergency mode. Exit the shell to continue”,

"Entering emergency mode. Exit the shell to continue" Error

After digging a little it turned out that the problem was a corrupt boot drive.


To fix it:

Restart the VM in UTM

In the boot menu select the rescue boot option

Centos boot options

Now run

xfs_repair -L /dev/mapper/centos-root

Restart the VM again and can use the normal boot option.

The post Centos – repair corrupt boot drive appeared first on ISbyR.

]]>
https://isbyr.com/centos-repair-corrupt-boot-drive/feed/ 3
UTM VM fails to start “qcow2: Image is corrupt; cannot be opened read/write” https://isbyr.com/utm-vm-fails-to-start-qcow2-image-is-corrupt-cannot-be-opened-read-write/ https://isbyr.com/utm-vm-fails-to-start-qcow2-image-is-corrupt-cannot-be-opened-read-write/#respond Tue, 25 Jan 2022 06:19:51 +0000 http://isbyr.com/?p=677 Issue After trying to repair a wrong drive, my VM on UTM crashed and failed to start with this message “qcow2: Image is corrupt; cannot be opened read/write” By the way here is how to repair CentOS boot drive correctly The fix To fix it you will need to check if there are issues with … Continue reading UTM VM fails to start “qcow2: Image is corrupt; cannot be opened read/write”

The post UTM VM fails to start “qcow2: Image is corrupt; cannot be opened read/write” appeared first on ISbyR.

]]>
Issue

After trying to repair a wrong drive, my VM on UTM crashed and failed to start with this message “qcow2: Image is corrupt; cannot be opened read/write”

UTM qemu drive error

By the way here is how to repair CentOS boot drive correctly

The fix

To fix it you will need to check if there are issues with the disk image

qemu-img check ~/Library/Containers/com.utmapp.UTM/Data/Documents/VM_NAME/Images/IMAGE_NAME

Off course replace the VM_NAME and IMAGE_NAME with the values relevant to your system. For example for me it was: ~/Library/Containers/com.utmapp.UTM/Data/Documents/centos.utm/Images/CentOS_7.9.2009_VBM_LinuxVMImages.COM-disk001.qcow2

It will spit you a bunch of possible errors.

Then actually run the fix:

qemu-img check -r all ~/Library/Containers/com.utmapp.UTM/Data/Documents/VM_NAME/Images/IMAGE_NAME

Hope this has helped you to fix the issue with your qcow2 UTM VM.

The post UTM VM fails to start “qcow2: Image is corrupt; cannot be opened read/write” appeared first on ISbyR.

]]>
https://isbyr.com/utm-vm-fails-to-start-qcow2-image-is-corrupt-cannot-be-opened-read-write/feed/ 0