Giter VIP home page Giter VIP logo

vermin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vermin's Issues

support only vagrant images

  1. Remove the vagrant/ from the beginning of vagrant images and make it the only supported images.
  2. Stop supporting vermin-own images

Not able to perform VBoxManage.exe import

VBoxManage.exe: error: Invalid parameter 'Chouhan\.vermin\images\vagrant\ubuntu\focal64.ova'

Usage - Import a virtual appliance in OVF format or from a cloud service and create virtual machines:

  VBoxManage import <ovfname | ovaname> [--dry-run] [--options= keepallmacs |
      keepnatmacs | importtovdi ] [--vsys=n] [--ostype=ostype] [--vmname=name]
      [--settingsfile=file] [--basefolder=folder] [--group=group] [--memory=MB]
      [--cpus=n] [--description=text] [--eula= show | accept ] [--unit=n]
      [--ignore] [--scsitype= BusLogic | LsiLogic ] [--disk=path]
      [--controller=index] [--port=n]

  VBoxManage import OCI:// --cloud [--ostype=ostype] [--vmname=name]
      [--basefolder=folder] [--memory=MB] [--cpus=n] [--description=text]
      <--cloudprofile=profile> <--cloudinstanceid=id> [--cloudbucket=bucket]

seems like the function calling VBoxManage is not providing the correct path of the focal image.

does Vermin support windows?

I'm on windows 11 and virtualbox 7.0.14 (latest at the time of raising this issue)

Little thought

My personal user on this PC is named 'Akhil Chouhan' and the path this is taking is just Chouhan
this seems like the space between Akhil and Chouhan in the username might just be breaking the VBoxManage import command

Support vagrant TAR archives

most vagrant boxes are tgz archives. some of them (e.g. fedora) is a tar archive.

this issue is to support the tar archives as well

Allow shrink disk space when provider is virtualbox

sometimes the disk got increased for example when working with docker inside the VM, then after cleaning the diskspace, the host os cannot reclaim that disk space from the guest os.

# source: https://vladimir-ivanov.net/how-to-compact-virtualboxs-vdmk-file-size/

1. sudo sh -c 'cat /dev/zero > zero.fill; sync; sleep 1; sync; rm -f zero.fill'

2. stop vm

3. vboxmanage showhdinfo "/Users/mhewedy/.vermin/vms/vm_01/ubuntu-focal-20.04-cloudimg.vmdk"
CAPTURE UUID

4. VBoxManage clonehd "/Users/mhewedy/.vermin/vms/vm_01/ubuntu-focal-20.04-cloudimg.vmdk" "/tmp/vm_01/ubuntu-focal-20.04-cloudimg.vdi" --format vdi

5. VBoxManage modifyhd "/tmp/vm_01/ubuntu-focal-20.04-cloudimg.vdi" --compact

6. VBoxManage clonehd "/tmp/vm_01/ubuntu-focal-20.04-cloudimg.vdi" "/Users/mhewedy/.vermin/vms/vm_01/ubuntu-focal-20.04-cloudimg.vmdk" --format vmdk

7. rm -rf "/tmp/vm_01/ubuntu-focal-20.04-cloudimg.vdi"

8. vboxmanage internalcommands sethduuid "/Users/mhewedy/.vermin/vms/vm_01/ubuntu-focal-20.04-cloudimg.vmdk" <UUID CAPTRUED PREVIOUSLY>

panic: runtime error: index out of range [1] with length 1

I get this error when trying to create a vm. I have tried a couple of differente images and get the same error everytime. The VM is created though and in a running state but I'm not sure if the given shell script executed. I triedn creating a vm from an image without any shell script and still got the same issue. So, I'm guessing the script never executed as vermin failed during the create step.

Any ideas?

image

Permission denied while changing hostname

exit status 1 bash: /etc/hostname: Permission denied

getting this error after vm gets created and connection is estabilished but while executing this command

fmt.Sprintf("sudo sh -c 'echo %s > /etc/hostname'", newHostname)

@mhewedy does this error sound familiar to you? I'm stuck with this now, will look into this when I get some time

Support different backend hypervisors

Currently, vermin working on VirtualBox as the only backend hypervisor.

This limitation was because works on its own native images. but now vermin supports vagrant boxes as of #11 .

So I think vermin now can support many hypervisors without the concern of image availability.

One of these hypervisors I intent to support is Hyper-V

Steps:

  1. #29
  2. #31
  3. #32

consider using different network adapter than bridged network

it seems that the bridged network is full of problems. see #10

So this issue to consider using different network mode in virtualbox ( maybe the NATservice) https://www.virtualbox.org/manual/ch06.html

the main point here is to keep cross vm communications.

Mode VM→Host VM←Host VM1↔VM2 VM→Net/LAN VM←Net/LAN
Host-only + + +
Internal +
Bridged + + + + +
NAT + Port forward + Port forward
NATservice + Port forward + + Port forward

Cannot Establishing connection

Hi there,

created the file and ran it:

sudo apt update -y
sudo apt install redis-server -y
sudo sed -i 's/^supervised no/supervised systemd/' /etc/redis/redis.conf
sudo systemctl restart redis.service
sudo systemctl status redis

vermin create ubuntu/focal script.sh

the machine was created, I can see it.
but cannot establish a connection using:
vermin ssh vm_01
windows10, vbox 6.1

Thanks!

After creating the vm estabilishing the connection fails

the vm has been created and i can see it running but on performing ssh into the VM it throws following logs

yscall.GetFileAttributesEx(0xc008d5e840?, 0x0, 0x0?)
        C:/Program Files/Go/src/syscall/zsyscall_windows.go:750 +0x65 fp=0xc0054258e8 sp=0xc005425898 pc=0x74be65
os.stat({0xac790a, 0x4}, {0xc008d5e840, 0x29}, 0x1)
        C:/Program Files/Go/src/os/stat_windows.go:35 +0x289 fp=0xc005425c38 sp=0xc0054258e8 pc=0x77c849
os.statNolog(...)
        C:/Program Files/Go/src/os/stat_windows.go:121
os.Stat({0xc008d5e840, 0x29})
        C:/Program Files/Go/src/os/stat.go:13 +0x3d fp=0xc005425c70 sp=0xc005425c38 pc=0x77c4dd
os/exec.chkStat({0xc008d5e840?, 0xc002b13040?})
        C:/Program Files/Go/src/os/exec/lp_windows.go:20 +0x18 fp=0xc005425c90 sp=0xc005425c70 pc=0x990f98
os/exec.findExecutable({0xc002b13040, 0x25}, {0xc004480b00, 0xb, 0xa44120?})
        C:/Program Files/Go/src/os/exec/lp_windows.go:48 +0xd6 fp=0xc005425ce8 sp=0xc005425c90 pc=0x991176
os/exec.LookPath({0xac9a96, 0xa})
        C:/Program Files/Go/src/os/exec/lp_windows.go:115 +0x49c fp=0xc005425e58 sp=0xc005425ce8 pc=0x99169c
os/exec.Command({0xac9a96, 0xa}, {0xc007645da0, 0x6, 0xa44120?})
        C:/Program Files/Go/src/os/exec/exec.go:419 +0x217 fp=0xc005425ee8 sp=0xc005425e58 pc=0x98c7b7
github.com/mhewedy/vermin/cmd.(*Cmd).Run(0xc005425f90)
        D:/programs/vermin/cmd/cmd.go:93 +0x170 fp=0xc005425f58 sp=0xc005425ee8 pc=0x992dd0
github.com/mhewedy/vermin/ip.ping.func1(0x0?)
        D:/programs/vermin/ip/ping.go:26 +0x114 fp=0xc005425fc8 sp=0xc005425f58 pc=0x998fd4
github.com/mhewedy/vermin/ip.ping.func2()
        D:/programs/vermin/ip/ping.go:28 +0x27 fp=0xc005425fe0 sp=0xc005425fc8 pc=0x998e87
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc005425fe8 sp=0xc005425fe0 pc=0x6fad21
created by github.com/mhewedy/vermin/ip.ping in goroutine 1
        D:/programs/vermin/ip/ping.go:25 +0x98

goroutine 6700 [runnable, locked to thread]:
runtime.cgocall(0x6fc4e0, 0xc0077b7ac8)
        C:/Program Files/Go/src/runtime/cgocall.go:157 +0x3e fp=0xc00542f7d8 sp=0xc00542f7a0 pc=0x69817e
