From Fedora Project Wiki


How to test

  1. Make sure the selinux is enforcing by checking
    # getenforce
  2. Start a VM
    # virsh start demo
  3. In guest, issue some command, such as: ls, or ifconfig
  4. Save the running vm, and check the context of the save file
    # virsh save demo[name,ID,UUID] /tmp/
  5. Restore the vm
    # virsh restore /tmp/

Expected Results

  1. Step#1: Enforcing
  2. Step#2: VM is started successfully
  3. Step#3: the commands run as expected and remember the outputs for step#5
  4. Step#4: Save should be finished successfully, Domain demo saved to /tmp/
    # ll -Z /tmp/
    -rw-------. root root system_u:object_r:svirt_image_t:s0:c475,c520 /tmp/
  5. Step#5: vm is restored successfully, and the output of the step3 still is seen.