You are trying to start a VM Instance from the controller dashboards or rest API and the Instance is stuck in Scheduling
state.
Go to your dashboard, look at the box on the right. It should say “X More Instances Available”. If this number is larger than 0, the problem is probably someplace else. Check out one of the next common reasons.
Go to your Nodes
screen and go over the Nodes.
If any of your Nodes has the message Inactive (Invalid License)
under it's state, you need to go to that Node and activate the license. You can find more information about Anka License commands here.
If one of your Nodes has the state Offline
it usually means that the agent running on the Node have crashed. To solve this, execute a disjoin
and join
commands on the Node:
# Disjoin
sudo ankacluster disjoin
Disjoined the cluster
# Join
sudo ankacluster join http://localhost
Testing connection to controller...: Ok
Testing connection to the registry...: Ok
Ok
Cluster join success
Note
You might get the following error after performing thedisjoin
:Error: agent not installed in domain specified
If you do get this error, continue and performjoin
command.
After rejoining the Node, check the dashboard to see if the Node is in Active
state. It may take about a minute for the Node to show in dashboard, so wait at least this amount. In case the Node is still in Offline
state, contact support via slack or email
This process has to be repeated for each Node.
Go to your node's terminal and check if any VMs are running.
Perform
sudo anka list
All VM names that are managed by the Controller should have a prefix like mgmtManaged
. If any other VM is running you need to stop (or suspend, or delete) it.
sudo anka stop $VM_NAME
After stopping the “rogue” VM the agent should start your new instance.
In order to start VMs, the Node has to download them first from the Registry.
The registry address is given to the nodes by the Controller.
You can see the Registry address configured in the upper right corner of the dashboard screen.
This process has to be repeated for each Node.
Go to the Node's terminal and execute the following command (replace http://192.168.1.105
with your registry URL):
curl "http://192.168.1.105:8089/registry/status"
If everything is working you should see the following response:
{"status":"OK","body":{"status":"Running","version":"1.5.2-ce0d3271"},"message":""}
If there is a problem you should be seeing something similar to this:
curl: (7) Failed to connect to 192.168.1.105 port 8089: Connection refused
There can be many reasons for lack of communications between machines.
The ankacluster join
command sends a request to check the connection to the registry.
Execute a disjoin
and join
commands on the Node:
# Disjoin
sudo ankacluster disjoin
Disjoined the cluster
# Join
sudo ankacluster join http://localhost
Testing connection to controller...: Ok
Testing connection to the registry...: Ok
Ok
Cluster join success
If somehow the Registry address is wrong or it has changed, write the correct external address in the configuration and restart the controller.
The agent running on the Node takes care of cleaning old VMs that are not in use. It checks disk space and takes the least recently used
cleaning approach. However, sometimes the machine's disk fills with files that are not related to VMs.
You can check your disk space using the terminal:
df -h
If your disk is running low on space, free some of it. Anka needs available disk space in order to run, even if the VM's disk writes are very little.
The Node's log files sometime take more space than it should.
You can check the size of the log directory like this:
du -hs /var/log/veertu/
You can clear this directory by executing:
rm -r /var/log/veertu/*
Talk to us! we are available via slack or email
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.