Ubuntu Virtual Machine No Longer Works

Joined
Jan 4, 2014
Messages
1,644

Stage5-F100

Dabbler
Joined
Feb 29, 2020
Messages
26
[...] VirtIO [...]

Thanks for the help and the concise explanation. Seriously. That cleared it right up for me.


In addition to mcmuller, I would also like to confirm that changing my Ubuntu VM Disk and Network Adapters to VirtIO seems to have fixed everything (Disk I/O errors *and* the cursor errors)

I updated my other thread (no cursor response) with the same information.

Yinz are fabuous <3
 

kaamady

Cadet
Joined
Dec 5, 2018
Messages
7
OK ...

With AHCI the hypervisor painstakingly emulates a hardware device that is not there while the guest OS drives a HW interface that is not there.

So instead of saying "please give me block N from disk X" the guest OS has to fill in HW registers (that are not there) with e.g. a block address, triggers an interrupt, all this stuff that OSes do. The hypervisor then takes this data, reconstructs what the guest OS really wanted (read block N) and carries out the request. The hypervisor then triggers a request completion interrupt to wake up the part in the guest OS kernel that is waiting on the I/O ...

It's like you and me talking but instead of a direct connection in English you give your speech to an interpreter who translates it into Mandarin, gives it to another interpreter who translates it back and finally tells me.

VirtIO is an API specifically created for hypervisor environments where the guest OS can simply say "please give me block N". Similar for networking and a couple of other devices.

Long story short: if you run VMs you almost always want "paravirtualization" if available. All current open source guest OS's support it so there is really no reason not to use it. Try changing the setting and tell me how that goes ...

HTH,
Patrick
I have changed my VM to Virtio drivers as I too was using the default AHCI. The VM now fully boots and allows login to the terminal, but networking is broken so Plex can't connect to my network shares. How should I go about fixing the network? (For linux VMs I always select Virtio adapters)
I am also still seeing a few errors pop up from the previous problem.
 

Attachments

  • freenas error 5.PNG
    freenas error 5.PNG
    182 KB · Views: 269
Last edited:

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
@kaamady Check your Ubuntu VMs netplan config is referencing the correct interface "enp0s5" ....
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,737
Check with ifconfig -a if your interface actually is that one. ;) Adjust /etc/netplan/* accordingly.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912

Stage5-F100

Dabbler
Joined
Feb 29, 2020
Messages
26
Pittsburgh?!?
Formerly!

~ ~ ~ ~ ~ ~ ~

...just an update, again, this time with not-so-great news. All the cursor-freeze symptoms are back. This is with trying an odd core count, and VirtIO. Persists across reboots. Affects all of my Ubuntu VMs.

The only thing I did was update my Ubuntu (18.04 and 19.10) test VMs through software manager. (Didn't think this would be an issue, as I selected to install updates while running the installer).

Everything looked good, then I went to bed. Did updating the VMs somehow cause this, or merely a coincidence?

I can at least vouch that switching to VirtIO has fixed all of the constant Disk-I/O failure messages and read-only errors on every Ubuntu VM.
 

kaamady

Cadet
Joined
Dec 5, 2018
Messages
7
@kaamady Check your Ubuntu VMs netplan config is referencing the correct interface "enp0s5" ....
Check with ifconfig -a if your interface actually is that one. ;) Adjust /etc/netplan/* accordingly.
Wonderful! Thank you. Plex is back online and everyone is happy now haha.

Formerly!

~ ~ ~ ~ ~ ~ ~

...just an update, again, this time with not-so-great news. All the cursor-freeze symptoms are back. This is with trying an odd core count, and VirtIO. Persists across reboots. Affects all of my Ubuntu VMs.

The only thing I did was update my Ubuntu (18.04 and 19.10) test VMs through software manager. (Didn't think this would be an issue, as I selected to install updates while running the installer).

Everything looked good, then I went to bed. Did updating the VMs somehow cause this, or merely a coincidence?

I can at least vouch that switching to VirtIO has fixed all of the constant Disk-I/O failure messages and read-only errors on every Ubuntu VM.

Updating my VM using sudo apt update and upgrade caused this issue. Switching to Virtio disk seemed to mostly fix it. This issue happened on an older version of FreeNAS (11.2 U8.) I updated to 11.3 U2 in hopes that it would fix it, but it didn't.
I'm using the server version so I can't really attest to the cursor issues. Hopefully someone has some insight on that.
 
Last edited:

George51

Contributor
Joined
Feb 4, 2014
Messages
126
Worth mentioning, on my second server, setting disk to VirtIO allowed it to boot again, but I am now suffering from the frozen pointer issue.
 

Stage5-F100

Dabbler
Joined
Feb 29, 2020
Messages
26
Final word from the support ticket: iX are claiming that this isn't their problem due to the issue being noted in multiple versions of FreeNAS with the latest Ubuntu updates, and that the issue lies with the Ubuntu OS itself.
 

bignellrp

Dabbler
Joined
Mar 12, 2020
Messages
18
I wish I had read this post before going through the pain of restoring from an old snapshot. Just tried this on an Ubuntu VM that was getting IO errors 30 seconds into booting after upgrading from 11.3U1 to U2.

just changed the remaining Ubuntu VMs to use virtIO instead and they are all fine now.
 

allegiance

Explorer
Joined
Jan 4, 2013
Messages
53
Same here, update broke my Ubuntu 18 VM. Switched from AHCI to VirtIO, and now it works fine. Thanks!!!
 

short-stack

Explorer
Joined
Feb 28, 2017
Messages
80
Code:
root@truecommand:~# uname -a
Linux truecommand 4.15.0-96-generic #97-Ubuntu SMP Wed Apr 1 03:25:46 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Absolutely no problem here - all disks VirtIO.

If I am not mistaken you can change the setting without a reinstall. Ubuntu uses UUIDs in /etc/fstab, so the disks should be found regardless of device naming. Why would you use AHCI, anyway?

Kind regards,
Patrick

a while back I ran into this on Ubuntu 16.04 and I rolled the kernel back and forgot about it, went to install 20.04 tonight and ran into it again, switching from AHCI to VirtIO worked like a charm. Thanks!
 
Top