How to solve: 'Please append a correct "root=" boot option' ?

2023-04-19 Thread Freitas GDH
Hi there!

I'm using a customized qemu-4.0.0 with SOC RT3352 (implemented by Firmguide
) in order to emulate D-Link
DIR-615 firmware. Using an openwrt file I got a dtb file and compiled qemu
successfully. But when I'm trying to emulate the firmware, I'm not able to
identify the right mapping for my FS image file. I used two different
squashfs files, one extracted from stock firmware and the other from
openwrt lede-17.01.7 image. In both cases I got the same error. The
following are the command syntax used.








*/tmp/qemu-4.0.0/mipsel-softmmu/qemu-system-mipsel \-D /dev/null \-M
fg_DIR_615_H1_ralink_rt3352_soc \-kernel
/home/fenix/firmguide/_lede-17.01.7-ramips-rt305x-dir-615-h1-squashfs-sysupgrade.bin.extracted/0.uimage
\-dtb
/home/fenix/firmguide/_lede-17.01.7-ramips-rt305x-dir-615-h1-squashfs-sysupgrade.bin.extracted/_40.extracted/410.dtb,offset=0x410
\-nographic \-drive
file=/tmp/dir-615_H1/lede-17.01.7_dir-615.squashfs,if=none,format=raw
\-append "root=/dev/vda"*

I used: vda, vda1, sda, sda1.

Piece of log:

[1.544687] rt2880_wdt 1120.watchdog: Initialized
[1.546636] NET: Registered protocol family 10
[1.558513] NET: Registered protocol family 17
[1.559810] bridge: automatic filtering via arp/ip/ip6tables has been
deprecated. Update your scripts to load br_netfilter if you need this.
[1.560308] 8021q: 802.1Q VLAN Support v1.8
[1.564650] fdt: not creating '/sys/firmware/fdt': CRC check failed


*[1.579213] VFS: Cannot open root device "vda" or unknown-block(0,0):
error -6[1.579566] Please append a correct "root=" boot option; here
are the available partitions:[1.580137] Kernel panic - not syncing:
VFS: Unable to mount root fs on unknown-block(0,0)*
[1.582285] Rebooting in 1 seconds..
[3.551589] Reboot failed -- System halted


But if instead of *-drive *I use -*initrd* the emulation runs successfully.
-initrd 0.cpio \
-append "console=ttyS0 nowatchdog nokaslr"

O also tried to create a cpio file from the squashfs files, but I got the
same error 'cannot open root device...'.

Thank you !


Re: Max memory on VM (debian bullseye)

2023-04-19 Thread Peter Maydell
On Wed, 19 Apr 2023 at 17:33, Wilm Boerhout  wrote:
>
> Is there a Qemu/KVM live CD or such with the minimum 64-bit Debian set to 
> support it?

The Debian official live CD image will probably do fine:
https://www.debian.org/CD/live/
I don't know if QEMU is installed in it by default but if it isn't
you should be able to install it from the network once you've booted
the liveCD on your host.

thanks
-- PMM



RE: Max memory on VM (debian bullseye)

2023-04-19 Thread Wilm Boerhout
Is there a Qemu/KVM live CD or such with the minimum 64-bit Debian set to 
support it?

-Original Message-
From: Peter Maydell  
Sent: Wednesday, April 19, 2023 6:30 PM
To: Wilm Boerhout 
Cc: Qemu-discuss ; Narcis Garcia 

Subject: Re: Max memory on VM (debian bullseye)

On Wed, 19 Apr 2023 at 17:27, Wilm Boerhout  wrote:
> (Bangs forehead to wall). I have been working too long with Raspberry 
> Pi's with 64 bit Debian. I never noticed that the laptop runs a 32-bit 
> version of Debian now.

Yeah, if your *host* is running a 32-bit kernel I would definitely suggest 
switching that to 64-bit if you can :-)

-- PMM




Re: Max memory on VM (debian bullseye)

2023-04-19 Thread Peter Maydell
On Wed, 19 Apr 2023 at 17:27, Wilm Boerhout  wrote:
> (Bangs forehead to wall). I have been working too long
> with Raspberry Pi's with 64 bit Debian. I never noticed
> that the laptop runs a 32-bit version of Debian now.

Yeah, if your *host* is running a 32-bit kernel I would
definitely suggest switching that to 64-bit if you can :-)

-- PMM



RE: Max memory on VM (debian bullseye)

2023-04-19 Thread Wilm Boerhout
(Bangs forehead to wall). I have been working too long with Raspberry Pi's with 
64 bit Debian. I never noticed that the laptop runs a 32-bit version of Debian 
now.

Back to the drawing board.

Thanks for the time you saved me!

Wilm

-Original Message-
From: Peter Maydell  
Sent: Wednesday, April 19, 2023 6:16 PM
To: Wilm Boerhout 
Cc: Qemu-discuss ; Narcis Garcia 

Subject: Re: Max memory on VM (debian bullseye)

On Wed, 19 Apr 2023 at 17:14, Wilm Boerhout  wrote:
> Thank you Narcis for your attention. Pc.ram is in the error message. And the 
> difference between GB and GiB is not the issue.
>
> I tried binging memory down from 12 GB, and only when it was 1 GB, it would 
> start the VM. Is there a restriction somewhere that I am not aware of?



> Fout bij starten van domein: internal error: qemu unexpectedly closed 
> the monitor: 2023-04-19T16:11:28.206086Z qemu-system-i386: -object 
> memory-backend-ram,id=pc.ram,size=12884901888: cannot set up guest 
> memory 'pc.ram': Invalid argument

qemu-system-i386 is the binary for 32-bit QEMU x86 targets. There is always 
going to be a restriction on the amount of memory it can use, because it's 
32-bit. If you want as much as 12GB of RAM, don't you want qemu-system-x86_64 
(and probably also a 64-bit guest) ?

thanks
-- PMM




Re: Max memory on VM (debian bullseye)

2023-04-19 Thread Peter Maydell
On Wed, 19 Apr 2023 at 17:14, Wilm Boerhout  wrote:
> Thank you Narcis for your attention. Pc.ram is in the error message. And the 
> difference between GB and GiB is not the issue.
>
> I tried binging memory down from 12 GB, and only when it was 1 GB, it would 
> start the VM. Is there a restriction somewhere that I am not aware of?



> Fout bij starten van domein: internal error: qemu unexpectedly closed the 
> monitor: 2023-04-19T16:11:28.206086Z qemu-system-i386: -object 
> memory-backend-ram,id=pc.ram,size=12884901888: cannot set up guest memory 
> 'pc.ram': Invalid argument

qemu-system-i386 is the binary for 32-bit QEMU x86 targets. There is
always going to be a restriction on the amount of memory it can
use, because it's 32-bit. If you want as much as 12GB of RAM,
don't you want qemu-system-x86_64 (and probably also a 64-bit guest) ?

thanks
-- PMM



RE: Max memory on VM (debian bullseye)

2023-04-19 Thread Wilm Boerhout
Thank you Narcis for your attention. Pc.ram is in the error message. And the 
difference between GB and GiB is not the issue.

I tried binging memory down from 12 GB, and only when it was 1 GB, it would 
start the VM. Is there a restriction somewhere that I am not aware of?

Wilm

Error msg:

Fout bij starten van domein: internal error: qemu unexpectedly closed the 
monitor: 2023-04-19T16:11:28.206086Z qemu-system-i386: -object 
memory-backend-ram,id=pc.ram,size=12884901888: cannot set up guest memory 
'pc.ram': Invalid argument

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in cb_wrapper
callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 101, in tmpcb
callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, 
in newfn
ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1329, in 
startup
self._backend.create()
  File "/usr/lib/python3/dist-packages/libvirt.py", line 1353, in create
raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor: 
2023-04-19T16:11:28.206086Z qemu-system-i386: -object 
memory-backend-ram,id=pc.ram,size=12884901888: cannot set up guest memory 
'pc.ram': Invalid argument

-Original Message-
From: qemu-discuss-bounces+wboerhout=gmail@nongnu.org 
 On Behalf Of Narcis Garcia
Sent: Wednesday, April 19, 2023 6:07 PM
To: Qemu-discuss 
Subject: Re: Max memory on VM (debian bullseye)

I don't see "pc.ram" in your XML.

I see two tags:  and  to specify 12 GiB (not 12GB)


