[SOLVED] virsh snapshots
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    virsh snapshots

    Hi,
    I'd like to be able to take snapshots of my kvm virtual machines. I'm currently achieving this with lvm but I noticed that there are some options to virsh around snapshoting. However, when I try and take a snapshot I get the following....

    Code:
    # virsh snapshot-create marv
    error: Requested operation is not valid: Disk '/var/lib/libvirt/images/marv.img' does not support snapshotting
    What sort of storgae do I need to use to get this working? I'm running Fedora 14

    Thanks in advance
    Liam

  2. #2
    Join Date
    Mar 2011
    Location
    Fairbanks, AK
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: virsh snapshots

    Hi Liam,
    I've been looking into this for my own projects, and from what I've been reading, only qcow2 format is supported for libvirt snapshots.

    You could convert your current disk image to qcow2 format like this:

    Code:
    # find out what disk format you've got. Mine was "raw"
    [root@localhost ~]# qemu-img info yourdisk.img
    file format: raw
    virtual size: 10G (10737418240 bytes)
    disk size: 10G
    
    # convert to qcow2, assuming you've got a "raw" disk too
    [root@localhost ~]# qemu-img convert -f raw -O qcow2 yourdisk.img newdisk.qcow2
    Then try the 'virsh snapshot-create' again.

    ~Chloe

  3. #3
    Join Date
    Mar 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: virsh snapshots

    Hi Chloe,
    Thanks a million that was perfect. If any one else is interested I also had to update the XML file for the VM to update the disk type from raw to qcow2 and restart libvirtd
    Thanks
    Liam

Similar Threads

  1. Virsh
    By marcmcn in forum Servers & Networking
    Replies: 4
    Last Post: 27th March 2010, 02:22 AM
  2. Using TAR with LVM snapshots for backup
    By SlowJet in forum Guides & Solutions (Not For Questions)
    Replies: 8
    Last Post: 16th March 2008, 12:29 AM
  3. XEN virsh XML Configuration
    By deepc in forum Using Fedora
    Replies: 1
    Last Post: 23rd June 2007, 06:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •