Trouble mounting filesystem on KVM guest after reboot

By Russell Ballestrini

Just found this out the hard way…

It looks like the attachment of /KVMROOT/guest-dev-app.img on guest-dev did not persist when the KVM host rebooted for patching.

As it appears the virsh attach-disk command works a lot like the mount command.

In order to have a disk attachment persist after a reboot, I think we still need to do a virsh edit <dom>.

the virsh attach-disk command is useful because it allows us to attach disk images to guests without restarting.

tldr;

virsh attach-disk is to mount as virsh edit is to vim /etc/fstab

About Russell Ballestrini

Russell admires tidy readable code and beautiful design patterns. He enjoys finding simple solutions to difficult problems and reveres the python language. Russell holds a position as a Linux system admin and operates a website screenshot service.

Share your thoughts