LAB Creating Virtual Machine
Lab : Create GCP Virtual Machine
- create an N1 Series VM Instance with machine type n1-standard-1
- SSH into Instance and installed tools like RDP and XFCE4
- Set a Password for your Instance.
- RDP into the Instance
- Snapshot and Image Creation from Instance
Create a VM Instance
Login to GCP console | Select your project and click on Virtual Machine | Create Instance
There are three options to create a VM : Google Cloud Console , Google Cloud SDK , or Google Cloud Shell.
Now on Name: dclessons-instance-01 | Region: us-central1 | Zone: us-central-a | Under Machine Configuration: Series: N1 | Machine type: n1-standard-1
Some Partial list of regions are as: asia-east1, asia-east2, asia-south-1, Europe-north1, us-east1, us-east2, us-east3, us-west1, us-east2. Once you select region, zones related to that region must be selected.
Under Boot Disk: Select change | Select OS: Ubuntu | Version: Ubuntu18.04 LTS | Boot disk type: Standard Persistent disk | Size: 10 GB | Click Select
Once Zone is selected, machine type available in that particular zone will be available. Boot disk option list a default configuration, by clicking Change button bring up the Boot Disk Option dialog to select option described in above figure.
Under Identity and API access | Service Account: No Service account | Click Create
Once VM is created | click on SSH button under SSH
Once SSH is done , run below commands
Enter the below command to update all the libraries.
sudo apt-get update
Enter the below command to install the RDP configurations.
sudo apt-get install xrdp | If prompted to confirm, press Y and then press Enter.
Enter the below command to install the GUI mode.
sudo apt-get install xfce4
If prompted to confirm, press Y and then press Enter.
Enter the below command to restart the RDP Service.
sudo service xrdp restart
Enter the below command to Switch to the root user.
Enter the below command to configure the password
Choose password as per your desire
Inorder to take the RDP, check the public IP address of the VM and RDP it.