SlideShare a Scribd company logo
1
NetBSD on Google Compute Engine
2016-02-21
Ryo ONODERA
<ryo_on@yk.rim.or.jp>
<ryoon@NetBSD.org>
2
What is NetBSD?
➢ The descendent of BSD (Berkeley System Distribution)
operating system.
➢ Ported to many architectures:
➢
Alpha, ARM, MIPS, PowerPC, m68k, 32/64-bit Sparc, SuperH, x86, x86_64, VAX
➢ Workin progress: OrenRISC 1000, RISC-V, 64-bit ARM
➢
NetBSD/amd64 is for Intel/AMD x86_64 architecture.
3
What is Google Compute Engine?
➢One of Google Cloud Platform services.
➢IaaS (Infrastructure as a Service) 。
➢GCE provides paravirtualized virtual machine based on VirtIO.
➢The OS must support VirtIO devices.
➢
You cannot use full virtualization at all.
➢Free trial for 300 USD or 60 days (in 2016-01-10).
➢GCE provides image files of Linux distributions and Windows
Servers.
4
NetBSD and Google Compute Engine
➢Recently vioscsi(4) is committed to NetBSD current. Google
Compute Engine requires this device driver.
➢For FreeBSD, virtio_scsi(4) is used for this device. It is included
in 10.0 release or later.
5
Installing Google Cloud SDK and set it up
➢Install Google Cloud SDK from pkgsrc/net/py-google-cloud-sdk.
It is Python script.
➢I have tested with Python 2.7.11 from pkgsrc/lang/python27.
➢Install a web browser.
➢I have used Firefox 43.0.4 from pkgsrc/www/firefox. Webkit-based web
browsers should be supported (I have not tested yet).
➢Run /usr/pkg/py27-google-cloud-sdk/bin/gcloud auth login.
➢Firefox is invoked and you should input authentication information to the web
page.
6
Create GCE project and create a disk image
➢
Create a project with ‘gcloud config set project netbsd-79925’
➢
Read https://cloud.google.com/compute/docs/quickstart . However you can ignore
how to create instance steps.
➢
Create NetBSD/amd64 current disk image
➢
Run ‘cd /usr/src && ./build.sh release && ./build.sh live-image’ and get NetBSD-
7.99.25-amd64-live-sd0root.img.
➢
./build.sh live-image creates gzip-ed disk image, however you should use pre-compressed image to
save your time to gunzip.
➢
NetBSD-7.99.24-amd64-live-wd0boot.img image file is also created, however its root file system is
on wd0. You cannnot use this for GCE.
➢
Copy NetBSD-7.99.25-amd64-live-sd0root.img image file to your
working directory as file name, disk.raw.
7
Prepare disk image
➢
Run ‘sudo vnconfig vnd0 disk.raw’ and allocate disk.raw file to /dev/vnd0.
➢
Run ‘sudo mount /dev/vnd0 /mnt && sudo chroot /mnt /bin/sh’ and prepare
inside of the disk image.
➢
Run DHCP client for vioif0 network interface.
➢
Add ‘ifconfig_vioif0=dhcp’ to /etc/rc.conf.
➢
Add user and allocate ssh public key to the user.
➢
Run sshd automatically.
➢
Add sshd=yes to /etc/rc.conf.
➢
Run ‘sudo umount /mnt && sudo installboot -e -o console=com0 /dev/rvnd0a’
and you can get boot message via serial console.
➢
Deallocate disk.raw from /dev/rvnd0a and run ‘tar -Sczf netbsd79925.tar.gz
disk.raw’. You can get the disk image for GCE as tar ball.
8
Upload the disk image and create virtual machine
instance
➢
Put netbsd79925.tar.gz to Google Cloud Storage or https web site.
➢
To put the disk image to Google Cloud Storage with gsutil command or GCE web interface.
➢
For gsutil case, run ‘gsutil cp netbsd79925.tar.gz gs://netbsd-compute-engine/netbsd79925.tar.gz’.
➢
In case of Google Cloud Storage, run ‘gcloud compute images create netbsd79925
--source-uri gs://netbsd-compute-engine/netbsd79925.tar.gz’ and get a disk image for
your instance.
➢
Create the virtual machine instance based on netbsd79925 and boot it.
➢
Run ‘gcloud compute instances create instance-1 --image netbsd79925 --zone us-east1-b --machine-type f1-
micro’.
➢The instance boots automatically.
➢
Get boot message from ‘gcloud compute instances get-serial-port-output instance-1
--zone us-east1-b’. You can download this boot message from web interface.
➢
You cannot control the virtual machine. You should use ssh for controlling the virtual machine.
9
Boot message (1/2)
(snip)
pci0 at mainbus0 bus 0: configuration mode 1
pcib0 at pci0 dev 1 function 0: vendor 8086 product 7110 (rev. 0x03)
piixpm0 at pci0 dev 1 function 3: vendor 8086 product 7113 (rev. 0x03)
piixpm0: SMBus disabled
virtio0 at pci0 dev 3 function 0
virtio0: Virtio SCSI Device (rev. 0x00)
vioscsi0 at virtio0: Features: 0x0
vioscsi0: qsize 8192
scsibus0 at vioscsi0: 253 targets, 1 lun per target
virtio0: interrupting at ioapic0 pin 11
virtio1 at pci0 dev 4 function 0
virtio1: Virtio Network Device (rev. 0x00)
vioif0 at virtio1: Ethernet address 42:01:0a:f0:00:02
vioif0: Features: 0x30020<CTRL_VQ,STATUS,MAC>
virtio1: interrupting at ioapic0 pin 11
isa0 at pcib0
10
Boot message (2/2)
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
attimer0 at isa0 port 0x40-0x43
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
attimer0: attached to pcppi0
acpicpu0 at cpu0: ACPI CPU
sd0 at scsibus0 target 2 lun 0: <Google, PersistentDisk, 1> disk fixed
sd0: fabricating a geometry
sd0: 2048 MB, 2048 cyl, 64 head, 32 sec, 512 bytes/sect x 4194304 sectors
sd0: fabricating a geometry
(snip)
11
Copyright notice
https://creativecommons.org/licenses/by/4.0/
Copyright (c) 2016 Ryo ONODERA
CreativeCommons Attribution 4.0 International (CC BY 4.0)

More Related Content

What's hot

Juju 基礎編
Juju 基礎編Juju 基礎編
Juju 基礎編
VirtualTech Japan Inc.
 
OpenStack on SmartOS
OpenStack on SmartOSOpenStack on SmartOS
OpenStack on SmartOS
Daniele Stroppa
 
Juju + KubernetesでGPU の活用
Juju + KubernetesでGPU の活用Juju + KubernetesでGPU の活用
Juju + KubernetesでGPU の活用
VirtualTech Japan Inc.
 
Building packages through emulation by Sean Bruno
Building packages through emulation by Sean BrunoBuilding packages through emulation by Sean Bruno
Building packages through emulation by Sean Bruno
eurobsdcon
 
Gns3
Gns3Gns3
Look Into Libvirt Osier Yang
Look Into Libvirt Osier YangLook Into Libvirt Osier Yang
Look Into Libvirt Osier Yang
OpenCity Community
 
QEMU in Cross building
QEMU in Cross buildingQEMU in Cross building
QEMU in Cross building
Tetsuyuki Kobayashi
 
Scaling IO-bound microservices
Scaling IO-bound microservicesScaling IO-bound microservices
Scaling IO-bound microservices
Salo Shp
 
s6196-chris-huybregts-microsoft-new-gpu-virtualization-technologies
s6196-chris-huybregts-microsoft-new-gpu-virtualization-technologiess6196-chris-huybregts-microsoft-new-gpu-virtualization-technologies
s6196-chris-huybregts-microsoft-new-gpu-virtualization-technologiesChris Huybregts
 
SmartOS Primer
SmartOS PrimerSmartOS Primer
SmartOS Primer
Daniele Stroppa
 
Vmware nsx-network-virtualization-platform-white-paper
Vmware nsx-network-virtualization-platform-white-paperVmware nsx-network-virtualization-platform-white-paper
Vmware nsx-network-virtualization-platform-white-paper
CloudSyntrix
 
Router Virtualization With GNS3
Router Virtualization With GNS3Router Virtualization With GNS3
Router Virtualization With GNS3
mrmouse
 
Storage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStackStorage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStack
ShapeBlue
 
Try out Hadoop
Try out HadoopTry out Hadoop
Try out Hadoop
Immo Salo
 
Cgroups in android
Cgroups in androidCgroups in android
Cgroups in android
ramalinga prasad tadepalli
 
Docker 101
Docker 101Docker 101
Docker 101
Josué Neis
 
How to ride a 100GbE LAN -MEMO-
How to ride a 100GbE LAN -MEMO-How to ride a 100GbE LAN -MEMO-
How to ride a 100GbE LAN -MEMO-
Naoto MATSUMOTO
 
C* Summit EU 2013: Hardware Agnostic: Cassandra on Raspberry Pi
C* Summit EU 2013: Hardware Agnostic: Cassandra on Raspberry Pi C* Summit EU 2013: Hardware Agnostic: Cassandra on Raspberry Pi
C* Summit EU 2013: Hardware Agnostic: Cassandra on Raspberry Pi
DataStax Academy
 

What's hot (20)

Juju 基礎編
Juju 基礎編Juju 基礎編
Juju 基礎編
 
OpenStack on SmartOS
OpenStack on SmartOSOpenStack on SmartOS
OpenStack on SmartOS
 
Juju + KubernetesでGPU の活用
Juju + KubernetesでGPU の活用Juju + KubernetesでGPU の活用
Juju + KubernetesでGPU の活用
 
Building packages through emulation by Sean Bruno
Building packages through emulation by Sean BrunoBuilding packages through emulation by Sean Bruno
Building packages through emulation by Sean Bruno
 
Gns3
Gns3Gns3
Gns3
 
Look Into Libvirt Osier Yang
Look Into Libvirt Osier YangLook Into Libvirt Osier Yang
Look Into Libvirt Osier Yang
 
QEMU in Cross building
QEMU in Cross buildingQEMU in Cross building
QEMU in Cross building
 
Scaling IO-bound microservices
Scaling IO-bound microservicesScaling IO-bound microservices
Scaling IO-bound microservices
 
s6196-chris-huybregts-microsoft-new-gpu-virtualization-technologies
s6196-chris-huybregts-microsoft-new-gpu-virtualization-technologiess6196-chris-huybregts-microsoft-new-gpu-virtualization-technologies
s6196-chris-huybregts-microsoft-new-gpu-virtualization-technologies
 
SmartOS Primer
SmartOS PrimerSmartOS Primer
SmartOS Primer
 
Vmware nsx-network-virtualization-platform-white-paper
Vmware nsx-network-virtualization-platform-white-paperVmware nsx-network-virtualization-platform-white-paper
Vmware nsx-network-virtualization-platform-white-paper
 
Router Virtualization With GNS3
Router Virtualization With GNS3Router Virtualization With GNS3
Router Virtualization With GNS3
 
Storage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStackStorage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStack
 
VM - Talk
VM - TalkVM - Talk
VM - Talk
 
Try out Hadoop
Try out HadoopTry out Hadoop
Try out Hadoop
 
Cgroups in android
Cgroups in androidCgroups in android
Cgroups in android
 
Docker 101
Docker 101Docker 101
Docker 101
 
How to ride a 100GbE LAN -MEMO-
How to ride a 100GbE LAN -MEMO-How to ride a 100GbE LAN -MEMO-
How to ride a 100GbE LAN -MEMO-
 
C* Summit EU 2013: Hardware Agnostic: Cassandra on Raspberry Pi
C* Summit EU 2013: Hardware Agnostic: Cassandra on Raspberry Pi C* Summit EU 2013: Hardware Agnostic: Cassandra on Raspberry Pi
C* Summit EU 2013: Hardware Agnostic: Cassandra on Raspberry Pi
 
Game.log
Game.logGame.log
Game.log
 

Viewers also liked

pkgsrcユーザー向け設定
pkgsrcユーザー向け設定pkgsrcユーザー向け設定
pkgsrcユーザー向け設定
Ryo ONODERA
 
家族のためにエンジニアとしてやってみたこと(What I did for my family as an engineer)
家族のためにエンジニアとしてやってみたこと(What I did for my family as an engineer)家族のためにエンジニアとしてやってみたこと(What I did for my family as an engineer)
家族のためにエンジニアとしてやってみたこと(What I did for my family as an engineer)Kazuya Numata
 
(昔は)人気のあーきてくちゃ
(昔は)人気のあーきてくちゃ(昔は)人気のあーきてくちゃ
(昔は)人気のあーきてくちゃ
Yojiro Uo
 
あるmmapの話
あるmmapの話あるmmapの話
あるmmapの話
nullnilaki
 
つくっておぼえる!仮想マシン〜直前で実装編〜
つくっておぼえる!仮想マシン〜直前で実装編〜つくっておぼえる!仮想マシン〜直前で実装編〜
つくっておぼえる!仮想マシン〜直前で実装編〜
Eric Sartre
 
ぼくとしりとりの約3.0*10^3日間戦争
ぼくとしりとりの約3.0*10^3日間戦争ぼくとしりとりの約3.0*10^3日間戦争
ぼくとしりとりの約3.0*10^3日間戦争Eric Sartre
 
ネトゲで人生を変えたい
ネトゲで人生を変えたいネトゲで人生を変えたい
ネトゲで人生を変えたい
Eric Sartre
 
x86-64/Linuxに独自メモリ空間を勝手増設
x86-64/Linuxに独自メモリ空間を勝手増設x86-64/Linuxに独自メモリ空間を勝手増設
x86-64/Linuxに独自メモリ空間を勝手増設Minoru Nakamura
 
Kernel vm#9 powerkvm-dist-20131208
Kernel vm#9 powerkvm-dist-20131208Kernel vm#9 powerkvm-dist-20131208
Kernel vm#9 powerkvm-dist-20131208Manabu Ori
 
SAT/SMTソルバの仕組み
SAT/SMTソルバの仕組みSAT/SMTソルバの仕組み
SAT/SMTソルバの仕組み
Masahiro Sakai
 
「わからない」との付き合い方
「わからない」との付き合い方「わからない」との付き合い方
「わからない」との付き合い方
Eric Sartre
 
やさしい日本語言い換えシステムを支える技術
やさしい日本語言い換えシステムを支える技術やさしい日本語言い換えシステムを支える技術
やさしい日本語言い換えシステムを支える技術
Eric Sartre
 

Viewers also liked (13)

pkgsrcユーザー向け設定
pkgsrcユーザー向け設定pkgsrcユーザー向け設定
pkgsrcユーザー向け設定
 
家族のためにエンジニアとしてやってみたこと(What I did for my family as an engineer)
家族のためにエンジニアとしてやってみたこと(What I did for my family as an engineer)家族のためにエンジニアとしてやってみたこと(What I did for my family as an engineer)
家族のためにエンジニアとしてやってみたこと(What I did for my family as an engineer)
 
(昔は)人気のあーきてくちゃ
(昔は)人気のあーきてくちゃ(昔は)人気のあーきてくちゃ
(昔は)人気のあーきてくちゃ
 
あるmmapの話
あるmmapの話あるmmapの話
あるmmapの話
 
Listen grep
Listen grepListen grep
Listen grep
 
つくっておぼえる!仮想マシン〜直前で実装編〜
つくっておぼえる!仮想マシン〜直前で実装編〜つくっておぼえる!仮想マシン〜直前で実装編〜
つくっておぼえる!仮想マシン〜直前で実装編〜
 
ぼくとしりとりの約3.0*10^3日間戦争
ぼくとしりとりの約3.0*10^3日間戦争ぼくとしりとりの約3.0*10^3日間戦争
ぼくとしりとりの約3.0*10^3日間戦争
 
ネトゲで人生を変えたい
ネトゲで人生を変えたいネトゲで人生を変えたい
ネトゲで人生を変えたい
 
x86-64/Linuxに独自メモリ空間を勝手増設
x86-64/Linuxに独自メモリ空間を勝手増設x86-64/Linuxに独自メモリ空間を勝手増設
x86-64/Linuxに独自メモリ空間を勝手増設
 
Kernel vm#9 powerkvm-dist-20131208
Kernel vm#9 powerkvm-dist-20131208Kernel vm#9 powerkvm-dist-20131208
Kernel vm#9 powerkvm-dist-20131208
 
SAT/SMTソルバの仕組み
SAT/SMTソルバの仕組みSAT/SMTソルバの仕組み
SAT/SMTソルバの仕組み
 
「わからない」との付き合い方
「わからない」との付き合い方「わからない」との付き合い方
「わからない」との付き合い方
 
やさしい日本語言い換えシステムを支える技術
やさしい日本語言い換えシステムを支える技術やさしい日本語言い換えシステムを支える技術
やさしい日本語言い換えシステムを支える技術
 

Similar to NetBSD on Google Compute Engine (en)

syzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzersyzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzer
Dmitry Vyukov
 
Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototyping
Yan Vugenfirer
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
JayakumarS71
 
Running virtual box from the linux command line
Running virtual box from the linux command lineRunning virtual box from the linux command line
Running virtual box from the linux command line
Eric Javier Espino Man
 
NFD9 - Matt Peterson, Data Center Operations
NFD9 - Matt Peterson, Data Center OperationsNFD9 - Matt Peterson, Data Center Operations
NFD9 - Matt Peterson, Data Center Operations
Cumulus Networks
 
Raspberry Pi tutorial
Raspberry Pi tutorialRaspberry Pi tutorial
Raspberry Pi tutorial
艾鍗科技
 
the NML project
the NML projectthe NML project
the NML projectLei Yang
 
See what happened with real time kvm when building real time cloud pezhang@re...
See what happened with real time kvm when building real time cloud pezhang@re...See what happened with real time kvm when building real time cloud pezhang@re...
See what happened with real time kvm when building real time cloud pezhang@re...
LinuxCon ContainerCon CloudOpen China
 
Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry Pi
LloydMoore
 
Locally run a FIWARE Lab Instance In another Hypervisors
Locally run a FIWARE Lab Instance In another HypervisorsLocally run a FIWARE Lab Instance In another Hypervisors
Locally run a FIWARE Lab Instance In another Hypervisors
José Ignacio Carretero Guarde
 
Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0guest72e8c1
 
Kvm setup
Kvm setupKvm setup
Krenel Based Virtual Machine In Centos7
Krenel Based Virtual Machine In Centos7Krenel Based Virtual Machine In Centos7
Krenel Based Virtual Machine In Centos7
a_ratra
 
Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysis
Anne Nicolas
 
3. configuring a compute node for nfv
3. configuring a compute node for nfv3. configuring a compute node for nfv
3. configuring a compute node for nfv
videos
 
OpenNebulaConf 2013 - Hands-on Tutorial: 2. Installing and Basic Usage
OpenNebulaConf 2013 - Hands-on Tutorial: 2. Installing and Basic UsageOpenNebulaConf 2013 - Hands-on Tutorial: 2. Installing and Basic Usage
OpenNebulaConf 2013 - Hands-on Tutorial: 2. Installing and Basic UsageOpenNebula Project
 
Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack
eurobsdcon
 
AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...
AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...
AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...
Mihai Criveti
 

Similar to NetBSD on Google Compute Engine (en) (20)

syzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzersyzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzer
 
Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototyping
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Running virtual box from the linux command line
Running virtual box from the linux command lineRunning virtual box from the linux command line
Running virtual box from the linux command line
 