El 19/4/23 a les 16:18, Wilm Boerhout ha escrit:
> I installed and configured KVM on a HP Zbook 15 laptop with 2x4 CPUs 
> and 24GB of memory
> 
> OS is Debian bullseye
> 
> No matter what I try, any VM with > 1GB virtual memory gives an error 
> message on start:
> 
> Cannot set up guest memory,’pc.ram’: invalid argument.
> 
> In the target XML file, the amount of memory (I need 12GB for my VM) 
> is expressed in KiB and appears correct.
> 
> Any suggestions?
> 
> /Wilm
> 
> 
> 
> 
> 
>VMSx86
> 
> adb2de34-d2b9-4c23-96dc-f2ee9ab2977a
> 
> 12582912
> 
>12582912
> 
>2
> 
>
> 
>  hvm
> 
>   type='pflash'>/usr/share/OVMF/OVMF_CODE.fd
> 
>  /var/lib/libvirt/qemu/nvram/VMSx86_VARS.fd
> 
>  
> 
>
> 
>
> 
>  
> 
>  
> 
>  
> 
>  
> 
>
> 
>
> 
>
> 
>  
> 
>  
> 
>  
> 
>
> 
>destroy
> 
>restart
> 
>destroy
> 
>
> 
>  
> 
>  
> 
>
> 
>
> 
>  /usr/bin/qemu-system-i386
> 
>  
> 
>
> 
>
> 
>
> 
>
> 
> unit='0'/>
> 
>  
> 
>  
> 
>
> 
>
> 
>
> 
> unit='1'/>
> 
>  
> 
>  
> 
>
> 
>
> 
>
> 
> unit='2'/>
> 
>  
> 
>  
> 
>
> 
>
> 
>
> 
> unit='3'/>
> 
>  
> 
>  
> 
> function='0x7'/>
> 
>  
> 
>  
> 
>
> 
> function='0x0' multifunction='on'/>
> 
>  
> 
>  
> 
>
> 
> function='0x1'/>
> 
>  
> 
>  
> 
>
> 
> function='0x2'/>
> 
>  
> 
>  
> 
> function='0x2'/>
> 
>  
> 
>  
> 
>  
> 
>
> 
>
> 
> function='0x0' multifunction='on'/>
> 
>  
> 
>  
> 
>
> 
> function='0x0'/>
> 
>  
> 
>  
> 
>
> 
>
> 
> function='0x1'/>
> 
>  
> 
>  
> 
>
> 
>
> 
> function='0x2'/>
> 
>  
> 
>  
> 
>
> 
>
> 
> function='0x3'/>
> 
>  
> 
>  
> 
> function='0x0'/>
> 
>  
> 
>  
> 
>
> 
>
> 
>
> 
> function='0x0'/>
> 
>  
> 
>  
> 
>
> 
>  
> 
>
> 
>  
> 
>  
> 
>
> 
>  
> 
>  
> 
>
> 
>
> 
>  
> 
>  
> 
>
> 
>  
> 
>  
> 
>  
> 
>  
> 
>
> 
>
> 
>  
> 
>  
> 
> function='0x0'/>
> 
>  
> 
>  
> 
> heads='1' primary='yes'/>
> 
> function='0x0'/>
> 
>  
> 
>  
> 
>
> 
>  
> 
>  
> 
>
> 
>  
> 
>  
> 
> function='0x0'/>
> 
>  
> 
>
> 
> 
> 

--
Narcis Garcia





Re: Max memory on VM (debian bullseye)

2023-04-19 Thread Narcis Garcia

I don't see "pc.ram" in your XML.

I see two tags:  and  to specify 12 GiB (not 12GB)


El 19/4/23 a les 16:18, Wilm Boerhout ha escrit:
I installed and configured KVM on a HP Zbook 15 laptop with 2x4 CPUs and 
24GB of memory


OS is Debian bullseye

No matter what I try, any VM with > 1GB virtual memory gives an error 
message on start:


Cannot set up guest memory,’pc.ram’: invalid argument.

In the target XML file, the amount of memory (I need 12GB for my VM) is 
expressed in KiB and appears correct.


Any suggestions?

/Wilm





   VMSx86

adb2de34-d2b9-4c23-96dc-f2ee9ab2977a

12582912

   12582912

   2

   

     hvm

     type='pflash'>/usr/share/OVMF/OVMF_CODE.fd


     /var/lib/libvirt/qemu/nvram/VMSx86_VARS.fd

     

   

   

     

     

     

     

   

   

   

     

     

     

   

   destroy

   restart

   destroy

   

     

     

   

   

     /usr/bin/qemu-system-i386

     

   

   

   

   

   

     

     

   

   

   

   

     

     

   

   

   

   

     

     

   

   

   

   

     

     

   function='0x7'/>


     

     

   

   function='0x0' multifunction='on'/>


     

     

   

   function='0x1'/>


     

     

   

   function='0x2'/>


     

     

   function='0x2'/>


     

     

     

   

   

   function='0x0' multifunction='on'/>


     

     

   

   function='0x0'/>


     

     

   

   

   function='0x1'/>


     

     

   

   

   function='0x2'/>


     

     

   

   

   function='0x3'/>


     

     

   function='0x0'/>


     

     

   

   

   

   function='0x0'/>


     

     

   

     

   

     

     

   

     

     

   

   

     

     

   

     

     

     

     

   

   

     

     

   function='0x0'/>


     

     

   heads='1' primary='yes'/>


   function='0x0'/>


     

     

   

     

     

   

     

     

   function='0x0'/>


     

   





--
Narcis Garcia



Max memory on VM (debian bullseye)

2023-04-19 Thread Wilm Boerhout
I installed and configured KVM on a HP Zbook 15 laptop with 2x4 CPUs and
24GB of memory

OS is Debian bullseye 

 

No matter what I try, any VM with > 1GB virtual memory gives an error
message on start:

 

Cannot set up guest memory,'pc.ram': invalid argument. 

 

In the target XML file, the amount of memory (I need 12GB for my VM) is
expressed in KiB and appears correct.

 

Any suggestions?

 

/Wilm

 



 



  VMSx86

  adb2de34-d2b9-4c23-96dc-f2ee9ab2977a

  12582912

  12582912

  2

  

hvm

/usr/share/OVMF/OVMF_CODE.fd

/var/lib/libvirt/qemu/nvram/VMSx86_VARS.fd



  

  









  

  

  







  

  destroy

  restart

  destroy

  





  

  

/usr/bin/qemu-system-i386