Skip to content

Instantly share code, notes, and snippets.

@rediscontainer
Last active November 19, 2015 08:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rediscontainer/2a40097b0837f32bfbaa to your computer and use it in GitHub Desktop.
Save rediscontainer/2a40097b0837f32bfbaa to your computer and use it in GitHub Desktop.
CoreOSをVirtualBoxにインストールする ref: http://qiita.com/shigeomi-takada/items/ecbfedb67f852d6853e0
user@localhost:~$ wget https://raw.github.com/coreos/scripts/master/contrib/create-coreos-vdi
user@localhost:~$ chmod a+x create-coreos-vdi
user@localhost:~$ ls -l
-rwxrwxr-x 1 user user 3573 11月 18 18:55 create-coreos-vdi
user@localhost:~$ ./create-basic-configdrive -h
Usage: ./create-basic-configdrive -H HOSTNAME -S SSH_FILE [-p /target/path] [-d|-e|-i|-n|-t|-h]
Options:
-d URL Full URL path to discovery endpoint.
-e http://IP:PORT Adviertise URL for client communication.
-H HOSTNAME Machine hostname.
-i http://IP:PORT URL for server communication.
-l http://IP:PORT Listen URL for client communication.
-u http://IP:PORT Listen URL for server communication.
-n NAME etcd node name.
-p DEST Create config-drive ISO image to the given path.
-S FILE SSH keys file.
-t TOKEN Token ID from https://discovery.etcd.io.
-h This help
This tool creates a basic config-drive ISO image.
ssh -i id_rsa core@10.0.2.15
user@localhost:~$ ./create-coreos-vdi -d /home/user/VirtualBox -V beta
...
Success! CoreOS beta VDI image was created on coreos_production_835.5.0.vdi
user@localhost:~/VirtualBox$ ls -l
-rw------- 1 user user 788529152 11月 19 13:55 coreos_production_835.5.0.vdi
user@localhost:~$ ./create-coreos-vdi -h
Usage: ./create-coreos-vdi [-V version] [-d /target/path]
Options:
-d DEST 作成されたVDIファイルを保存するパスを指定
-V VERSION ダウンロードするCoreOSのバージョンを指定。
alpha, beta, stableのいづれか。指定しなければstableがダウンロードされる。
-h ヘルプを表示
This tool creates a CoreOS VDI image to be used with VirtualBox.
user@localhost:~/VirtualBox$ VBoxManage modifyhd coreos_production_835.5.0.vdi --resize 10240
user@localhost:~/VirtualBox$ VboxManage clonehd coreos_production_835.5.0.vdi hostname.vdi
...
Clone hard disk created in format 'VDI'. UUID: 2252000e-8a2b-4471-9767-00c469eb60b5
user@localhost:~/VirtualBox$ ls
coreos_production_835.5.0.vdi hostname.vdi
user@localhost:~$ wget https://raw.github.com/coreos/scripts/master/contrib/create-basic-configdrive
user@localhost:~$ chmod a+x create-basic-configdrive
user@localhost:~$ ls -l
-rwxrwxr-x 1 user user 4820 11月 18 19:11 create-basic-configdrive
-rwxrwxr-x 1 user user 3573 11月 18 18:55 create-coreos-vdi
user@localhost:~$ ssh-keygen -t rsa
user@localhost:~$ ls
id_rsa id_rsa.pub
user@localhost:~$ ./create-basic-configdrive -H hostname -S id_rsa.pub
...
Success! The config-drive image was created on /home/user/hostname.iso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment