0

I'm working on OpenStack Cloud. I have two VM's. On both I have installed CentOS 7. I have setup one VM as the controller node and the other as the compute node.

I have two questions:

  1. Can I assign more than available physical RAM to a VM? I know it sounds stupid but I have read this on some blog (sorry I don't remember the site address) that if we have a swap memory double the RAM, than we can do this. Is that really true? I never experienced such thing. Nor the Virtual Box permits to do that! But still if there is a way doing this than I'd love to know it.
  2. Can I use my physical machine as Controller node, while the Compute node still resides on the VM. If yes, than how? can I please have a explanation for this.

Thank you.

2

If you read something with "swap memory double the RAM" then you probably read something from the 1990's or older. It is not relevant anymore.

(Brief summary with details left out: Back then some OS's only used virtual memory and all real physical memory was a buffer. The usage was 2:1).

Can I assign more than available physical RAM to a VM?

Technically you can, but your VM software may not allow it. (IIRC vmware workstation does not. I barely used virtual box and have no idea what its settings are). And assigning more RAM then you have to multiple VMs may need to significant paging (and the appropriate slow downs).

Can I use my physical machine as Controller node, while the Compute node still resides on the VM.

Sure. Shy not. Your physical machine is a host. A VM is a host. For most standpoints there is almost no difference for them.

You might want to consider two things though:

  1. Networking. Did you place the VMs on their own network where nothing else (including your host) can reach them? Or on a own host network where they can talk to the host but not to the LAN/Internet? Or are they bridged to the real network and act the same as the main host computer?
  2. Why not install the controller on a VM and keep everything consistent and portable?
5
  • Ok thats a good one. Nop vmware won't allow and so as virtualbox though I have set the maximum paging. Coming to your question, 1. Networking: I have selected the default NAT. 2. yes I wanted to install the controller on the VM but I thought let me have at least the controller or probably the compute node on the physical medium. would that be a bad choice?
    – aCoder
    Jan 19 '17 at 10:27
  • Having the controller on the physical host rather than on a guest is not bad. It just makes it harder to isolate or move to a different machine. Thus you simply would not gain some of the advantages which a VM usually offers. If that is relevant to you is something only you can decide.
    – Hennes
    Jan 19 '17 at 10:40
  • 1
    As to NAT: This separation maximizes security since by default virtual machines cannot talk to each other.... I think you do want your machines to be able to talk to eachother.
    – Hennes
    Jan 19 '17 at 10:41
  • yup! I was thinking about Host-only networking which would be a better option for OpenStack services.
    – aCoder
    Jan 19 '17 at 10:46
  • But still the question remains How to assign more than available physical RAM to a VM?
    – aCoder
    Jan 19 '17 at 10:47
0
  1. Can I assign more than available physical RAM to a VM?

    Yes, it is called oversubscription. You can configure it in your nova.conf, ram_allocation_ratio. The OpenStack default is 1.5, wich means a ratio 1:1.5 (with 1GB of physical RAM you can "create" 1.5GB of virtual RAM)

  2. Can I use my physical machine as Controller node, while the Compute node still resides on the VM. If yes, than how?

    Yes, only for testing purposes. Nested virtualization does not have a good performance.

2
  • To my knowledge, best practices require that you NOT overprovision RAM. While it's possible, it gets into situations where you're using a swap file on a drive which is never a desirable state. Overprovisioning CPU is fine because CPU instructions are enqueued. Jul 17 '18 at 17:47
  • 1
    I agree! I do not recommend it neither, memory is the only resource not oversubscribable in the virtualization world. Jul 17 '18 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.