Tuesday, July 2, 2013

Dynamic memory allocation with linux on Hyper-V

I'd like to run Linux environment on Hyper-V with "Dynamic memory allocation" setting.

But unfortunately old Linux kernel does not support this function.

So how can I use it? I have to use new Linux kernel with special configuration for Hyper-V. This means I have to re-build Linux kernel by myself. It is first experience for me lol

I have known some points for this issue.


  • It needs balloon driver for Hyper-V.
  • There is balloon driver for Hyper-V from kernel 3.8 and later.
  • kernel 3.8 does not support "memory hot add" function.
  • kernel 3.10 RC supports "memory hot add"
  • kernel 3.10 is released as officially few days ago.


Then I have tried to re-build it and checked.


... It's not work correctly.


It seems Linux uses only few memory which size is configured as start up memory size. Not maximum. This is no meaning for using this function.



I found one information for it.


http://www.computerweekly.com/photostory/2240185178/Windows-Server-2012-R2-a-first-look/5/Hyper-V-2012-R2-supports-Linux-dynamic-memory


This means hyper-visor also needs support for it? R2 preview version is also released few days ago. Then I tied it with my customized kernel.


no improvement... ;-)


If it should be work on Hyper-V 2012 R2 and Linux kernel 3.10 with special configuration for Hyper-V some necessary modules are not included in my kernel.


Is there any information for this?

1 comment:

  1. There is a warning by Red Hat that the Hyper-V driver for RHEL 6.4 supported memory ballooning (taking unused memory away from the VM) but not memory hot add - https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/6.4_Release_Notes/virtualization.html#sect-hyper-V . This may be the behaviour you're seeing. I'm still using a 3.9 kernel but I may report back after I manually build a 3.10 kernel...

    ReplyDelete