[libvirt-users] libvirt, snapshots, LVM, and existing VMs

Osier Yang jyang at redhat.com
Mon Jan 31 05:51:36 UTC 2011


于 2011年01月30日 06:18, Casey Link 写道:
>> How to create the logical pool, refer to:
>> http://libvirt.org/git/?p=libvirt.git;a=tree;f=tests/storagepoolxml2xmlin;h=92d08b31073ade34bc2112694219030130fc5bd1;hb=HEAD
>>
>> How to create the logical volume with backing store, refer to:
>> http://libvirt.org/git/?p=libvirt.git;a=tree;f=tests/storagevolxml2xmlin;h=ed26441f354c5183499eae14b56e280fe36c1da6;hb=HEAD
>
> Hi Osier,
>
> So, I have managed to setup an LVM backed pool (koth-main), and
> created volumes from this pool:
>
> vol-create-as --pool koth-main --name koth-foo-snap --capacity 2G
> vol-create-as --pool koth-main --name koth-foo --capacity 2G
> --backing-vol koth-foo-snap
>
> I then performed a virt-install, and after configuring the system
> attempted s snapshot, but as you can see it still doesn't work. I get
> the same error as before:
> snapshot-create koth-foo
> error: Requested operation is not valid: Disk '/dev/main/koth-foo'
> does not support snapshotting

Sorry for the late, qemu driver only supports domain snapshotting
when the disks' driver type is "qcow2". e.g.

<disk...>
     ......
     <driver name="qemu" type="qcow2"/>
     ......
</disk>

>
> Did I miss a step?
>
> Best,
>
> Casey
>
> Below is the XML for the main volume:
>
> <volume>
>    <name>koth-foo</name>
>    <key>5er4qK-stqa-zzJn-Npbe-HOeH-aYfs-TULujB</key>
>    <source>
>      <device path='/dev/sda2'>
>        <extent start='417685569536' end='419833053184'/>
>      </device>
>    </source>
>    <capacity>2147483648</capacity>
>    <allocation>2147483648</allocation>
>    <target>
>      <path>/dev/main/koth-foo</path>
>      <permissions>
>        <mode>0600</mode>
>        <owner>0</owner>
>        <group>6</group>
>      </permissions>
>    </target>
>    <backingStore>
>      <path>/dev/main/koth-foo-snap</path>
>      <permissions>
>        <mode>0660</mode>
>        <owner>0</owner>
>        <group>6</group>
>      </permissions>
>    </backingStore>
> </volume>




More information about the libvirt-users mailing list