Table of Contents
Get a CloudRouter image
STEP 1
Obtain the latest Minimal or Full image from the CloudRouter Downloads. These images are in raw format and are compressed with xz
Download the image:
Code Block | ||
---|---|---|
| ||
curl -o CloudRouter-3.0-fedora-minimal.raw.xz https://repo.cloudrouter.org/3/fedora/23/images/CloudRouter-3.0-fedora-minimal.raw.xz curl -o CloudRouter-3.0-fedora-minimal.raw.xz.checksum.txt https://repo.cloudrouter.org/3/fedora/23/images/CloudRouter-3.0-fedora-minimal.raw.xz.checksum.txt |
Ensure the image's checksum is correct:
Code Block | ||
---|---|---|
| ||
sha256sum CloudRouter-2.0-fedora-minimal.raw.xz 60dc3d580c3e70a1cfbb34ed90dccf598574887a97742b4ad7f87fa821c43f91 CloudRouter-3.0-fedora-minimal.raw.xz cat CloudRouter-2.0-fedora-minimal.raw.xz.checksum.txt 60dc3d580c3e70a1cfbb34ed90dccf598574887a97742b4ad7f87fa821c43f91 ./CloudRouter-3.0-fedora-minimal.raw.xz |
Un-compress the image:
Code Block | ||
---|---|---|
| ||
xz -d -k CloudRouter-3.0-fedora-minimal.raw.xz |
Cloud-init
STEP 2
The CloudRouter image ships without default credentials. The cloudrouter user is provided to manage the system and has sudo access, but no default password is set. The cloudrouter images are configured to load password and/or ssh key data for the cloudrouter user from a metadata ISO image attached to the guest.
...
Code Block | ||
---|---|---|
| ||
sudo dnf install makepasswd genisoimage install genisoimage python3 |
Ubuntu required packages:
Code Block | ||
---|---|---|
| ||
sudo apt-get install genisoimage python3 |
Windows 10 required packages using Windows Subsystem for Linux:
Code Block | ||
---|---|---|
| ||
sudo apt-get install genisoimage python3 |
Example script usage:
Code Block | ||
---|---|---|
| ||
$ wget https://raw.githubusercontent.com/cloudrouter/cloudrouter/master/contrib/make-cloud-init-iso.sh
$ bash make-cloud-init-iso.sh --help
usage: make-cloud-init-iso.sh
optional: -pw [password] | --password [password]
optional: -np | --nopassword
optional: -nk | --nosshkey
optional: -k [/path/to/ssh/key.pub] | --key [/path/to/ssh/key.pub]
$ bash make-cloud-init-iso.sh --password "your_password_here"
[INFO] Using supplied password
[INFO] Generating rsa ssh keys ...
Generating public/private rsa key pair.
Your identification has been saved in /tmp/tmp.OVt3erUFeb/cloudrouter_rsa.
Your public key has been saved in /tmp/tmp.OVt3erUFeb/cloudrouter_rsa.pub.
The key fingerprint is:
b2:50:b1:6b:83:a6:06:46:9c:6a:df:4a:59:5a:33:9a username@hostname.localdomain
The key's randomart image is:
+--[ RSA 2048]----+
| . |
|. . o |
| + o |
|o o . |
|oo +== S |
|o..oOoo+ |
| oE .. |
| .. . |
| . |
+-----------------+
[INFO] Generating cloudrouter cloud-init iso ...
[INFO] cloudrouter user password: your_password_here
[INFO] Cloudrouter data writen to /tmp/tmp.OVt3erUFeb
$ ls /tmp/tmp.OVt3erUFeb
cloudrouter-init.iso cloudrouter_rsa cloudrouter_rsa.pub |
...
Please note: This ISO is provided for testing use only and should not be used in production.
Create a guest VM
STEP 3
virt-install - KVM using the CLI
...