Skip to content

Instantly share code, notes, and snippets.

@noonat
Last active February 10, 2023 22:00
Show Gist options
  • Select an option

  • Save noonat/9fc170ea0c6ddea69c58 to your computer and use it in GitHub Desktop.

Select an option

Save noonat/9fc170ea0c6ddea69c58 to your computer and use it in GitHub Desktop.

Revisions

  1. noonat revised this gist Apr 23, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion coreos-virtualbox.md
    Original file line number Diff line number Diff line change
    @@ -32,7 +32,7 @@
    - ssh_rsa AAAAB3NzaC1...snip
    ```
    - Use `coreos-install to install to the VM's disk with your keys:
    - Use `coreos-install` to install to the VM's disk with your keys:

    ```bash
    sudo coreos-install -d /dev/sda -C stable -c ~/cloud-config.yaml
  2. noonat revised this gist Apr 23, 2015. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions coreos-virtualbox.md
    Original file line number Diff line number Diff line change
    @@ -25,19 +25,24 @@
    - Use curl to download your SSH public key to the box.
    - Rename the file to cloud-config.yaml.
    - Edit the file with vim and make it look something like:

    ```yaml
    #cloud-config
    ssh_authorized_keys:
    - ssh_rsa AAAAB3NzaC1...snip
    ```
    - Use `coreos-install to install to the VM's disk with your keys:

    ```bash
    sudo coreos-install -d /dev/sda -C stable -c ~/cloud-config.yaml
    ```

    - Use VirtualBox to gracefully power off the machine.
    - Edit the VM settings again and remove the ISO from the machine.
    - Power it up again. You should end up at a login prompt.
    - SSH into the VM:

    ```bash
    $ ssh -p 22022 core@127.0.0.1
    Last login: Thu Apr 23 15:50:31 2015 from 192.168.59.3
  3. noonat revised this gist Apr 23, 2015. 1 changed file with 14 additions and 9 deletions.
    23 changes: 14 additions & 9 deletions coreos-virtualbox.md
    Original file line number Diff line number Diff line change
    @@ -25,19 +25,24 @@
    - Use curl to download your SSH public key to the box.
    - Rename the file to cloud-config.yaml.
    - Edit the file with vim and make it look something like:
    #cloud-config
    ssh_authorized_keys:
    - ssh_rsa AAAAB3NzaC1...snip
    ```yaml
    #cloud-config
    ssh_authorized_keys:
    - ssh_rsa AAAAB3NzaC1...snip
    ```
    - Use `coreos-install to install to the VM's disk with your keys:
    sudo coreos-install -d /dev/sda -C stable -c ~/cloud-config.yaml
    ```bash
    sudo coreos-install -d /dev/sda -C stable -c ~/cloud-config.yaml
    ```
    - Use VirtualBox to gracefully power off the machine.
    - Edit the VM settings again and remove the ISO from the machine.
    - Power it up again. You should end up at a login prompt.
    - SSH into the VM:

    $ ssh -p 22022 core@127.0.0.1
    Last login: Thu Apr 23 15:50:31 2015 from 192.168.59.3
    CoreOS stable (633.1.0)
    core@localhost ~ $
    ```bash
    $ ssh -p 22022 core@127.0.0.1
    Last login: Thu Apr 23 15:50:31 2015 from 192.168.59.3
    CoreOS stable (633.1.0)
    core@localhost ~ $
    ```

    [coreos-iso]: http://stable.release.core-os.net/amd64-usr/current/coreos_production_iso_image.iso
  4. noonat revised this gist Apr 23, 2015. 1 changed file with 0 additions and 4 deletions.
    4 changes: 0 additions & 4 deletions coreos-virtualbox.md
    Original file line number Diff line number Diff line change
    @@ -25,15 +25,11 @@
    - Use curl to download your SSH public key to the box.
    - Rename the file to cloud-config.yaml.
    - Edit the file with vim and make it look something like:

    #cloud-config
    ssh_authorized_keys:
    - ssh_rsa AAAAB3NzaC1...snip

    - Use `coreos-install to install to the VM's disk with your keys:

    sudo coreos-install -d /dev/sda -C stable -c ~/cloud-config.yaml

    - Use VirtualBox to gracefully power off the machine.
    - Edit the VM settings again and remove the ISO from the machine.
    - Power it up again. You should end up at a login prompt.
  5. noonat created this gist Apr 23, 2015.
    47 changes: 47 additions & 0 deletions coreos-virtualbox.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,47 @@
    - Download and install VirtualBox.
    - Download the [CoreOS ISO](coreos-iso)
    - Create a new VM in VirtualBox
    - For the OS, Other Linux, 64-bit should be fine
    - Give the VM 1gb of memory, like your physical hardware has.
    - Create a disk of whatever size you want. I made a VMDK file that could
    expand dynamically up to 8gb.
    - Mount the ISO in the VM
    - Right click on the VM and click settings
    - Go to the storage tab
    - Click on the empty disk on the left
    - Click the disk icon next to IDE Secondary on the right
    - Choose the ISO
    - Check the Live CD/DVD box
    - Go to the network tab
    - Make sure NAT is selected
    - Edit the port forwarding settings and add a rule for:
    - Host IP: 127.0.0.1
    - Host Port: 22022
    - Guest IP: 10.0.2.15
    - Guest Port: 22
    - Start the VM. It should boot into CoreOS to a core@localhost prompt.
    - Run `sudo fdisk -l`. You should have a /dev/sda device. That's the VM's disk.
    - Upload your SSH public key to an HTTP server somewhere that the VM can access.
    - Use curl to download your SSH public key to the box.
    - Rename the file to cloud-config.yaml.
    - Edit the file with vim and make it look something like:

    #cloud-config
    ssh_authorized_keys:
    - ssh_rsa AAAAB3NzaC1...snip

    - Use `coreos-install to install to the VM's disk with your keys:

    sudo coreos-install -d /dev/sda -C stable -c ~/cloud-config.yaml

    - Use VirtualBox to gracefully power off the machine.
    - Edit the VM settings again and remove the ISO from the machine.
    - Power it up again. You should end up at a login prompt.
    - SSH into the VM:

    $ ssh -p 22022 core@127.0.0.1
    Last login: Thu Apr 23 15:50:31 2015 from 192.168.59.3
    CoreOS stable (633.1.0)
    core@localhost ~ $

    [coreos-iso]: http://stable.release.core-os.net/amd64-usr/current/coreos_production_iso_image.iso