This shows you the differences between two versions of the page.
scgc:laboratoare:00 [2021/10/13 16:19] maria.mihailescu [5. [20p] Connect to someone else's virtual machine] |
scgc:laboratoare:00 [2021/10/13 17:26] (current) maria.mihailescu [6. Delete the virtual machine] |
||
---|---|---|---|
Line 23: | Line 23: | ||
</note> | </note> | ||
- | ==== 1. [10p] SSH key pair generation ==== | + | ==== 1. SSH key pair generation ==== |
Because the virtual machine's user's password is reset to an invalid value by cloud-init, you will not be able to log into the virtual machine using password login. Instead, you must first create an SSH key that will be automatically added to the virtual machine's default user's authorized key. | Because the virtual machine's user's password is reset to an invalid value by cloud-init, you will not be able to log into the virtual machine using password login. Instead, you must first create an SSH key that will be automatically added to the virtual machine's default user's authorized key. | ||
Line 43: | Line 43: | ||
{{ :scgc:laboratoare:openstack-key-import.png?700 }} | {{ :scgc:laboratoare:openstack-key-import.png?700 }} | ||
- | ==== 2. [10p] Create virtual machines ==== | + | ==== 2. Create virtual machines ==== |
Now that the SSH key pair is available, we can start creating virtual machines. Note that you can only use a limited amount of total resources. You can see graphs of the total amount of resources you can use, and the amount of resources you have used so far through the Horizon interface, in the ''Project'' > ''Compute'' > ''Overview'' section. In the image below, resources are limited to 4 CPU cores and 4GB of RAM. | Now that the SSH key pair is available, we can start creating virtual machines. Note that you can only use a limited amount of total resources. You can see graphs of the total amount of resources you can use, and the amount of resources you have used so far through the Horizon interface, in the ''Project'' > ''Compute'' > ''Overview'' section. In the image below, resources are limited to 4 CPU cores and 4GB of RAM. | ||
Line 107: | Line 107: | ||
</note> | </note> | ||
- | ==== 3. [20p] Connect to the virtual machine ==== | + | ==== 3. Connect to the virtual machine ==== |
The picture bellow shows how you can connect to the virtual machine. Since the virtual machine runs in OpenStack (i.e. in the faculty's cluster) and the assigned IP address is a private address, you cannot directly connect to the virtual machine. | The picture bellow shows how you can connect to the virtual machine. Since the virtual machine runs in OpenStack (i.e. in the faculty's cluster) and the assigned IP address is a private address, you cannot directly connect to the virtual machine. | ||
Line 155: | Line 155: | ||
</code> | </code> | ||
- | ==== 4. [30p] Connect to the virtual machine with X forwarding ==== | + | ==== 4. Connect to the virtual machine with X forwarding ==== |
Linux uses a client-server architecture for the X window system. SSH allows you to forward graphical applications information through the X11 forwarding functionality. | Linux uses a client-server architecture for the X window system. SSH allows you to forward graphical applications information through the X11 forwarding functionality. | ||
Line 182: | Line 182: | ||
</code> | </code> | ||
<hidden> | <hidden> | ||
- | ==== 5. [20p] Connect to someone else's virtual machine ==== | + | ==== 5. Connect to someone else's virtual machine ==== |
Partner up with someone else in the lab. Create a simple simple message server using ''netcat'' to listen to port ''8890''. Ask your partner to connect to your client and also try to connect to their server. You will need two terminals to perform this. | Partner up with someone else in the lab. Create a simple simple message server using ''netcat'' to listen to port ''8890''. Ask your partner to connect to your client and also try to connect to their server. You will need two terminals to perform this. | ||
Line 211: | Line 211: | ||
{{ :scgc:laboratoare:openstack-security-group-cidr.png?700 }} | {{ :scgc:laboratoare:openstack-security-group-cidr.png?700 }} | ||
</hidden> | </hidden> | ||
- | ==== 6. [10p] Delete the virtual machine ==== | + | ==== 5. Delete the virtual machine ==== |
After each lab, and whenever you no longer need a virtual machine, please delete it. Go to the Horizon dashboard, go to ''Project'' > ''Compute'' > ''Instances'' and delete the virtual machine. You can either select all virtual machines your wish to delete from their checkbox on the left, and then click on ''Delete Instances'', or select ''Delete instance'' from the dropdown menu on the right. | After each lab, and whenever you no longer need a virtual machine, please delete it. Go to the Horizon dashboard, go to ''Project'' > ''Compute'' > ''Instances'' and delete the virtual machine. You can either select all virtual machines your wish to delete from their checkbox on the left, and then click on ''Delete Instances'', or select ''Delete instance'' from the dropdown menu on the right. | ||
It would also be a good idea to delete the security group rule you have previously created earlier if you do not need to allow communication with machines outside your project. | It would also be a good idea to delete the security group rule you have previously created earlier if you do not need to allow communication with machines outside your project. |