Create VM (virtual machine) instance in GCP
It has been long time, i haven’t written an article, and now i am ready to write an article about VM instance on GCP. the next question what is virtual machine,
A virtual machine (VM) is an operating system (OS) or application environment that is installed on software, which imitates dedicated hardware. A VM provides an isolated environment for running its own OS and applications independently from the underlying host system or from other VMs on that host. For getting more understanding, you can install Oracle VM VirtualBox Manager to manage virtual machine, on Oracle VM you create / install as many OS (operating system) as you want.
For next, we can discuss about creating VM on GCP (google cloud platform), but before that, i will show how to create public and private rsa key. public rsa key is for remote vm server and private rsa key is for our local laptop.
How to generate public and private rsa key in linux :
- Open terminal and issue a command ssh-keygen -t rsa
- Open directory home/.ssh. If .ssh folder doesn’t appear on linux window please please check show hidden files. On that directory you will see id_rsa and id_rsa.pub. The content of id_rsa.pub is public key that we will put on remote server.
How to create VM instance on GCP :
a. Open menu compute engine → virtual machine
b. On top bar click create instance
c. For simplicity choose ubuntu
d. Put rsa public key on SSH key, if the feature is disappear please click security section then search SSH key part.
e. Turn on preemptible, for low price.
f. vm instance cretaed
How to todo ssh to remote instance :
a. Open terminal → ssh ip-address
Resource :
https://searchservervirtualization.techtarget.com/definition/virtual-machine