Launch CoreOS on VirtualBox - hqzhang/cloudtestbed GitHub Wiki

  1. install Virtualbox
  Ubuntu: sudo apt install virtualbox
  Step 1: Add VirtualBox repo link in apt source list 
    echo "deb http://download.virtualbox.org/virtualbox/debian trusty contrib" >> /etc/apt/sources.list
  Step 2 : Download and add Oracle public key for apt-secure.
    wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
  Step 3 : Install DKMS package
    sudo apt-get install dkms
  Step 4 : Now install VirtualBox 4.3.10
    sudo apt-get update
    sudo apt-get install virtualbox-4.3
  1. download CoreOS image iso:

    wget -LO https://stable.release.core-os.net/amd64-usr/current/coreos_production_iso_image.iso

  2. open VirtualBox and launch iso

    click New and set name: coreos type: linux verison: linux2.6(64b) click Next and set memory: 2048M harkdisk type: vmdk harddisk size: 16G

  3. click Setting: Storate: controllerIDE: click lightdisk icon and choose coreos_production_iso_image.iso, ok

  4. click start vm:

  5. on console:

   get ignite_config.json
   wget http://localhost/mydir/ignite_config.json( assuming file server ready)
cat <<EOF > ingnite-config.json
{
   "ignition": { "version": "2.0.0" },
   "passwd": {
	"users": [{
		"name": "coreos",
		"create": {
			"uid": 1000,
			"homeDir": "/home/mfusion",
			"groups": [ "sudo", "docker"],
			"shell": "/bin/bash" 
			},
                 "passwordHash": "$1$jDePR0Np$IbhvCD9tHj1W63rIamZCC0",
                 "sshAuthorizedKeys": ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDbd29eHH8p8+n9f4fSKccWlKXQ2PySEqRXMsbLC2rdEOOEowQoB0jwXExb9CQkR2uCG6wVDI/z6dQnyJJ/JYqfWUjo4hpNit63Ag/iwq4zmh8JBzSY2CoOywlGd7Ro23P2aty6ufWwsmAF9UB3c56DDjL/KbEV//Ben0ap2olLM9WD8uOmT4oZ7b0RzgBa0eF+U7/y+sZelMFe/IIhFOjTVgiHqIR9IoeEYag3lYN7O0N7J4i7yct2/lWtOtL97cVwS6WMTi9qI/Cb/Gr5igxbqdafjuzs2jjKmiG0quWPitbffAx5vAYehGkDe92t4e3E7KZn/Cytv4ZuxWHdFUD1 hongqi@hongqi-VirtualBox"]               
		}]
	     }
}
EOF
  1. launch CoreOS again

sudo coreos-install -d /dev/sda -C stable -i ignite-config.json

  1. remove IS from CD and reboot

  2. login with coreos/coreos

*notes: use ignite-config ok but cloud-config does not work

⚠️ **GitHub.com Fallback** ⚠️