Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: RAM allocation for macOS and Windows VMs can prevent VMs from booting #1191

Closed
bennydente opened this issue May 10, 2024 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@bennydente
Copy link

bennydente commented May 10, 2024

Expected behavior

running "./quickemu --vm windows-10.conf --display spice" should run windows VM

Actual behavior

running "./quickemu --vm windows-10.conf --display spice" show error:

Quickemu 4.9.4 using /usr/bin/qemu-system-x86_64 v8.2.2

  • Host: Fedora Linux 40 (Workstation Edition) running Linux 6.8 (smithix)
  • CPU: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
  • CPU VM: 1 Socket(s), 2 Core(s), 2 Thread(s), 4G RAM
    ERROR! You have insufficient RAM to run windows in a VM

Steps to reproduce the behavior

./quickemu --vm windows-10.conf --display spice

Additional context

I thing in this code:

if [ "${guest_os}" == "macos" ] || [ "${guest_os}" == "windows" ] || [ "${guest_os}" == "windows-server" ]; then
    if [ "${RAM_VM//G/}" -lt 8 ]; then
        echo "ERROR! You have insufficient RAM to run ${guest_os} in a VM"
        exit 1
    fi
fi

RAM_VM should be RAM_HOST

System Information


    Quickemu 4.9.4

Distro: Fedora Linux 40 (Workstation Edition)
Kernel: Linux 6.8.8-300.fc40.x86_64 x86_64
Memory: 16G
GPU:

  • Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
@flexiondotorg
Copy link
Member

Workaround You can workaround this issue by modifying the VM configuration and adding ram="8G"

The logic you quoted is correct, but the error message is not clear. The intent here is to stop Windows and macOS VMs from running when there is not adequate RAM allocated to them.

Based on the RAM in your host computer, the VM RAM allocation calculated by quickemu will not be sufficient.

I'll have a think about the best way to allocate guest VM RAM to macOS and Windows also how to present this error/warning.

@flexiondotorg flexiondotorg changed the title ERROR! You have insufficient RAM to run windows in a VM bug: RAM allocation for macOS and Windows VMs can prevent VMs from booting May 10, 2024
@flexiondotorg flexiondotorg added the bug Something isn't working label May 10, 2024
@lj3954
Copy link
Member

lj3954 commented May 10, 2024

Workaround You can workaround this issue by modifying the VM configuration and adding ram="8G"

The logic you quoted is correct, but the error message is not clear. The intent here is to stop Windows and macOS VMs from running when there is not adequate RAM allocated to them.

Based on the RAM in your host computer, the VM RAM allocation calculated by quickemu will not be sufficient.

I'll have a think about the best way to allocate guest VM RAM to macOS and Windows also how to present this error/warning.

The VMs will boot with less than 8GB of RAM, correct? Windows has a 4GB requirement if I'm not mistaken. It should probably present a warning (i.e. "It is highly recommended to allocate at least 8GB of RAM to ${guest_os} VMs") rather than exiting with an error.

@bennydente
Copy link
Author

Hi, thanks. In my experiences Windows 10 VM run fine on 4GB of RAM, but now i have configure 8GB of RAM on VM that not really need.

@flexiondotorg
Copy link
Member

flexiondotorg commented May 10, 2024

I bumped the RAM requirement for macOS. I'll modify the conditional so the allocation for macOS and Windows is different.

@flexiondotorg
Copy link
Member

Here is my proposed fix @bennydente.

Feedback welcome 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants