0

We are trying to teach GCP services for college students. So, I have created the VM instance in particular project. We need to know how to manage resource allocation for every user in GCP console.

For example, 5 students are accessing 1TB VM instance. We need to ensure that, every student must be allocated with 200GB of memory. Is it possible in GCP console.? If so, how it is possible?

Dave M
  • 4,514
  • 22
  • 31
  • 30
  • 1
    Google Cloud provides a VM with an OS. Management of OS users, system quotas, disk space, etc. is up to you. Linux offers many tools for user management. – John Hanley Jul 01 '21 at 20:54
  • Is there a way to restirct user access to create vm instance only at particular machine type like, user can create only e2-medium-2vCPU,4GB RAM? – DSAILAB USR1 Jul 06 '21 at 10:25

1 Answers1

0

Yes, it is possible to allocate resources to users individually via the GCP console. First, you need to create a disk and attach it to the VM instance that you’ve created. Repeat this step and create the desired number of disks and attach it to the same VM instance. Members should be added to disk level but not at project / instance level and the relevant roles should be assigned.

There is another workaround to this via SSH, for that: You need to create a disk and attach it to the VM instance that you’ve created.

Then you need to SSH the VM instance and start partitioning the disk by following this documentation.

Points to be noted :

1.Type of disk should be: Standard Persistent disk

2.In SSH documentation there is a small change in step 7 while partitioning the disk “W” should be used for saving the changes made while partitioning instead of enter.

3.Members should be added to disk level but not at project / instance level

Goli Nikitha
  • 140
  • 4
  • Is there a way to restirct user access to create vm instance only at particular machine type like, user can create only e2-medium-2vCPU,4GB RAM? – DSAILAB USR1 Jul 06 '21 at 10:25
  • I couldn't find any way to restrict user to particular machine type.As [Compute Engine supports resource-level access](https://cloud.google.com/compute/docs/access/managing-access-to-resources) has no control on Machine type. – Goli Nikitha Jul 13 '21 at 11:07