1 Objectives

Perform some Ganeti administration tasks.

In this exercise, you will not be given all the commands you need. Use the presentation materials, the ganeti online documentation - especially the administrator's guide - and the command man gnt-instance

2 Memory allocation

  1. Find the current values of the backend settings "minmem" and "maxmem" on the instance you have created. What are they? (Hint: gnt-instance info)

  2. Make sure the instance is running, and then see how much memory it is actually using. (Hint: gnt-instance list)

  3. Increase the maxmem setting on just this one instance to 1200MB. Can you change this while the instance is running?

  4. When the instance is restarted, how much memory has ganeti allocated to it - the minimum or the maximum?

  5. Login to the instance, and use the command free to confirm that the amount of memory the VM sees is what you expect.

  6. While the instance is running, use ganeti to change the runtime memory to 768MB.

How can you confirm that this setting has taken effect:

  1. Change the cluster-wide defaults so that all instances which don't explicitly set these values have a minmem of 256M and maxmem of 768M

3 Disk

Add a second disk, size 2GB, to your existing instance.

Login to the instance. Inside the instance, how does it appear? (For example /dev/sdb or /dev/vdb?) Did you have to restart for it to become available?

Inside the instance, format the filesystem (mkfs -t ext4 /dev/xxx) and mount it on /opt.

4 Network

Add a second network card to the instance. Connect it to the br-lan instance and configure it so that it picks up an IP address using dhcp.

5 Advanced exercises

  1. Shutdown your instance, and attach the instance disk directly to the host. (See Accessing an instance's disks in the administrator's guide)

Create or edit a file in the instance. Then de-activate the disk, restart the instance, login and check that you can see the changed files.