docker-scripts-archived / dev--LTSP

Virtual LTSP server with vagrant and/or docker-scripts.
GNU General Public License v3.0
7 stars 6 forks source link

Machine is not ready for guest communication #82

Open dashohoxha opened 6 years ago

dashohoxha commented 6 years ago

I get these messages:

Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.

and later:

Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

Related to: #63

dashohoxha commented 6 years ago

I am testing it on Debian 9, and I have installed vagrant and virtualbox with:

apt install virtualbox vagrant vagrant-cachier
akash0x53 commented 6 years ago

I've faced these issues before. Possible solutions

  1. Update virtualbox and vagrant
  2. Check whether Vagrant supports installed VirtualBox or not
  3. Enable GUI and check whether OS is in hanged state or not.
  4. Increase config.vm.boot_timeout (default is 300 seconds)
  5. Disable plugins and try

I've also started downloading the box. I'll post my finding soon

dashohoxha commented 6 years ago

After installing all virtualbox related packages (I don't know which of them might be relevant), I get this output for modinfo vboxguest:

filename:       /lib/modules/4.9.0-6-amd64/updates/dkms/vboxguest.ko
version:        5.2.10_Debian r121806
license:        GPL
description:    Oracle VM VirtualBox Guest Additions for Linux Module
author:         Oracle Corporation
srcversion:     6BDD49291DE9597E909E7D0
alias:          pci:v000080EEd0000CAFEsv00000000sd00000000bc*sc*i*
depends:        
retpoline:      Y
vermagic:       4.9.0-6-amd64 SMP mod_unload modversions 
dashohoxha commented 6 years ago

I have these packages installed:

# apt list virtualbox*
Listing... Done
virtualbox/stretch-backports,now 5.2.10-dfsg-6~bpo9+1 amd64 [installed]
virtualbox-5.0/unknown 5.0.40-115130~Debian~stretch amd64
virtualbox-5.1/unknown 5.1.38-122592~Debian~stretch amd64
virtualbox-5.2/unknown,now 5.2.14-123301~Debian~stretch amd64 [residual-config]
virtualbox-dkms/stretch-backports,now 5.2.10-dfsg-6~bpo9+1 all [installed,automatic]
virtualbox-ext-pack/stretch-backports,now 5.2.10-4~bpo9+1 all [installed]
virtualbox-guest-additions-iso/stretch-backports,now 5.2.11-122181-1~bpo9+1 all [installed]
virtualbox-guest-dkms/stretch-backports,now 5.2.10-dfsg-6~bpo9+1 all [installed]
virtualbox-guest-source/stretch-backports,now 5.2.10-dfsg-6~bpo9+1 all [installed]
virtualbox-guest-utils/stretch-backports,now 5.2.10-dfsg-6~bpo9+1 amd64 [installed]
virtualbox-guest-x11/stretch-backports,now 5.2.10-dfsg-6~bpo9+1 amd64 [installed]
virtualbox-qt/stretch-backports,now 5.2.10-dfsg-6~bpo9+1 amd64 [installed,automatic]
virtualbox-source/stretch-backports,now 5.2.10-dfsg-6~bpo9+1 all [installed]

For vagrant:

# apt list -a vagrant
Listing... Done
vagrant/now 1:2.0.2 amd64 [installed,local]
vagrant/stretch-backports 2.0.2+dfsg-3~bpo9+1 amd64
vagrant/stable 1.9.1+dfsg-1+deb9u1 amd64
d78ui98 commented 6 years ago

I made a fresh install of Debian 9. I am not able to reproduce the error.

packages installed for virtualbox

$ apt list virtualbox*
Listing... Done
virtualbox-5.0/unknown 5.0.40-115130~Debian~stretch amd64
virtualbox-5.1/unknown 5.1.38-122592~Debian~stretch amd64
virtualbox-5.2/unknown,now 5.2.14-123301~Debian~stretch amd64 [installed]

for vagrant

$ apt list vagrant*
Listing... Done
vagrant/now 1:2.1.2 amd64 [installed,local]
vagrant-azure/stable 2.0.0~pre1-3 all
vagrant-cachier/stable 1.2.1-3 all
vagrant-digitalocean/stable 0.9.1-1 all
vagrant-libvirt/stable 0.0.37-1 all
vagrant-lxc/stable 1.2.1-3 all
vagrant-mutate/stable 1.2.0-3 all
vagrant-sshfs/stable 1.3.0-2 all

I tried with vagrant 2.0.2(The version you are using) Still I not getting the issue.

$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
dashohoxha commented 6 years ago

I think that @akash0x53 it trying to test it as well. If he too has does not experience the problem that I see, then there must be something wrong with my computer. However you also mentioned that you are building a new image. If you are testing it with the new image, then this is a different thing.

Anyway, I don't have to test it, as long as you and Akash do it. I was forced into testing it (and this is a bad thing) because you insist that there are no more problems to be fixed. This drives me crazy because I know that there are problems that need to be fixed. However it is better if you find and report them yourself. Then we (me and Akash) may also give you any indication or hint about how to fix them.

akash0x53 commented 6 years ago

With my Windows host machine, it run without any problem. I'm using latest Vagrant and Virtualbox. Few points,

  1. I can't run test.sh on Windows machine - any plan to make scripts portable across platforms?
d78ui98 commented 6 years ago

Thats great!

any plan to make scripts portable across platforms?

Yes it can be done. I guess problem problem will be with VBoxManage. We will have to use vboxmanage.exe for windows. Also cygwin can be used for running bash scripts.

dashohoxha commented 6 years ago

Akash, it is important to make them work first, then we can consider portability as well (after the GSoC). Anyway, you can do testing and development in Linux, so there is no need to port test.sh in windows. So, please test them in Linux and help Deepanshu fix them.

d78ui98 commented 6 years ago

The error message says

Guest-specific operations were attempted on a machine that is not ready for guest communication. This should not happen

In all the tutorials that were mentioned in https://github.com/docker-scripts/dev--LTSP/issues/68 guest specific operation was performed. Maybe if we create vagrant box with a different method that does not involve installing guest tools, the problem will go away. One such method is by using packer. I wil try it out. It might work

d78ui98 commented 6 years ago

I think this issue is fixed now.

dashohoxha commented 6 years ago

I think this issue is fixed now.

How did you fix it?

d78ui98 commented 6 years ago

Purging all the old vagrant packages, plugins. and installing new vagrant version 2.1.2 ones from https://www.vagrantup.com/downloads.html

dashohoxha commented 6 years ago

I tried with vagrant 2.0.2(The version you are using) Still I not getting the issue.

Can you try again with vagrant 2.0.2 Because I would prefer to install the versions that are packaged on Debian (it is simpler).

d78ui98 commented 6 years ago

yes. made another fresh install. It worked with version 2.0.2.

VBoxManage --version && vagrant --version
5.2.16r123759
Vagrant 2.0.2
d78ui98 commented 6 years ago

Maybe removing .vagrant.d directory would help. https://github.com/openebs/openebs/issues/32#issue-210015847

dashohoxha commented 6 years ago

Can you test with vagrant 1.9.1 as well? If it works, there is no need to make a high requirement for the version, it can just be installed with apt install vagrant.

d78ui98 commented 6 years ago

Yes. It does not works on vagrant 1.9.1. It fails to find the provider. And gives this error even when virtualbox is installed.

No usable default provider could be found for your system.

Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.

The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.

If you believe you already have a provider available, make sure it
is properly installed and configured. You can see more details about
why a particular provider isn't working by forcing usage with
`vagrant up --provider=PROVIDER`, which should give you a more specific
error message for that particular provider.

Here if I try to do a vagrant up by vagrant up --provider=VirtualBox it still does not work.

dashohoxha commented 6 years ago

You can see more details about why a particular provider isn't working by forcing usage with vagrant up --provider=PROVIDER, which should give you a more specific error message for that particular provider.

What is the more specific message in this case? Why the VirtualBox provider does not work?

d78ui98 commented 6 years ago

specific message is also same as this.

root@debian:~$ vagrant up --provider=PROVIDER
No usable default provider could be found for your system.

Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.

The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.

If you believe you already have a provider available, make sure it
is properly installed and configured. You can see more details about
why a particular provider isn't working by forcing usage with
`vagrant up --provider=PROVIDER`, which should give you a more specific
error message for that particular provider.

There is one more issue with using vagrant version 1.9.1. It only supports virtual box version <=5.1. Latest is version 5.2. Here is the output

root@debian:/home/redhat/box# vagrant --version && vagrant up
Vagrant 1.9.1
The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:

Vagrant has detected that you have a version of VirtualBox installed
that is not supported by this version of Vagrant. Please install one of
the supported versions listed below to use Vagrant:

4.0, 4.1, 4.2, 4.3, 5.0, 5.1

A Vagrant update may also be available that adds support for the version
you specified. Please check www.vagrantup.com/downloads.html to download
the latest version.

Why the VirtualBox provider does not work?

I will check the vagrant logs and try to figure out something.

Another angle that I am thinking to fix this issue is by raise the a bug for vagrant package. If they fix it we can install vagrant version 2.1.2 by just an apt.

akash0x53 commented 6 years ago

Vagrant warns user not to install it through system's package manager. It appears updating Vagrant is the only solution.

https://www.vagrantup.com/intro/getting-started/install.html#caveats

dashohoxha commented 6 years ago

Vagrant warns user not to install it through system's package manager.

For normal users, the most easy and reasonable way is to install it through systems package manager. This is the recommended way for most of the programs/tools. If this is not the case for vagrant, there must be something wrong with vagrant.

dashohoxha commented 6 years ago

There is one more issue with using vagrant version 1.9.1. It only supports virtual box version <=5.1.

If vagrant 1.9.1 is happy with virtualbox 5.1, then why do you need to install 5.2? If everything works well with vagrant-1.9.1 and virtualbox-5.1, then we don't need the latest versions. Don't recommend a version higher than what is needed.

dashohoxha commented 6 years ago

I think that @akash0x53 it trying to test it as well.

@d78ui98 once @akash0x53 can test and verify that it works with vagrant 2.0.2, you can close this issue. I don't have time to test it this time because I am busy with holidays. But I will test it in a couple of weeks, before the third evaluation.