Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing Gentoo in a QEmu VM located on a NAS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1599
Location: Adelaide/Australia

PostPosted: Fri Nov 08, 2024 9:50 am    Post subject: Installing Gentoo in a QEmu VM located on a NAS Reply with quote

Just letting people know of my experience.
I created my base disk image on my normal Gentoo filesystem and proceeded to install, all good.

I figured that I would put the VM image up on my NAS, just for fun.

I then moved my Disk image to an AsuStore NAS which has shares my host Gentoo mounts and has a touch more storage than my Gentoo system.

However, whenever I shutdown the Gentoo VM using 'shutdown -h now', the image requires 'repair', according to QEmu.

And, QEmu is unable to repair the disk whilst the image is on the NAS!

I tried the command line 'qemu-img check --repair all Gentoo.qcow2' and it would fail with lack of permissions.

If I copied the Image back to local storage, the repair worked.

If I copied the Image back to the NAS, Qemu would boot the image, but it would fail again, the boot after that.

The repair did something because the md5sum of the before and after Gentoo.qcow where different.

Obviously, permissions on the NAS where ok, otherwise Qemu would not be able to boot the image at all.

I suspect it's some underlying filesystem limitation of the 'share protocol', not the NAS storage, which is btrfs.

I am unable to provide an answer on this one, but thought I would share my experience with trying to have a QEmu VM stored on a NAS.
_________________
...Lyall
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22877

PostPosted: Fri Nov 08, 2024 2:42 pm    Post subject: Reply with quote

That sounds like the NAS is not sharing the file correctly. For almost all purposes (possibly excepting some things around locking), NFS should work like local storage, only slower. Is the share done using NFS? You never mentioned directly what protocol it uses.

When you tried the repair on the NAS, and it failed, exactly what failed? The output of qemu would be a good start, and an strace log of the failed repair might be better (though much more verbose).
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1599
Location: Adelaide/Australia

PostPosted: Sat Nov 09, 2024 12:12 am    Post subject: Reply with quote

I did not mention I also have windows VM's, both QEmu and VirtualBox on the NAS, they work fine.
It's only the Gentoo image that has problems.
Give me a little while to provide the information you have requested, it takes a bit of time moving 100G images around... my host is not the most modern machine :)

Edit: For crying out loud, the problem does not happen now... sigh.... I will continue testing....
_________________
...Lyall
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum