Перейти к содержимому

Hostmemorylow virtualbox как исправить

  • автор:

VirtualBox. Как изменить разрешение экрана гостевой системы.

VirtualBox. Как изменить разрешение экрана гостевой системы. главное изображение

Когда начал изучать программирование на Hexlet, сразу же переехал на Linux, без возможности возврата. Снёс Windows, поставил Ubuntu.

Само собой сразу возникло много вопросов, как всё это работает и куда тыкать. Точно помню, что в курсе «Основы командной строки. Операционные системы», было знакомство с Linux и дополнительные материалы по установке Ubuntu и операционным системам.

Курс мотивировал изучать и исследовать Linux дальше.

Бесплатные курсы по программированию в Хекслете

  • Освойте азы современных языков программирования
  • Изучите работу с Git и командной строкой
  • Выберите себе профессию или улучшите навыки

В общем и целом мне очень понравилась операционная система — она плавная и аккуратная. И в последствии конечно же захотелось попробовать как можно больше, найти свой дистрибутив и окружение рабочего стола. Чтобы испытать разные дистрибутивы с понравившимся мне DE, плюс для работы на удалёнке, мне нужен был Windows, поэтому я решил использовать VirtualBox.

Так вот, когда меняю разрешение экрана в настройках гостевой системы, нажимаю «Принять», но разрешение не меняется. А иногда необходимых параметров просто нет. Как-будто не установлены драйвера.

Решение

В общем вычитал, что необходимо поставить VBoxGuestAdditions — Гостевые дополнения. Это образ, который необходимо установить в привод виртуальной машины и запустить в гостевой системе. Данное дополнение предоставляет следующие возможности:

  • Интеграция указателя мыши (полезно, единый курсор для хоста и гостя)
  • Общие папки
  • Лучшая поддержка видео (как следствие произвольное изменение сторон экрана)
  • Бесшовные окна
  • Общие каналы связи основная/гостевая ОС
  • Синхронизация времени
  • Общий буфер обмена
  • Автоматические логины

Всю информацию взял с офф.сайта, где и расположена документация. Если интересны подробности по каждому пункту, ссылку оставлю тут.

Меня интересует конкретно ресайз окна. Сам образ VBoxGuestAdditions можно найти и скачать в сети, но, к сожалению, все источники не официальны. Но этого как оказалось и не требуется, опять же обратимся к докам, тут всё чётко сказано, что при установке лицензионного софта Oracle VirtualBox, VBoxGuestAdditions поставляется с установочным файлом.

Образ можно найти в основной системе:

  1. Для Windows
    • C:\Program files\Oracle\VirtualBox.
  2. Для Mac OS X
    • Файл находится в пакете приложений Oracle VM VirtualBox в папке Contents/MacOS.
  3. Для Linux
    • Обычно /opt/VirtualBox/

В моём случае образ находился по адресу /usr/share/virtualbox/VBoxGuestAdditions.iso
Чтобы проще было его использовать в будущем и каждый раз не вспоминать, где он находится, скопировал образ в домашний каталог.

Далее дело за малым, запускаем гостевую систему, монтируем диск VBoxGuestAdditions.iso в виртуальный привод или наоборот сначала монтируем, потом запускаем.

Ставим на Windows
  • При монтировании CD система автозапуска предложит выбрать действие для обнаруженного диска
  • Выбираем «Запустить»
  • Если не предложит, нужно будет зайти в Проводник/Мой компьютер, открыть папку и запустить файл VBoxWindowsAdditions.exe
  • Согласиться с установкой, подружить с антивирусом (Поставить галочку «Доверять»).
  • Перезагрузить
Ставим на Linux
  • Запустили ОС
  • Монтируем диск
  • Открываем эмулятор терминала (можно в файловом менеджере открыть папку с образом, правым кликом «Открыть в терминале»)
  • sh ./VBoxLinuxAdditions.run
  • Перезагрузить

Итог

Указателем мыши меняем размер окна или разворачиваем его на весь экран, рабочий стол гостевой системы меняет параметры разрешения автоматически под текущие размеры.

P.S.

Из опробованных дистров, почему-то не сработало на Ubuntu 18.04 LXQT и Debian или OPENSuse XFCE, точно уже не помню.

Бесплатные курсы по программированию в Хекслете

  • Освойте азы современных языков программирования
  • Изучите работу с Git и командной строкой
  • Выберите себе профессию или улучшите навыки

Не критическая ошибка в VirtualBox

Author24 — интернет-сервис помощи студентам

Установил VirtualBox, создал диск, показал образ, и хотел установить систему WinXP на виртуальный комп, когда уже при форматировании диска, перед копированием файлов для установки, выдаёт не критическую ошибку. Вот скрин.
Прога VirtualBox 3.1.6. Пробовал и на портабельной версии, тоже самое.
Подскажите, что не так, в чём ошибка?

94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
Ответы с готовыми решениями:

Критическая ошибка в Sun VirtualBox 3.1.4
При установке программы Sun VirtualBox 3.1.4 винда (XP pro SP3) ругается что программа не прошла.

Критическая ошибка VBox при загрузке Arch
Доброго времени. Собрал себе свежий дистрибутив ArchLinux 2018.01 x86, однако после загрузке падает.

Ошибка VirtualBox
Почему такая ошибка? Не могу использовать существующую виртуальную машину

Ошибка запуска VirtualBox
Ошибка в VirtalBox’e : Недоступна кнопка "Ускорение". Раньше все было нормально, спокойно.

445 / 285 / 50
Регистрация: 10.09.2009
Сообщений: 963

Говорит, мозгов маловато. Либо вы выделили мало оперативной памяти под нее, либо вы жесткий диск не динамический, а статичный сделали, вот и некуда свап писать.

virtualbox.org

[Solved] «HostMemoryLow» when enough Host RAM is available

Discussions related to using VirtualBox on Windows hosts.
9 posts • Page 1 of 1
Computerspezl Posts: 4 Joined: 9. Dec 2017, 19:17

[Solved] «HostMemoryLow» when enough Host RAM is available

Post by Computerspezl » 9. Dec 2017, 19:33

Although I have enough free RAM (total RAM: 16 GB, free RAM: 11 GB) on my Windows 10 host, I cannot start any VM with more than 1024 MB RAM for any guest.
The log file shows «HOST RAM: 11045 MB available». The VM is configured to have 4096 MB RAM. But instead of starting, the «HostMemoryLow» error gets thrown and the VM switches to state PAUSED.

The most interesting part of the log file is:

00:00:12.080516 Host RAM: 11045MB available 00:00:12.080520 VM: Raising runtime error 'HostMemoryLow' (fFlags=0x2) 00:00:12.080533 Changing the VM state from 'RUNNING' to 'SUSPENDING' 00:00:12.080626 PDMR3Suspend: after 0 ms, 1 loops: 1 async tasks - ahci/0 00:00:12.625672 AIOMgr: Endpoint for file 'D:\arnob\VirtualBox VMs\CSVM002\CSVM002-disk1.vmdk' (flags 000c0781) created successfully 00:00:13.075681 PDMR3Suspend: 995 124 562 ns run time 00:00:13.075693 Changing the VM state from 'SUSPENDING' to 'SUSPENDED' 00:00:13.075701 Console: Machine state changed to 'Paused' 00:00:13.075828 Console: VM runtime error: fatal=false, errorID=HostMemoryLow message="Unable to allocate and lock memory. The virtual machine will be paused. Please close applications to free up memory or close the VM"

My System:
— VirtualBox: 5.1.30
— Host: Windows 10 Pro Version 1709

Remarks:
I’ve checked a lot of older posts. But none of those answers — I’ve tried them all — lead to a solution.

Any hints or solutions are very welcome!

Attachments VBox.log Log file with HostMemoryLow error (118.84 KiB) Downloaded 153 times
Last edited by Computerspezl on 11. Dec 2017, 15:29, edited 2 times in total.

socratis Site Moderator Posts: 27330 Joined: 22. Oct 2010, 11:03 Primary OS: Mac OS X other VBox Version: PUEL Guest OSses: Win(*>98), Linux*, OSX>10.5 Location: Greece

Re: «HostMemoryLow» when enough Host RAM is available

Post by socratis » 10. Dec 2017, 05:04

  1. VirtualBox needs to allocate memory in one contiguous chunk. Failure means that some application has locked itself into the middle of your host RAM, and hence is blocking such large allocations. Solutions would involve finding out what the app is and how to move it in memory, or give less RAM to the VM. It could be an aggressive antivirus, do you have anything other than Windows Defender running?
  2. Do you have Chrome installed on the host? Google’s Chrome Crash Handler (GooglecrashHandler.exe or GoogleCrashHandler64.exe) might be responsible for this. Disabling it from running might remedy the situation. Take a look at https://social.technet.microsoft.com/Fo . -or-system and see if the solution there helps in your case.
  3. Does this happen if you allocate slightly less than 4 GB of RAM, say 3 GB of RAM?

Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the «QUOTE» button, please use the «POST REPLY«, at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.

Computerspezl Posts: 4 Joined: 9. Dec 2017, 19:17

Re: «HostMemoryLow» when enough Host RAM is available

Post by Computerspezl » 10. Dec 2017, 13:00

socratis wrote: VirtualBox needs to allocate memory in one contiguous chunk. Failure means that some application has locked itself into the middle of your host RAM, and hence is blocking such large allocations. Solutions would involve finding out what the app is and how to move it in memory, or give less RAM to the VM. It could be an aggressive antivirus, do you have anything other than Windows Defender running?

I know about memory chunks. I have verified to have enough «free» memory with RamMap.exe — distributed over a Microsoft site. The host uses only Windows Defender, and I even made my test with Windows Defender deactivated.

Do you have Chrome installed on the host? Google’s Chrome Crash Handler (GooglecrashHandler.exe or GoogleCrashHandler64.exe) might be responsible for this. Disabling it from running might remedy the situation. Take a look at urlxxx and see if the solution there helps in your case.

I checked the Google Chrome Crash Handler tip before. It is not running on the host, because I deactivated the option «sending crash reports to Google» in the Chrome browser settings.

Does this happen if you allocate slightly less than 4 GB of RAM, say 3 GB of RAM?[/list]

Yes. When I configure 3 GB or 2 GB, the error occurs as well.

Interestingly, I yesterday succeeded 1 time starting a VM with 4 GB RAM. Early in the start phase, the machine was paused because of the «HostMemoryLow». But I manually switched the «Paused» state, and the machine continued to start without any further error. When the VM run, I could check that it really was using 4 GB RAM.

But in preceding scenarios, I had lots of «HostMemoryLow» errors during the VM’s start. At the end, I could not even enter my credentials in the login screen — I think because of not enough ram.

My conclusion so far:
Might it be possible, that there is a certain timeout behavior responsible, that first says: «Not enough memory on host. VM was paused.» After manually de-pausing, the VM sometimes runs as it should, sometimes re-stops because of another HostMemoryLow error?

socratis Site Moderator Posts: 27330 Joined: 22. Oct 2010, 11:03 Primary OS: Mac OS X other VBox Version: PUEL Guest OSses: Win(*>98), Linux*, OSX>10.5 Location: Greece

Re: «HostMemoryLow» when enough Host RAM is available

Post by socratis » 11. Dec 2017, 00:52

Computerspezl wrote: I have verified to have enough «free» memory with RamMap.exe

I didn’t talk about free, that was established way before the RAMmap. I talked about «one contiguous chunk» in the kernel (I don’t remember exactly which parts require that, but they do).

Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the «QUOTE» button, please use the «POST REPLY«, at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.

Computerspezl Posts: 4 Joined: 9. Dec 2017, 19:17

Re: «HostMemoryLow» when enough Host RAM is available

Post by Computerspezl » 11. Dec 2017, 12:58

How can I find out the «largest possible one contiguous chunk of ram» in Win 10? The tools I know (resmon.exe, rammap.exe, vmmap.exe) show a large number of values, but not specifically this value.

Computerspezl Posts: 4 Joined: 9. Dec 2017, 19:17

Re: «HostMemoryLow» when enough Host RAM is available

Post by Computerspezl » 11. Dec 2017, 15:28

socratis put his finger into the wound. It seems to be a specific Virtualbox requirement, that it can only allocate RAM consisting of one single contiguous chunk of physical memory. It looked like my physical RAM was fragemented into free blocks of max. 1 GB each. (Unfortunately I couldn’t evaluate a memory management tool that could visualize my physical memory usage. )

To proof my asumption, I used «msconfig.exe» to deactivate all non-Microsoft-services. After a restart, I could successfully start my VM with 2, 4 and even 8 GB of RAM assigned!

Next step was to reactivate each single service, reboot my host and restart my VM with 8 G ram. Luckywise, my 1st try identified the «bad» service:

In my case, it was Advantage Database Server, a (legacy) database server from SAP used by one of my line of business Windows applications. I found that it can use lots of memory to implement its own caching system. The following tweak enabled me to switch the ADS cache permanently off:

Add or modify the following DWORD value using the Registry Editor (REGEDIT.EXE):
\\HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Advantage\Configuration\MAX_CACHE_MEMORY=x

Now, my VMs with up to 8 GB ram successfully start, although my host is running the Advantage Database Server.

socratis Site Moderator Posts: 27330 Joined: 22. Oct 2010, 11:03 Primary OS: Mac OS X other VBox Version: PUEL Guest OSses: Win(*>98), Linux*, OSX>10.5 Location: Greece

Re: [Solved] «HostMemoryLow» when enough Host RAM is available

Post by socratis » 11. Dec 2017, 18:09

Great, thanks for the feedback. Glad you got it going. And thanks for marking it as [Solved] !

Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the «QUOTE» button, please use the «POST REPLY«, at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.

jack4566 Posts: 2 Joined: 7. Jul 2020, 20:42

Re: [Solved] «HostMemoryLow» when enough Host RAM is available

Post by jack4566 » 7. Jul 2020, 20:55

I had this problem installing ubuntu 20.04 just now on a windows host.

The installation process simply hung, spiking the CPU to 100%. I stopped the VM, and the machine CPU went back to normal.

The new instance i was trying to install was for 8G ram, and I was currently an older ubuntu instance with 8G ram. The windows machine had a total of 16G ram.

I shutdown the old ubuntu instance, re-installed, and it worked fine. Presumably having 2 instances totaling the machine’s memory was too much, but really, mem usage should be more dynamic than this.

scottgus1 Site Moderator Posts: 20761 Joined: 30. Dec 2009, 20:14 Primary OS: MS Windows 10 VBox Version: PUEL Guest OSses: Windows, Linux

Re: [Solved] «HostMemoryLow» when enough Host RAM is available

Post by scottgus1 » 7. Jul 2020, 21:14

jack4566 wrote: The new instance i was trying to install was for 8G ram, and I was currently [running?] an older ubuntu instance with 8G ram. The windows machine had a total of 16G ram.

This is typical Virtualbox operation:
Running guest 1’s RAM + running guest 2’s RAM + running guest N’s RAM + host’s normal usage of RAM

virtualbox.org

[Solved] «HostmemoryLow» and «Unable to allocate and lock memory».

Discussions related to using VirtualBox on Windows hosts.
7 posts • Page 1 of 1
tremas Posts: 4 Joined: 3. Nov 2019, 23:18

[Solved] «HostmemoryLow» and «Unable to allocate and lock memory».

Post by tremas » 3. Nov 2019, 23:28

hola, estoy intentando hacer funcionar un windows 7 32/64 bit, he probado los 2, solo me funcionan con 1024 MB de RAM, my pc tiene 6 GB de RAM total, me gustaria que en total fueran 2GB de ram para la maquina virtual y 4 GB para el Host, siempre que pongo mas de 1024 MB de ram, me dice «Hostlowmemory» y «Unable to allocate and lock memory. The virtual machine will be paused. Please close applications to free up memory or close the VM»

Attachments VBox.log (73.47 KiB) Downloaded 137 times
Last edited by tremas on 6. Nov 2019, 18:51, edited 2 times in total.
tremas Posts: 4 Joined: 3. Nov 2019, 23:18

Re: «HostmemoryLow» and «Unable to allocate and lock memory».

Post by tremas » 3. Nov 2019, 23:29

¡Ocurrió un error durante la ejecución de la máquina virtual! Los detalles del error se muestran abajo. Puede intentar corregir el error y reanudar la ejecución de la máquina virtual.

Unable to allocate and lock memory. The virtual machine will be paused. Please close applications to free up memory or close the VM.

ID error: HostMemoryLow
Gravedad: Error no fatal

scottgus1 Site Moderator Posts: 20761 Joined: 30. Dec 2009, 20:14 Primary OS: MS Windows 10 VBox Version: PUEL Guest OSses: Windows, Linux

Re: «HostmemoryLow» and «Unable to allocate and lock memory».

Post by scottgus1 » 4. Nov 2019, 00:10

tremas wrote: Hello, I am trying to run a Windows 7 32/64 bit, I have tried the 2, they only work with 1024 MB of RAM, my pc has 6 GB of total RAM, I would like them to be 2GB of ram for the virtual machine and 4 GB for the Host, as long as I put more than 1024 MB of ram,

The log says:

00:00:03.082101 OS Product: Windows 10 . 00:00:03.165910 Host RAM: 5939MB (5.8GB) total, 2811MB (2.7GB) available . 00:00:03.332462 RamSize = 0x000000005eb00000 (1 588 592 640, 1 515 MB) . 00:00:17.092267 Console: VM runtime error: fatal=false, errorID=HostMemoryLow message="Unable to allocate and lock memory. The virtual machine will be paused. Please close applications to free up memory or close the VM" 00:00:26.953436 ERROR [COM]: aRC=VBOX_E_INVALID_VM_STATE

Your PC has enough available memory, but it is apparently not all one big piece of memory. The free memory may be in smaller pieces with used memory between the free pieces. According to this post: viewtopic.php?f=6&t=85816 Virtualbox needs a complete piece of memory that is big enough to meet the requirements of the guest settings.

Reboot your PC, then run the guest before running anything else.

Su PC tiene suficiente memoria disponible, pero aparentemente no es todo un gran pedazo de memoria. La memoria libre puede estar en piezas más pequeñas con memoria usada entre las piezas libres. De acuerdo a esto: viewtopic.php?f=6&t=85816 Virtualbox necesita una memoria completa que sea lo suficientemente grande como para cumplir con los requisitos de la configuración del invitado.

Reinicie su PC, luego ejecute el invitado antes de ejecutar cualquier otra cosa..

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *