<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">Thank you!<br>But snapshot-create-as will traverse all disks of the virtual machine and create snapshots for all of them. In my case, I want to create snapshot for root disk.<br>What's more. I understand "--diskspec" is a description of the disk. Do you mean it's used to specify a single disk to snapshot.<br><br><br><br><br><br><div></div><div id="divNeteaseMailCard"></div>ÔÚ 2013-06-26 09:10:31£¬"Gao Yongwei" <itxx00@gmail.com> Ð´µÀ£º<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div dir="ltr">try snapshot-create-as like below:<div style="">virsh snapshot-create-as vm --disk-only --diskspec "vda,snapshot=external"</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/6/25 cmcc.dylan <span dir="ltr"><<a href="mailto:dx10years@126.com" target="_blank">dx10years@126.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height:1.7;font-size:14px;font-family:arial"><br>Hi, everyone,<br>   I have found the API snapshotCreateXML() can create a snapshot for a virtual machine, and the xml configuration file - snapshot.xml as folllows:<br>

<domainsnapshot><br>  <name>snapshot01</name><br>  <description>Snapshot of OS install and updates</description><br>  <disks><br>     <disk name='vda' snapshot='external'><br>

     <source file='/data10/snapshot'/><br>     </disk><br>     </disks><br></domainsnapshot><br><br>How can I use the API or could I use "snapshot-create" ?<br>I try "virsh snapshot-create domain_name snapshot.xml", but I report an error: <span style="color:rgb(255,0,0)">error: unsupported configuration: disk 'vda' must use snapshot mode 'internal'</span>.<br>

What's the probem? I feel crazy now.<br>Could someone give me a sucessfule example?<div><div class="h5"><br><br><br><br><div></div><div></div><br>At 2013-06-25 16:46:32,"cmcc.dylan" <<a href="mailto:dx10years@126.com" target="_blank">dx10years@126.com</a>> wrote:<br>

 <blockquote style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid"><div style="line-height:1.7;font-size:14px;font-family:arial">Thanks for you reply!<br>    Firstly, I'm very sorry I forgot introduce the scenarios in my experiments. Supposing a case, I have a virtual machine with two disks. One is mounted as a root partition and the other is data partition and the second disk is an iscsi lun, that is to say, not a local disk or image. Now the result wanted is that creating a snapshot for the root disk but not for the data disk when executing "virsh snapshot-create-as" command. Actually, it meet an error:<br>

      error:unsuported configuration: source for disk 'vdc' is not a regular file; refusing to generate external snapshot name.<br>    The xml configuration of this virtual machine as follows:<br>         <disk type='block' device='disk'><br>

              <driver name='qemu' type='raw' /><br>             <source dev='/dev/sdm1' >                 // sdm1 is a remote scsi lun and mounted at the local host<br>              <target dev='vdc' bus='virtio' /><br>

         </disk><br>     Given above problem, I want to only create the snapshot of local disk.<br><br><br><div></div><div></div><br>ÔÚ 2013-06-24 23:22:47£¬"vonNieda, Adam (USMS)" <<a href="mailto:Adam.vonNieda@usdoj.gov" target="_blank">Adam.vonNieda@usdoj.gov</a>> Ð´µÀ£º<br>

 <blockquote style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid">






<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">   I think what you¡¯re looking for is LVM snapshots. The whole purpose of taking VM snapshots is to have a consistent image of the machine as a whole. There¡¯s
 lots of articles out there on LVM snapshots, here¡¯s one. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">   <a href="http://www.tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html" target="_blank">http://www.tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html</a><u></u><u></u></span></p>


<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:libvirt-users-bounces@redhat.com" target="_blank">libvirt-users-bounces@redhat.com</a> [mailto:<a href="mailto:libvirt-users-bounces@redhat.com" target="_blank">libvirt-users-bounces@redhat.com</a>]
<b>On Behalf Of </b>cmcc.dylan<br>
<b>Sent:</b> Saturday, June 22, 2013 11:13 AM<br>
<b>To:</b> <a href="mailto:libvirt-users@redhat.com" target="_blank">libvirt-users@redhat.com</a><br>
<b>Subject:</b> [libvirt-users] snapshot-create-as for a single disk not all disks<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial","sans-serif"">Hi everyone!<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial","sans-serif"">   Is there any way to create snaphot for a single disk of a virtual machine. As I konw, "virsh snapshot-create-as domain_name  snapshot_name --disk-only" traverses
 all block devices to create snapshot. However I don't want to create snapshot except for root partition.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial","sans-serif"">  The version of qemu and libvirt I used is as follows:<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial","sans-serif"">                qemu-1.4.2 and libvrit-0.10.2<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial","sans-serif"">  I meet an error when I delete the snapshot which is created by "snapshot-create-as" command. whether or not qemu(1.4.2) and libvirt(0.10.2) don't support the
 function currently.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial","sans-serif"">   Look forward to your help!<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
</div>


</blockquote></div><br><br><span title="neteasefooter"><span></span></span></blockquote></div></div></div><br><br><span title="neteasefooter"><span></span></span><br>_______________________________________________<br>
libvirt-users mailing list<br>
<a href="mailto:libvirt-users@redhat.com">libvirt-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/libvirt-users" target="_blank">https://www.redhat.com/mailman/listinfo/libvirt-users</a><br></blockquote></div><br></div>
</blockquote></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>