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

Ubuntu upgrade causes UTM to crash VM and corrupts it #6055

Open
brunocastello opened this issue Jan 31, 2024 · 5 comments
Open

Ubuntu upgrade causes UTM to crash VM and corrupts it #6055

brunocastello opened this issue Jan 31, 2024 · 5 comments

Comments

@brunocastello
Copy link

BEFORE SUBMITTING YOUR ISSUE, PLEASE LOOK AT THE PINNED ISSUES AND USE THE SEARCH FUNCTION TO MAKE SURE IT IS NOT ALREADY REPORTED. ALWAYS COMMENT ON AN EXISTING ISSUE INSTEAD OF MAKING A NEW ONE.

Describe the issue
Ubuntu upgrade causes UTM to crash VM and corrupts it. Then the machine no longer boots. UTM shows a popup message about an error related to "illegal byte sequence" several times, which I have to dismiss. The VM continues running until I shutdown or reboot. Then it no longer boots again due to being a corrupted image.

The VM is running Ubuntu 23.04 ARM64. I am attempting a full upgrade to latest version available.

The VM is also running from an external M2. NVMe SSD in a USB-C enclosure. I have never seen a such error in like 3 years running UTM.

Configuration

  • UTM Version: 4.4.5
  • macOS Version: macOS Sonoma 14.3
  • Mac Chip (Intel, M1, ...): Mac Studio M1 Max

Crash log
The app didn't crash, however showed a sequence of errors while trying to update a Ubuntu VM. "Illegal byte sequence"

Debug log
Unable to create one due to the machine being unable to boot again.

Upload VM
Well can't upload it due to sensitive data contained on it, plus the machine was replaced by a working backup.

@wrmack
Copy link

wrmack commented Jan 31, 2024

If you were using Apple virtualization your issue might be fixed by this pull request: #5919

@brunocastello
Copy link
Author

Interesting. Can you explain to me in lay terms? As I can see, using NVMe solves it but its slower, right? For an existing Ubuntu VM, which uses a virtio drive, how do I work around this with regards to caching? Do I need to configure something or just wait for the PR to be merged?

@wrmack
Copy link

wrmack commented Feb 1, 2024

I think wait until PR is merged. In the meantime I am using Cirruslab Tart which is a command-line app for Apple virtualization. It meets my needs for linux. I have not noticed nvme being slower. Steps for doing this:

# Install tart
brew update
brew upgrade
brew install cirruslabs/cli/tart

# Set environment variable for location of VM (in my case an external SSD drive)
TART_HOME=/Volumes/p873445/VirtualMachines/Tart
export TART_HOME

# Create linux VM (I called mine ubuntu240105 - name is up to you)
tart create --linux ubuntu240105

# It is possible to set various configuration options - see:
tart set --help

# Install Ubuntu server (I downloaded Ubuntu 24.04 Noble)
tart run --disk ~/Downloads/noble-live-server-arm64.iso ubuntu240105

# Run Ubuntu server 
tart run ubuntu240105

# In Ubuntu server, login and install Ubuntu desktop. 
sudo apt update
sudo apt upgrade
sudo apt install ubuntu-desktop

# I updated kernel to latest mainline kernel

# Set resolution of grub menu (default was too small)
sudo nano /etc/default/grub

# then set:  GRUB_GFXMODE=1280x800
sudo grub-mkconfig -o /boot/grub/grub.cfg

I then created a small script for starting the VM each time I wanted to use it:

#! /bin/bash

TART_HOME=/Volumes/p873445/VirtualMachines/Tart
export TART_HOME
tart run ubuntu240105

I have not tried to get clipboard sharing with host working.
I had some difficulty getting sound working but it is great now.

Hope this helps.

@brunocastello
Copy link
Author

Eh I'll wait for the PR. This VM isnt a daily driver but just a small web development env vm. I occasionally pop it up for some personal projects. Thanks for your help!

@gkyildirim
Copy link

Nvme might not be the solution?

#5919 (comment)

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

No branches or pull requests

3 participants