syscall.SyscallN(0x7ffee9600650?, {0xc00542f870?, 0x3?, 0x0?})
        C:/Program Files/Go/src/runtime/syscall_windows.go:544 +0x107 fp=0xc00542f850 sp=0xc00542f7d8 pc=0x6f7aa7
syscall.Syscall(0x29?, 0xc008f3d9e0?, 0xffffffffffffffff?, 0xc00542f8d8?, 0x6a0aa5?)
        C:/Program Files/Go/src/runtime/syscall_windows.go:482 +0x35 fp=0xc00542f898 sp=0xc00542f850 pc=0x6f77f5
syscall.GetFileAttributesEx(0xc008fc01e0?, 0x0, 0x0?)
        C:/Program Files/Go/src/syscall/zsyscall_windows.go:750 +0x65 fp=0xc00542f8e8 sp=0xc00542f898 pc=0x74be65
os.stat({0xac790a, 0x4}, {0xc008fc01e0, 0x29}, 0x1)
        C:/Program Files/Go/src/os/stat_windows.go:35 +0x289 fp=0xc00542fc38 sp=0xc00542f8e8 pc=0x77c849
os.statNolog(...)
        C:/Program Files/Go/src/os/stat_windows.go:121
os.Stat({0xc008fc01e0, 0x29})
        C:/Program Files/Go/src/os/stat.go:13 +0x3d fp=0xc00542fc70 sp=0xc00542fc38 pc=0x77c4dd
os/exec.chkStat({0xc008fc01e0?, 0xc0041f3d80?})
        C:/Program Files/Go/src/os/exec/lp_windows.go:20 +0x18 fp=0xc00542fc90 sp=0xc00542fc70 pc=0x990f98
os/exec.findExecutable({0xc0041f3d80, 0x25}, {0xc003ec5c00, 0xb, 0xa44120?})
        C:/Program Files/Go/src/os/exec/lp_windows.go:48 +0xd6 fp=0xc00542fce8 sp=0xc00542fc90 pc=0x991176
os/exec.LookPath({0xac9a96, 0xa})
        C:/Program Files/Go/src/os/exec/lp_windows.go:115 +0x49c fp=0xc00542fe58 sp=0xc00542fce8 pc=0x99169c
os/exec.Command({0xac9a96, 0xa}, {0xc007f9b8c0, 0x6, 0xa44120?})
        C:/Program Files/Go/src/os/exec/exec.go:419 +0x217 fp=0xc00542fee8 sp=0xc00542fe58 pc=0x98c7b7
github.com/mhewedy/vermin/cmd.(*Cmd).Run(0xc00542ff90)
        D:/programs/vermin/cmd/cmd.go:93 +0x170 fp=0xc00542ff58 sp=0xc00542fee8 pc=0x992dd0
github.com/mhewedy/vermin/ip.ping.func1(0x0?)
        D:/programs/vermin/ip/ping.go:26 +0x114 fp=0xc00542ffc8 sp=0xc00542ff58 pc=0x998fd4
github.com/mhewedy/vermin/ip.ping.func2()
        D:/programs/vermin/ip/ping.go:28 +0x27 fp=0xc00542ffe0 sp=0xc00542ffc8 pc=0x998e87
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc00542ffe8 sp=0xc00542ffe0 pc=0x6fad21
created by github.com/mhewedy/vermin/ip.ping in goroutine 1
        D:/programs/vermin/ip/ping.go:25 +0x98

goroutine 6701 [runnable, locked to thread]:
runtime.cgocall(0x6fc4e0, 0xc0077cc2c8)
        C:/Program Files/Go/src/runtime/cgocall.go:157 +0x3e fp=0xc0054217d8 sp=0xc0054217a0 pc=0x69817e
syscall.SyscallN(0x7ffee9600650?, {0xc005421870?, 0x3?, 0x0?})
        C:/Program Files/Go/src/runtime/syscall_windows.go:544 +0x107 fp=0xc005421850 sp=0xc0054217d8 pc=0x6f7aa7
syscall.Syscall(0x29?, 0xc008f3daa0?, 0xffffffffffffffff?, 0xc0054218d8?, 0x6a0aa5?)
        C:/Program Files/Go/src/runtime/syscall_windows.go:482 +0x35 fp=0xc005421898 sp=0xc005421850 pc=0x6f77f5
syscall.GetFileAttributesEx(0xc008fc0240?, 0x0, 0x0?)
        C:/Program Files/Go/src/syscall/zsyscall_windows.go:750 +0x65 fp=0xc0054218e8 sp=0xc005421898 pc=0x74be65
os.stat({0xac790a, 0x4}, {0xc008fc0240, 0x29}, 0x1)
        C:/Program Files/Go/src/os/stat_windows.go:35 +0x289 fp=0xc005421c38 sp=0xc0054218e8 pc=0x77c849
os.statNolog(...)
        C:/Program Files/Go/src/os/stat_windows.go:121
os.Stat({0xc008fc0240, 0x29})
        C:/Program Files/Go/src/os/stat.go:13 +0x3d fp=0xc005421c70 sp=0xc005421c38 pc=0x77c4dd
os/exec.chkStat({0xc008fc0240?, 0xc000cf4ac0?})
        C:/Program Files/Go/src/os/exec/lp_windows.go:20 +0x18 fp=0xc005421c90 sp=0xc005421c70 pc=0x990f98
os/exec.findExecutable({0xc000cf4ac0, 0x25}, {0xc00235e400, 0xb, 0xa44120?})
        C:/Program Files/Go/src/os/exec/lp_windows.go:48 +0xd6 fp=0xc005421ce8 sp=0xc005421c90 pc=0x991176
os/exec.LookPath({0xac9a96, 0xa})
        C:/Program Files/Go/src/os/exec/lp_windows.go:115 +0x49c fp=0xc005421e58 sp=0xc005421ce8 pc=0x99169c
os/exec.Command({0xac9a96, 0xa}, {0xc007f9b920, 0x6, 0xa44120?})
        C:/Program Files/Go/src/os/exec/exec.go:419 +0x217 fp=0xc005421ee8 sp=0xc005421e58 pc=0x98c7b7
github.com/mhewedy/vermin/cmd.(*Cmd).Run(0xc005421f90)
        D:/programs/vermin/cmd/cmd.go:93 +0x170 fp=0xc005421f58 sp=0xc005421ee8 pc=0x992dd0
github.com/mhewedy/vermin/ip.ping.func1(0x0?)
        D:/programs/vermin/ip/ping.go:26 +0x114 fp=0xc005421fc8 sp=0xc005421f58 pc=0x998fd4
github.com/mhewedy/vermin/ip.ping.func2()
        D:/programs/vermin/ip/ping.go:28 +0x27 fp=0xc005421fe0 sp=0xc005421fc8 pc=0x998e87
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc005421fe8 sp=0xc005421fe0 pc=0x6fad21
created by github.com/mhewedy/vermin/ip.ping in goroutine 1
        D:/programs/vermin/ip/ping.go:25 +0x98

goroutine 6702 [runnable, locked to thread]:
runtime.cgocall(0x6fc4e0, 0xc0044646c8)
        C:/Program Files/Go/src/runtime/cgocall.go:157 +0x3e fp=0xc00542b7d8 sp=0xc00542b7a0 pc=0x69817e
syscall.SyscallN(0x7ffee9600650?, {0xc00542b870?, 0x3?, 0x0?})
        C:/Program Files/Go/src/runtime/syscall_windows.go:544 +0x107 fp=0xc00542b850 sp=0xc00542b7d8 pc=0x6f7aa7
syscall.Syscall(0x29?, 0xc008e43740?, 0xffffffffffffffff?, 0xc00542b8d8?, 0x6a0aa5?)
        C:/Program Files/Go/src/runtime/syscall_windows.go:482 +0x35 fp=0xc00542b898 sp=0xc00542b850 pc=0x6f77f5
syscall.GetFileAttributesEx(0xc008cd8b70?, 0x0, 0x0?)
        C:/Program Files/Go/src/syscall/zsyscall_windows.go:750 +0x65 fp=0xc00542b8e8 sp=0xc00542b898 pc=0x74be65
os.stat({0xac790a, 0x4}, {0xc008cd8b70, 0x29}, 0x1)
        C:/Program Files/Go/src/os/stat_windows.go:35 +0x289 fp=0xc00542bc38 sp=0xc00542b8e8 pc=0x77c849
os.statNolog(...)
        C:/Program Files/Go/src/os/stat_windows.go:121
os.Stat({0xc008cd8b70, 0x29})
        C:/Program Files/Go/src/os/stat.go:13 +0x3d fp=0xc00542bc70 sp=0xc00542bc38 pc=0x77c4dd
os/exec.chkStat({0xc008cd8b70?, 0xc003ff6740?})
        C:/Program Files/Go/src/os/exec/lp_windows.go:20 +0x18 fp=0xc00542bc90 sp=0xc00542bc70 pc=0x990f98
os/exec.findExecutable({0xc003ff6740, 0x25}, {0xc004120f00, 0xb, 0xa44120?})
        C:/Program Files/Go/src/os/exec/lp_windows.go:48 +0xd6 fp=0xc00542bce8 sp=0xc00542bc90 pc=0x991176
os/exec.LookPath({0xac9a96, 0xa})
        C:/Program Files/Go/src/os/exec/lp_windows.go:115 +0x49c fp=0xc00542be58 sp=0xc00542bce8 pc=0x99169c
os/exec.Command({0xac9a96, 0xa}, {0xc000d88720, 0x6, 0xa44120?})
        C:/Program Files/Go/src/os/exec/exec.go:419 +0x217 fp=0xc00542bee8 sp=0xc00542be58 pc=0x98c7b7
github.com/mhewedy/vermin/cmd.(*Cmd).Run(0xc00542bf90)
        D:/programs/vermin/cmd/cmd.go:93 +0x170 fp=0xc00542bf58 sp=0xc00542bee8 pc=0x992dd0
github.com/mhewedy/vermin/ip.ping.func1(0x0?)
        D:/programs/vermin/ip/ping.go:26 +0x114 fp=0xc00542bfc8 sp=0xc00542bf58 pc=0x998fd4
github.com/mhewedy/vermin/ip.ping.func2()
        D:/programs/vermin/ip/ping.go:28 +0x27 fp=0xc00542bfe0 sp=0xc00542bfc8 pc=0x998e87
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc00542bfe8 sp=0xc00542bfe0 pc=0x6fad21
created by github.com/mhewedy/vermin/ip.ping in goroutine 1
        D:/programs/vermin/ip/ping.go:25 +0x98
    .............

PS : this is just a part of infinite logs that i keeps generating

Support Vagrant Boxes

Final:
vermin create vagrant/hashicorp/bionic64:1.0.282

Steps:

  1. request and parse response of https://app.vagrantup.com/USER/boxes/BOX to get the box download URL ✔️
  2. download the image ✔️
  3. gunzip the image (in case it is gzipped) tar xzf <donwloaded_file> ✔️
  4. TAR the ovf and vmdk files into ova archive in case the previous step done, otherwise skip (tar the ovf and the vmdk into ova) ✔️
  5. copy vagrant insecure private key into .vermin/ and use it with vagrant boxes (modify install script to copy vagrant key to vermin installation) ✔️
  6. change code to change username/private key of vermin/vagrant according to the origin of the VM image. ✔️

Sample Response for step 1:

{
  "description": "A standard Ubuntu 18.04 LTS 64-bit box",
  "short_description": "A standard Ubuntu 18.04 LTS 64-bit box",
  "name": "hashicorp/bionic64",
  "versions": [
    {
      "version": "1.0.282",
      "status": "active",
      "description_html": null,
      "description_markdown": null,
      "providers": [
        {
          "name": "virtualbox",
          "url": "https://vagrantcloud.com/hashicorp/boxes/bionic64/versions/1.0.282/providers/virtualbox.box",
          "checksum": null,
          "checksum_type": null
        },
        {
          "name": "vmware_desktop",
          "url": "https://vagrantcloud.com/hashicorp/boxes/bionic64/versions/1.0.282/providers/vmware_desktop.box",
          "checksum": null,
          "checksum_type": null
        },
        {
          "name": "hyperv",
          "url": "https://vagrantcloud.com/hashicorp/boxes/bionic64/versions/1.0.282/providers/hyperv.box",
          "checksum": null,
          "checksum_type": null
        }
      ]
    }
  ]
}

Cannot start VMs

Hi,

just tried to create a VM with this command
vermin create ubuntu/focal64

it got stuck while starting the VM, even though I can see the VM is created, up and running on the Virtual Box, I can log into the VM as well, can you hint a clue as to why the issue happened?

image

How to upgrade version to match current one?

Hi Muhammad, thanks for this tool.

Is changing the k8s_version= to 1.20.0 enough to do the upgrade? Or do we need to upgrade other packages too, to match the k8s version such as Docker etc?

consider vagrant images is the default

Now stop depending on vermin images and use vagrant images as the defualt so the vagrant image name is "generic/arch" instead of "vagrant/generic/arch"

Support ansible playbooks as provision scripts

currently, only shell scripts are supported as a provisioning script, and take the form of:

vermin create <image> <shell_script>

suggested to support ansible playbooks as well by introducing new flag --type|-t

vermin create <image> <shell_script> << default
vermin create <image> <shell_script> -t shell

in case of ansible:

vermin create <image> <playbook.yaml> -t ansible

not able to run commands from shell script after provisioning vm

Provisioning vm_01
: invalid optionline 3: set: -
set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
/tmp/master.sh: line 4: $'\r': command not found
/tmp/master.sh: line 8: $'\r': command not found
Could not set property: Invalid pretty host name '192.168.1.5
'
/tmp/master.sh: line 12: $'\r': command not found
: No such file or directory
/tmp/master.sh: line 14: $'\r': command not found
Warning: apt-key output should not be parsed (stdout is not a terminal)
Executing: /tmp/apt-key-gpghome.TIP5MpsQmS/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys CC86BB64
" not a key ID: skipping
Usage: add-apt-repository <sourceline>

add-apt-repository is a script for adding apt sources.list entries.
It can be used to add any repository and also provides a shorthand
syntax for adding a Launchpad PPA (Personal Package Archive)
repository.

<sourceline> - The apt repository source line to add. This is one of:
  a complete apt line in quotes,
  a repo url and areas in quotes (areas defaults to 'main')
  a PPA shortcut.
  a distro component

  Examples:
    apt-add-repository 'deb http://myserver/path/to/repo stable myrepo'
    apt-add-repository 'http://myserver/path/to/repo myrepo'
    apt-add-repository 'https://packages.medibuntu.org free non-free'
    apt-add-repository http://extras.ubuntu.com/ubuntu
    apt-add-repository ppa:user/repository
    apt-add-repository ppa:user/distro/repository
    apt-add-repository multiverse

If --remove is given the tool will remove the given sourceline from your
sources.list


add-apt-repository: error: no such option: -
E: Command line option '
   ' [from -y
   ] is not understood in combination with the other options.
E: Command line option '
   ' [from -y
   ] is not understood in combination with the other options.
sudo: yq: command not found
sudo: yq: command not found
sudo: yq: command not found
sudo: yq: command not found
sudo: yq: command not found
usage: /usr/sbin/netplan  [-h] [--debug]  ...
/usr/sbin/netplan : error: argument : invalid choice: 'apply\r' (choose from 'help', 'apply', 'generate', 'get', 'info', 'ip', 'set', 'rebind', 'try')
sleep: invalid time interval ‘1\r’
Try 'sleep --help' for more information.
/tmp/master.sh: line 28: $'\r': command not found
Warning: apt-key output should not be parsed (stdout is not a terminal)
"pg: invalid option "-
' invalid
/tmp/master.sh: line 34: deb [arch=amd64] https://download.docker.com/linux/ubuntu \
 \bionic
: No such file or directory
Warning: apt-key output should not be parsed (stdout is not a terminal)
"pg: invalid option "-
/tmp/master.sh: line 78: warning: here-document at line 36 delimited by end-of-file (wanted `EOF')
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF

sudo apt-get update
sudo apt-get install -y \
  containerd.io=1.2.13-1 \
 \docker-ce=5:19.03.8~3-0~ubuntu-bionic
  docker-ce-cli=5:19.03.8~3-0~ubuntu-bionic
-00 kubectl=1.18.0ll -y kubelet=1.18.0
sudo apt-mark hold docker-ce kubelet kubeadm kubectl

echo "net.bridge.bridge-nf-call-iptables=1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

## configure docker

cat <<EOF | sudo tee /etc/docker/daemon.json
{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "100m"
  },
  "storage-driver": "overlay2"
}
EOF

Fix issue of some vagrant images already being OVA tarred

Most of the vagrant images are gzipped files contain ovf and vmdk files and other vagrant metadata files.

except some are already an OVA tarred files (such as ubuntu/* images)

So we need not try to gunzip such tarred OVAs and use directly.

related to #11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.