DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th August 2018
GarryR's Avatar
GarryR GarryR is offline
Real Name: Garry Ricketson
Spam Deminer
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 297
Default More QEMU ram and cpu size

Even with the manual, and also several tutorials, I can not seem to figure this out.

This is what works, to start the VM but I would like to increase the - m (memory, cpu) :
Code:
qemu-system-x86_64 -m 600 -drive if=virtio,file=disk.opnbsd63 -netdev user,id=mynet0,hostfwd=tcp:127.0.0.1:7922-:22 -device e1000,netdev=mynet0
When I try this:
Code:
qemu-system-x86_64 -m 1200 -drive if=virtio,file=disk.opnbsd63 -netdev user,id=mynet0,hostfwd=tcp:127.0.0.1:7922-:22 -device e1000,netdev=mynet0
I get this:
Quote:
WARNING: Image format was not specified for 'disk.opnbsd63' and probing guessed raw.
Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Specify the 'raw' format explicitly to remove the restrictions.
qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory
Which seems straightforward enough, how ever I can not seem to get the syntax correct, where or how do I specify the raw format, ?
Code:
 qemu-system-x86_64 -m 1000, -drive format=raw,file=disk.opnbsd63 -netdev user,id=mynet0,hostfwd=tcp:127.0.0.1:7922-:22  -device e1000,netdev=mynet0
Code:
qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory
Any help or advice will be appreciated
__________________
My best friends are parrots
Reply With Quote
  #2   (View Single Post)  
Old 6th August 2018
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 828
Default

I've never used qemu, but from your description it sounds like there are two problems being reported.

The first is a warning about the raw format. This seems not to be fatal, so the program proceeds.

The second problem is then encountered; it's an inability to allocate enough memory when you ask for more. This error is fatal.

It looks like by adding "format=raw" you did find the right syntax to avoid the first warning message. What I don't understand is why you didn't get that warning in the first example (with -m 600) that "worked". Is it possible that there actually was a warning, but it flashed by so quickly on the screen that you couldn't see it? Without the second (memory) error happening to stop the program, this seems plausible. But it's just a guess.

As for how to allocate more memory to the process, maybe an OpenBSD expert can comment on that.
Reply With Quote
  #3   (View Single Post)  
Old 6th August 2018
GarryR's Avatar
GarryR GarryR is offline
Real Name: Garry Ricketson
Spam Deminer
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 297
Default

Sorry about the confusion, my fault..... while I was writing the post, I also did a search and stumbled onto a example, and yes, it appears I got the syntax correct now, how ever it still would not accept a increase in memory, the -m 600 is what all ways worked, even without the "-drive format=raw,",.....
The host is also OpenBsd6.3 , and I have 2.8GIB ram,(aprox), but maybe still it is not enough,? just now watching this, when I boot the VM using the -m 600, it shows 90% of the ram is being used, (on the host), after the VM boots, and if it is idle, the ram usage drops, also note, it is not only the OpenBsd Vm, any of the others have the same limitation, I can not use more then the -m 600 (mb).
Any way, nothing urgent, but I am interested in trying to resolve this, if possible. Usually the 600m is enough ram any way, ..
__________________
My best friends are parrots
Reply With Quote
  #4   (View Single Post)  
Old 6th August 2018
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,377
Default

User process limits are the likely problem source. See the "ulimit" command in the ksh(8) manual.
Reply With Quote
  #5   (View Single Post)  
Old 7th August 2018
GarryR's Avatar
GarryR GarryR is offline
Real Name: Garry Ricketson
Spam Deminer
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 297
Default

Thanks , here is what it shows using the -a option,
Code:
$ start-openbsd63-2
time(cpu-seconds)    unlimited
file(blocks)         unlimited
coredump(blocks)     unlimited
data(kbytes)         1572864
stack(kbytes)        4096
lockedmem(kbytes)    996609
memory(kbytes)       2973384
nofiles(descriptors) 512
processes            256
qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory
garry$
I don't understand it well enough to know if any changes would help, the way I interpret it, "'pc.ram': Cannot allocate memory", I just don't have enough ram available on this PC, In a search result, that also is what they said to the OP , getting the same error
Thanks
__________________
My best friends are parrots
Reply With Quote
  #6   (View Single Post)  
Old 7th August 2018
ibara's Avatar
ibara ibara is offline
Future Defcon 201 speaker
 
Join Date: Jan 2014
Posts: 634
Default

Code:
$ ulimit -d 2000000
That number might work; otherwise make it larger until it does.
Reply With Quote
  #7   (View Single Post)  
Old 7th August 2018
GarryR's Avatar
GarryR GarryR is offline
Real Name: Garry Ricketson
Spam Deminer
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 297
Default

Thanks , I will give it a try.
==== edit ========
2000000 did not work, but 3000000 does, thanks a lot.
__________________
My best friends are parrots
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Font size psypro OpenBSD General 8 3rd March 2017 05:19 AM
CLI font size idefix FreeBSD General 3 7th February 2009 11:19 AM
Negative partition size? giga FreeBSD General 1 2nd January 2009 09:02 PM
Change the Size of a Slice kienjakenobi FreeBSD General 9 27th June 2008 03:01 PM
apache fd size problem oxy FreeBSD Ports and Packages 0 10th May 2008 10:49 AM


All times are GMT. The time now is 04:59 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick