1.4. Changing files

Changing files in your running VM

In the previous chapter, we gained access to the VM’s console. In this chapter, we will use this access to make a change to our running VM and observe what happens if we restart the VM.

Task 1.4.1: Create a file

Connect to your VM’s web console.

Login with the specified credentials and create a file:

touch myfile

Verify that the file really is present. Check it with:

stat myfile

Task 1.4.2: Restart VM

Exit the console and restart your VM.

Task 1.4.3: Persistency check

Ask yourself:

  • After restarting, is the created file still present?
  • And why do you think so?

Try to find out!

Task hint

Connect to your VM’s web console once again.

Check the file status with:

stat myfile

The output fill be:

stat: can't stat 'myfile': No such file or directory

This means that the file is gone. But why?

Do you remember that the VM manifest contains a container disk as volume? A container disk is always ephemeral and is therefore an easy way to provide a disk which does not have to be persistent.

End of lab