2019年10月16日水曜日

[FreeBSD]FreeBSD on Oracle Cloud


CHANGES
[2019/10/18] add remove host in known_hosts if can't connect console server
[2019/10/19] I can run FreeBSD-12.1-RC1(created vmdk on VirtualBox) on Oracle Cloud VM.Standard2.1 with **Launch Mode:EMULATED** (not PARAVIRTUALIZED). Maybe also 12.0-RELEASE.

Q1 console connection with non-default id filename

I can use the serial console and VNC console.

If the user uses non-default identity_filename for ssh authentification, you have to use ssh-agent or specify with "-i" option.

Example1) use ~/.ssh/id_rsa.oracle, ssh-agent and tcsh
% eval `ssh-agent -c`
% ssh-add ~/.ssh/id_rsa.oracle
and use cut&paste Connect with SSH from the oracle cloud console
% ssh -o ProxyCommand='ssh -W %h:%p -p 443 ocid1.instanceconsoleconnection.oc1.ap-tokyo-1.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@instance-console.ap-tokyo-1.oraclecloud.com' ocid1.instance.oc1.ap-tokyo-1.yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
Example2) use ~/.ssh/id_rsa.oracle, -i option(you need define -i twice
% ssh -i ~/.ssh/id_rsa.oracle -o ProxyCommand='ssh -i ~/.ssh/id_rsa.oracle  -W %h:%p -p 443 ocid1.instanceconsoleconnection.oc1.ap-tokyo-1.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@instance-console.ap-tokyo-1.oraclecloud.com' ocid1.instance.oc1.ap-tokyo-1.yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
If you connect ssh connection with below error,
Permission denied (publickey).
ssh_exchange_identification: Connection closed by remote host
Remove the oracle cloud host from ~/.ssh/known_hosts.


Q2 which Virtual-Image, we can use for FreeBSD[Oct/16/2019].

I tried FreeBSD-12.0-RELEASE-amd64.vmdk on VM.Standard2.1, I missed with this dmesgs [NG].
Currently, I'm trying FreeBSD-12.0-RELEASE-amd64.qcow2.
(Finally, I want to use FreeBSD on VM.Standard.E2.1.Micro as Always Free. But currently out of host capacity at Japan/East(Tokyo) Region. So I use VM.Standard2.1)

Q3 How to create custom boot image(what is OBJECT STORAGE URL)


After uploading Virtual Image to Object Storage/Bucket and creating a pre-authenticated request. you can get OBJECT STORAGE URL from Objects->View Object Details(1st one)