bryansteiner / gpu-passthrough-tutorial

GNU General Public License v3.0
1.4k stars 91 forks source link

alloc_hugepages.sh $MEMORY is not defined #15

Closed pdc4444 closed 3 years ago

pdc4444 commented 3 years ago

This command does not work because $MEMORY is not defined:

HUGEPAGES="$(($MEMORY/$(($(grep Hugepagesize /proc/meminfo | awk '{print $2}')/1024))))"

I assume you meant to add this as an configuration parameter in kvm.conf?

bryansteiner commented 3 years ago

Every one of my hook scripts starts with the source command which loads in kvm.conf:

source /etc/libvirt/hooks/kvm.conf

You'll notice my config file has memory defined on the second line.

pdc4444 commented 3 years ago

@bryansteiner My sincere apologies. I know it might sound really dumb but when I went through your guide I didn't even look at your shared code I simply read the read.me and used the examples there to make my own scripts. Thanks for all your help by the way!

bryansteiner commented 3 years ago

Don't even worry about it. It's because of people like you who decide to provide feedback that this guide came to exist so I'm thankful for all the input. Good luck with your build!