Install failed on VM


(Guy St Louis) #1

I tried to install discourse on a virtualmin. Is this possible to do an install on a virtual machine? I have cloudmin and made an base centos7 image up to date. I then followed instructions from tecmint link below:

Discourse - A Modern Forum for Community Discussion

When doing ./discourse-setup in its directory, mkdir /var/discourse I get the following error. Should I be creating a VM in a different file system structure maybe?

install: cannot remove ‘/swapfile’: Operation not permitted
dd: failed to open ‘/swapfile’: Text file busy
mkswap: error: /swapfile is mounted; will not make swapspace
swapon: /swapfile: swapon failed: Device or resource busy
/swapfile       swap    swap    auto      0       0
vm.swappiness = 10
vm.swappiness = 10
Failed to create swap: are you root? Are you running on real hardware, or a fully virtualized server?

any help would be appreciated.

Guy


(Andrew Schleifer) #2

What is the answer to those questions?


(Guy St Louis) #3

I am root on a virtualized server. A VM is a virtual machine. So I basically ran a virtual machine on a physical machine, this physical machine has KVM virtualization that can spawn severals virtual machines. Basically like a VPS that hosting providers put us on.

However, when you create a virtual machine you can create its type of files system, like when install linux it asks you if you want divide the /var, /etc, and swap file. I basically just create one image file that hold it all cause it easy. I’m wondering if this is my problem or am I to assume you have to run this on a physical machine? Which would be very unpractical.


(Andrew Schleifer) #4

Yes, but not all VMs are fully virtualized, e.g. OpenVZ; That is why that question is there. It was not clear from your original post that you were using KVM, nor that you were running as root.

The setup program is trying to create a swapfile because it thinks there’s not enough memory. It is failing to do that, probably there’s already a swapfile in use.

What does the "Found xxx GB of memory and yyy CPU cores" line output? If the former is equal to or less than 2GB, it will do the swap dance. You will probably need to increase the RAM allocated to the VM or embiggen that swapfile before you run discourse-setup.


(Guy St Louis) #5

thanks for that. I had to increase the ram to 3G for it to get working. Unfortunately after this I got another error below. looking it up I tried this

restart docker and no luck

Updates successful. Rebuilding in 5 seconds.
Building app
which: no docker.io in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
Your Docker installation is not using a supported storage driver. If we were to proceed you may have a broken install.

aufs is the recommended storage driver, although zfs/btrfs/overlay and overlay2 may work as well.
Other storage drivers are known to be problematic.
You can tell what filesystem you are using by running “docker info” and looking at the ‘Storage Driver’ line.

If you wish to continue anyway using your existing unsupported storage driver,
read the source code of launcher and figure out how to bypass this check.


(Jeff Atwood) #6

I strongly recommend you switch to another provider with a fully virtualized machine.


(Guy St Louis) #7

this is my machine at home using KVM with cloudmin install. Its an older blade with centos7. I do not see why this should not work unless I need to create a flag to install or enable storage driver. right now I see the docker using devicemapper and doing:
grep aufs /proc/filesystems

does not show anything as in my kernel may not support it? from reading: this link scroll to title “Configure Docker with the aufs storage driver”

I am not familiar with docker much unfortunately. Since Docker is basically a way to virtualize maybe having cloudmin installed with KVM as my parent server is causing issues with this guest?

I want to killed the centos instance and try ubuntu base copy but if this is kernel level or storage device level I do not think spinning up ubuntu as a new instance will change things…


(Andrew Schleifer) #8

The hypervisor is not the problem, as Docker runs inside the guest entirely. Running CentOS in the VM is the problem. We always recommend using an LTS Ubuntu and following our installation guide.


(Guy St Louis) #9

This worked on Ubuntu and I did follow the install guide in your link. Thanks Andrew!