mmumshad / kubernetes-the-hard-way

Bootstrap Kubernetes the hard way on Vagrant on Local Machine. No scripts.
Apache License 2.0
4.7k stars 4.54k forks source link

Vagrant up fails with below error. #154

Closed ameya-lab closed 2 years ago

ameya-lab commented 4 years ago

Hi,

I have provisioned a Hyper-v VM ubuntu 20. I have installed the vagrant for the same. When running the vangrant up command getting the below error.

My provider is libvirt and i am using a generic/arch box for this setup.

ameya@ameya-Virtual-Machine:/opt/k8s/kubernetes-the-hard-way/vagrant$ vagrant up NOTE: Gem::Specification.default_specifications_dir is deprecated; use Gem.default_specifications_dir instead. It will be removed on or after 2020-02-01. Gem::Specification.default_specifications_dir called from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/bundler.rb:428. NOTE: Gem::Specification.default_specifications_dir is deprecated; use Gem.default_specifications_dir instead. It will be removed on or after 2020-02-01. Gem::Specification.default_specifications_dir called from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/bundler.rb:428. /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/errors.rb:103: warning: Using the last argument as keyword parameters is deprecated; maybe should be added to the call /usr/share/rubygems-integration/all/gems/i18n-1.8.2/lib/i18n.rb:195: warning: The called method `t' is defined here /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/plugins/kernel_v2/config/vm.rb:354: warning: Using the last argument as keyword parameters is deprecated; maybe should be added to the call /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/plugins/kernel_v2/config/vm_provisioner.rb:92: warning: The called method add_config' is defined here Bringing machine 'master-1' up with 'libvirt' provider... Bringing machine 'master-2' up with 'libvirt' provider... Bringing machine 'loadbalancer' up with 'libvirt' provider... Bringing machine 'worker-1' up with 'libvirt' provider... Bringing machine 'worker-2' up with 'libvirt' provider... (eval):3: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/ui.rb:223: warning: The called methodsay' is defined here ==> loadbalancer: Creating image (snapshot of base box volume). ==> worker-1: Creating image (snapshot of base box volume). ==> worker-2: Creating image (snapshot of base box volume). ==> loadbalancer: Creating domain with the following settings... ==> master-2: Creating image (snapshot of base box volume). ==> loadbalancer: -- Name: vagrant_loadbalancer ==> loadbalancer: -- Domain type: kvm ==> loadbalancer: -- Cpus: 2 ==> loadbalancer: -- Feature: acpi ==> loadbalancer: -- Feature: apic ==> loadbalancer: -- Feature: pae ==> loadbalancer: -- Memory: 2048M ==> loadbalancer: -- Management MAC:
==> loadbalancer: -- Loader:
==> loadbalancer: -- Nvram:
==> loadbalancer: -- Base box: generic/arch ==> loadbalancer: -- Storage pool: default ==> loadbalancer: -- Image: /var/lib/libvirt/images/vagrant_loadbalancer.img (32G) ==> loadbalancer: -- Volume Cache: default ==> loadbalancer: -- Kernel:
==> loadbalancer: -- Initrd:
==> loadbalancer: -- Graphics Type: vnc ==> loadbalancer: -- Graphics Port: -1 ==> loadbalancer: -- Graphics IP: 127.0.0.1 ==> loadbalancer: -- Graphics Password: Not defined ==> loadbalancer: -- Video Type: cirrus ==> loadbalancer: -- Video VRAM: 256 ==> loadbalancer: -- Sound Type:
==> loadbalancer: -- Keymap: en-us ==> loadbalancer: -- TPM Path:
==> loadbalancer: -- INPUT: type=mouse, bus=ps2 ==> worker-1: Creating domain with the following settings... (eval):3: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/ui.rb:223: warning: The called method `say' is defined here ==> worker-1: -- Name: vagrant_worker-1 ==> worker-2: An error occurred. The error will be shown after all tasks complete. ==> worker-1: -- Domain type: kvm ==> worker-1: -- Cpus: 2 ==> master-1: An error occurred. The error will be shown after all tasks complete. ==> worker-1: -- Feature: acpi ==> worker-1: -- Feature: apic ==> worker-1: -- Feature: pae ==> worker-1: -- Memory: 2048M ==> worker-1: -- Management MAC:
==> worker-1: -- Loader:
==> worker-1: -- Nvram:
==> worker-1: -- Base box: generic/arch ==> worker-1: -- Storage pool: default ==> worker-1: -- Image: /var/lib/libvirt/images/vagrant_worker-1.img (32G) ==> worker-1: -- Volume Cache: default ==> worker-1: -- Kernel:
==> worker-1: -- Initrd:
==> worker-1: -- Graphics Type: vnc ==> worker-1: -- Graphics Port: -1 ==> worker-1: -- Graphics IP: 127.0.0.1 ==> worker-1: -- Graphics Password: Not defined ==> worker-1: -- Video Type: cirrus ==> worker-1: -- Video VRAM: 256 ==> worker-1: -- Sound Type:
==> worker-1: -- Keymap: en-us ==> worker-1: -- TPM Path:
==> worker-1: -- INPUT: type=mouse, bus=ps2 ==> master-2: An error occurred. The error will be shown after all tasks complete. ==> loadbalancer: An error occurred. The error will be shown after all tasks complete. ==> worker-1: An error occurred. The error will be shown after all tasks complete. An error occurred while executing multiple actions in parallel. Any errors that occurred are shown below.

An unexpected error occurred when executing the action on the 'master-1' machine. Please report this as a bug:

Call to virConnectNumOfDefinedDomains failed: internal error: client socket is closed

have i missed any step ?

Thanks Ameya Deshmukh

j-ilden commented 3 years ago

Vagrant is trying to use kvm to spin up the virtual machines and not HyperV. I would either try using virtualbox or tinker around the vagrantFile to make it work with HyperV.

fireflycons commented 2 years ago

Hi @ameya-lab

This repo focuses on the Kubernetes installation, not the VM provisioning, therefore we don't test with all setups that Vagrant claims to support. Best to follow the advice of @j-ilden

We have now merged a major change to bring this to v1.24. Many issues have been addressed as part of the upgrade. Please try it now and feel free to raise further issues.

Thanks.