I'm using the ganeti2
package on Debian 5. Instance creation goes pretty smoothly, except that it doesn't configure a swap disk automatically, and I'd like it to do so.
Googling around, I found absolutely no one with my problem, which makes me suspect a fundamental mistake on my part, but I can't figure out what. The Ganeti 2 documentation also doesn't touch the subject, though previous versions had an instance creation parameter for that.
So, how can I do it? Or what am I doing wrong?
You are likely explicitly telling it to just create one disk, as the
--swap-size
option is now deprecated. You should be able to add a swap partition like so:on instance creation. Make the usual adjustments after the instance is created --
mkswap
,swapon
,/etc/fstab
etc. Alternatively, you can create a swap file on the instance itself from within the filesystem and keep your creation more or less the same:I realize this question is three years old - but in case anyone else comes across it with the same issue, it looks like Pietro Abate has a ganeti-instance-debootstrap hook for doing this, which is pretty automatic:
http://mancoosi.org/~abate/add-swap-hook-ganetideboostrapinstance