Submitted by century1stop on Tue, 02/10/2015 - 06:37
Hello
I discovered OVZ instances do not have swap / vswap. Is there a way to configure it?
Thanks
Status:
Active
Hello
I discovered OVZ instances do not have swap / vswap. Is there a way to configure it?
Thanks
Comments
Submitted by JamieCameron on Tue, 02/10/2015 - 15:24 Comment #1
Not in Cloudmin ... and I don't think that using swap is a good idea on VMs anyway.
Submitted by century1stop on Tue, 02/10/2015 - 15:32 Comment #2
problem is clients expect at least vSwap on Centos 6
Submitted by JamieCameron on Tue, 02/10/2015 - 20:57 Comment #3
You can enable swap manually after creating a VM, by SSHing into the OpenVZ host system and running :
vzctl set XXX --swappages 512 --save
where XXX is the OpenVZ numeric ID for the VM, which should be visible on Cloudmin on the Edit System page.
Submitted by century1stop on Tue, 02/10/2015 - 22:33 Comment #4
thanks for the tip.
for auto deploy purposes, it will be possible to run a post creation bash script?
thanks
Submitted by JamieCameron on Tue, 02/10/2015 - 22:42 Comment #5
You can define a script that is run on the Cloudmin master after creating a VM from an image, at Cloudmin Settings -> New System Images -> some image.
Submitted by century1stop on Tue, 02/10/2015 - 22:55 Comment #6
great, thanks. I'll do a trial run later.