NFD9 - Matt Peterson, Data Center Operations
NFD9 - Matt Peterson, Data Center OperationsNFD9 - Matt Peterson, Data Center Operations
NFD9 - Matt Peterson, Data Center Operations
 
Raspberry Pi tutorial
Raspberry Pi tutorialRaspberry Pi tutorial
Raspberry Pi tutorial
 
the NML project
the NML projectthe NML project
the NML project
 
See what happened with real time kvm when building real time cloud pezhang@re...
See what happened with real time kvm when building real time cloud pezhang@re...See what happened with real time kvm when building real time cloud pezhang@re...
See what happened with real time kvm when building real time cloud pezhang@re...
 
Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry Pi
 
Howto Pxeboot
Howto PxebootHowto Pxeboot
Howto Pxeboot
 
Locally run a FIWARE Lab Instance In another Hypervisors
Locally run a FIWARE Lab Instance In another HypervisorsLocally run a FIWARE Lab Instance In another Hypervisors
Locally run a FIWARE Lab Instance In another Hypervisors
 
RMLL / LSM 2009
RMLL / LSM 2009RMLL / LSM 2009
RMLL / LSM 2009
 
Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0
 
Kvm setup
Kvm setupKvm setup
Kvm setup
 
Krenel Based Virtual Machine In Centos7
Krenel Based Virtual Machine In Centos7Krenel Based Virtual Machine In Centos7
Krenel Based Virtual Machine In Centos7
 
Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysis
 
3. configuring a compute node for nfv
3. configuring a compute node for nfv3. configuring a compute node for nfv
3. configuring a compute node for nfv
 
OpenNebulaConf 2013 - Hands-on Tutorial: 2. Installing and Basic Usage
OpenNebulaConf 2013 - Hands-on Tutorial: 2. Installing and Basic UsageOpenNebulaConf 2013 - Hands-on Tutorial: 2. Installing and Basic Usage
OpenNebulaConf 2013 - Hands-on Tutorial: 2. Installing and Basic Usage
 
Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack
 
AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...
AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...
AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...
 

More from Ryo ONODERA

helloSystemをインストール
helloSystemをインストールhelloSystemをインストール
helloSystemをインストール
Ryo ONODERA
 
NetBSD on Google Compute Engine
NetBSD on Google Compute EngineNetBSD on Google Compute Engine
NetBSD on Google Compute Engine
Ryo ONODERA
 
自分的pkgsrcの課題
自分的pkgsrcの課題自分的pkgsrcの課題
自分的pkgsrcの課題
Ryo ONODERA
 
How to package github softwares
How to package github softwaresHow to package github softwares
How to package github softwares
Ryo ONODERA
 
FreeBSD under DigitalOcean VPS
FreeBSD under DigitalOcean VPSFreeBSD under DigitalOcean VPS
FreeBSD under DigitalOcean VPS
Ryo ONODERA
 
NetBSD on Conoha VPS at JNUG BoF 2014
NetBSD on Conoha VPS at JNUG BoF 2014NetBSD on Conoha VPS at JNUG BoF 2014
NetBSD on Conoha VPS at JNUG BoF 2014Ryo ONODERA
 
140607 lib o-mini_con-ryoon
140607 lib o-mini_con-ryoon140607 lib o-mini_con-ryoon
140607 lib o-mini_con-ryoonRyo ONODERA
 
LibreOffice 4 under NetBSD with pkgsrc (en)
LibreOffice 4 under NetBSD with pkgsrc (en)LibreOffice 4 under NetBSD with pkgsrc (en)
LibreOffice 4 under NetBSD with pkgsrc (en)
Ryo ONODERA
 
LibreOffice 4 under NetBSD with pkgsrc
LibreOffice 4 under NetBSD with pkgsrcLibreOffice 4 under NetBSD with pkgsrc
LibreOffice 4 under NetBSD with pkgsrc
Ryo ONODERA
 

More from Ryo ONODERA (9)

helloSystemをインストール
helloSystemをインストールhelloSystemをインストール
helloSystemをインストール
 
NetBSD on Google Compute Engine
NetBSD on Google Compute EngineNetBSD on Google Compute Engine
NetBSD on Google Compute Engine
 
自分的pkgsrcの課題
自分的pkgsrcの課題自分的pkgsrcの課題
自分的pkgsrcの課題
 
How to package github softwares
How to package github softwaresHow to package github softwares
How to package github softwares
 
FreeBSD under DigitalOcean VPS
FreeBSD under DigitalOcean VPSFreeBSD under DigitalOcean VPS
FreeBSD under DigitalOcean VPS
 
NetBSD on Conoha VPS at JNUG BoF 2014
NetBSD on Conoha VPS at JNUG BoF 2014NetBSD on Conoha VPS at JNUG BoF 2014
NetBSD on Conoha VPS at JNUG BoF 2014
 
140607 lib o-mini_con-ryoon
140607 lib o-mini_con-ryoon140607 lib o-mini_con-ryoon
140607 lib o-mini_con-ryoon
 
LibreOffice 4 under NetBSD with pkgsrc (en)
LibreOffice 4 under NetBSD with pkgsrc (en)LibreOffice 4 under NetBSD with pkgsrc (en)
LibreOffice 4 under NetBSD with pkgsrc (en)
 
LibreOffice 4 under NetBSD with pkgsrc
LibreOffice 4 under NetBSD with pkgsrcLibreOffice 4 under NetBSD with pkgsrc
LibreOffice 4 under NetBSD with pkgsrc
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 

NetBSD on Google Compute Engine (en)

  • 1. 1 NetBSD on Google Compute Engine 2016-02-21 Ryo ONODERA <ryo_on@yk.rim.or.jp> <ryoon@NetBSD.org>
  • 2. 2 What is NetBSD? ➢ The descendent of BSD (Berkeley System Distribution) operating system. ➢ Ported to many architectures: ➢ Alpha, ARM, MIPS, PowerPC, m68k, 32/64-bit Sparc, SuperH, x86, x86_64, VAX ➢ Workin progress: OrenRISC 1000, RISC-V, 64-bit ARM ➢ NetBSD/amd64 is for Intel/AMD x86_64 architecture.
  • 3. 3 What is Google Compute Engine? ➢One of Google Cloud Platform services. ➢IaaS (Infrastructure as a Service) 。 ➢GCE provides paravirtualized virtual machine based on VirtIO. ➢The OS must support VirtIO devices. ➢ You cannot use full virtualization at all. ➢Free trial for 300 USD or 60 days (in 2016-01-10). ➢GCE provides image files of Linux distributions and Windows Servers.
  • 4. 4 NetBSD and Google Compute Engine ➢Recently vioscsi(4) is committed to NetBSD current. Google Compute Engine requires this device driver. ➢For FreeBSD, virtio_scsi(4) is used for this device. It is included in 10.0 release or later.
  • 5. 5 Installing Google Cloud SDK and set it up ➢Install Google Cloud SDK from pkgsrc/net/py-google-cloud-sdk. It is Python script. ➢I have tested with Python 2.7.11 from pkgsrc/lang/python27. ➢Install a web browser. ➢I have used Firefox 43.0.4 from pkgsrc/www/firefox. Webkit-based web browsers should be supported (I have not tested yet). ➢Run /usr/pkg/py27-google-cloud-sdk/bin/gcloud auth login. ➢Firefox is invoked and you should input authentication information to the web page.
  • 6. 6 Create GCE project and create a disk image ➢ Create a project with ‘gcloud config set project netbsd-79925’ ➢ Read https://cloud.google.com/compute/docs/quickstart . However you can ignore how to create instance steps. ➢ Create NetBSD/amd64 current disk image ➢ Run ‘cd /usr/src && ./build.sh release && ./build.sh live-image’ and get NetBSD- 7.99.25-amd64-live-sd0root.img. ➢ ./build.sh live-image creates gzip-ed disk image, however you should use pre-compressed image to save your time to gunzip. ➢ NetBSD-7.99.24-amd64-live-wd0boot.img image file is also created, however its root file system is on wd0. You cannnot use this for GCE. ➢ Copy NetBSD-7.99.25-amd64-live-sd0root.img image file to your working directory as file name, disk.raw.
  • 7. 7 Prepare disk image ➢ Run ‘sudo vnconfig vnd0 disk.raw’ and allocate disk.raw file to /dev/vnd0. ➢ Run ‘sudo mount /dev/vnd0 /mnt && sudo chroot /mnt /bin/sh’ and prepare inside of the disk image. ➢ Run DHCP client for vioif0 network interface. ➢ Add ‘ifconfig_vioif0=dhcp’ to /etc/rc.conf. ➢ Add user and allocate ssh public key to the user. ➢ Run sshd automatically. ➢ Add sshd=yes to /etc/rc.conf. ➢ Run ‘sudo umount /mnt && sudo installboot -e -o console=com0 /dev/rvnd0a’ and you can get boot message via serial console. ➢ Deallocate disk.raw from /dev/rvnd0a and run ‘tar -Sczf netbsd79925.tar.gz disk.raw’. You can get the disk image for GCE as tar ball.
  • 8. 8 Upload the disk image and create virtual machine instance ➢ Put netbsd79925.tar.gz to Google Cloud Storage or https web site. ➢ To put the disk image to Google Cloud Storage with gsutil command or GCE web interface. ➢ For gsutil case, run ‘gsutil cp netbsd79925.tar.gz gs://netbsd-compute-engine/netbsd79925.tar.gz’. ➢ In case of Google Cloud Storage, run ‘gcloud compute images create netbsd79925 --source-uri gs://netbsd-compute-engine/netbsd79925.tar.gz’ and get a disk image for your instance. ➢ Create the virtual machine instance based on netbsd79925 and boot it. ➢ Run ‘gcloud compute instances create instance-1 --image netbsd79925 --zone us-east1-b --machine-type f1- micro’. ➢The instance boots automatically. ➢ Get boot message from ‘gcloud compute instances get-serial-port-output instance-1 --zone us-east1-b’. You can download this boot message from web interface. ➢ You cannot control the virtual machine. You should use ssh for controlling the virtual machine.
  • 9. 9 Boot message (1/2) (snip) pci0 at mainbus0 bus 0: configuration mode 1 pcib0 at pci0 dev 1 function 0: vendor 8086 product 7110 (rev. 0x03) piixpm0 at pci0 dev 1 function 3: vendor 8086 product 7113 (rev. 0x03) piixpm0: SMBus disabled virtio0 at pci0 dev 3 function 0 virtio0: Virtio SCSI Device (rev. 0x00) vioscsi0 at virtio0: Features: 0x0 vioscsi0: qsize 8192 scsibus0 at vioscsi0: 253 targets, 1 lun per target virtio0: interrupting at ioapic0 pin 11 virtio1 at pci0 dev 4 function 0 virtio1: Virtio Network Device (rev. 0x00) vioif0 at virtio1: Ethernet address 42:01:0a:f0:00:02 vioif0: Features: 0x30020<CTRL_VQ,STATUS,MAC> virtio1: interrupting at ioapic0 pin 11 isa0 at pcib0
  • 10. 10 Boot message (2/2) com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo com0: console com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo attimer0 at isa0 port 0x40-0x43 pcppi0 at isa0 port 0x61 midi0 at pcppi0: PC speaker sysbeep0 at pcppi0 attimer0: attached to pcppi0 acpicpu0 at cpu0: ACPI CPU sd0 at scsibus0 target 2 lun 0: <Google, PersistentDisk, 1> disk fixed sd0: fabricating a geometry sd0: 2048 MB, 2048 cyl, 64 head, 32 sec, 512 bytes/sect x 4194304 sectors sd0: fabricating a geometry (snip)
  • 11. 11 Copyright notice https://creativecommons.org/licenses/by/4.0/ Copyright (c) 2016 Ryo ONODERA CreativeCommons Attribution 4.0 International (CC BY 4.0)