Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED ]qemu - 32 bit vm boot fails from version 8.2.7
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
ipic
Guru
Guru


Joined: 29 Dec 2003
Posts: 412
Location: UK

PostPosted: Wed Jan 08, 2025 10:16 am    Post subject: [SOLVED ]qemu - 32 bit vm boot fails from version 8.2.7 Reply with quote

Upgraded qemu from 8.2.3 to 8.2.7 (i'm following stable versions in portage).
After this - my 32-bit VM's failed to boot, reason being that the boot drive could not be opened (invalid file system). 64bit VM's boot OK, so this is a 32 bit kernel problem.

After some digging, the blame 'appears' to be with the seabios release that also got updated (sys-firmware/seabios-bin 1.16.0 -> 1.16.3)

I found this post: https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/message/E6W2C4GZCEQ4KZ3WJUN5HRH54GBRWSQT/

It is an old article, but suggests:
Code:

Recommended action: turn off 64-bit support (long mode) in the cpu:

qemu -cpu host,lm=off


I'd like to try this, but I cannot find a way to set that in libvirt XML.

Anyone know how?


Last edited by ipic on Wed Jan 08, 2025 2:00 pm; edited 1 time in total
Back to top
View user's profile Send private message
ipic
Guru
Guru


Joined: 29 Dec 2003
Posts: 412
Location: UK

PostPosted: Wed Jan 08, 2025 1:23 pm    Post subject: Reply with quote

I forced a downgrade of seabios with qemu 8.2.7 installed, and the 32-bit VMs boot with seabios 1.16.0.

So, seabios is definitely the culprit.
I can't figure out what to change to make it work though :-(
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1975

PostPosted: Wed Jan 08, 2025 1:36 pm    Post subject: Reply with quote

To disable 64-bit host detection for libvirt, in the CPU definition, add:
Code:
<feature policy='disable' name='lm'/>
Back to top
View user's profile Send private message
ipic
Guru
Guru


Joined: 29 Dec 2003
Posts: 412
Location: UK

PostPosted: Wed Jan 08, 2025 1:57 pm    Post subject: Reply with quote

grknight wrote:
To disable 64-bit host detection for libvirt, in the CPU definition, add:
Code:
<feature policy='disable' name='lm'/>


Thank you sir!

I did the upgrade, added that line to the VM XML, and now the 32bit VM's boot.

Just for full reference the XML snippet that libvirt creates is:
Code:

  <cpu mode="host-model" check="partial">
    <feature policy="disable" name="lm"/>
  </cpu>


Thanks again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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