[virt-tools-list] Usage of virt-clone
Bla Blubb
blablubb85 at googlemail.com
Fri Jul 16 06:19:04 UTC 2010
Hi Cole,
thanks for your answer! This looks very nice and sounds logic but doesn't
work. :(
I have updated my libvirt to version 0.8.1 on both sides.
Then I have done the following on the SERVER:
virsh pool-define-as blubb --type dir --target /image
virsh pool-start blubb
virsh pool-autostart blubb
And it looks like:
virsh pool-list --all
Name State Autostart
-----------------------------------------
blubb active yes
Then I dow the following on the SLAVE:
virt-clone --connect xen+tcp://server/ --original blubb --name kopievonblubb
--file /image/kopievonblubb.img
ERROR [Errno 2] Datei oder Verzeichnis nicht gefunden: '/image/blubb.img'
I think he does not find the Pool. I have read with virt-install i can say
"--disk vol=blubb" but virt-clone expect "--file". I have look around the
web find nothing helpfull like a Howto to clone images on a remote host. :(
I tell you all I do, maybe there is a mistake...
On the SERVER is a mountet folder called "/images". I defined it as a pool,
described above.
On the SLAVE I have an xml file for a guest looks like:
<domain type='xen'>
<name>blubb</name>
<memory>262144</memory>
<vcpu>1</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<features>
<acpi/>
<apic/>
</features>
<os>
<type>hvm</type>
<loader>/usr/lib/xen-3.2-1/boot/hvmloader</loader>
<boot dev='cdrom'/>
</os>
<devices>
<emulator>/usr/lib/xen-3.2-1/bin/qemu-dm</emulator>
<interface type='bridge'>
<source bridge='tmpbridge'/>
<mac address='00:16:3e:00:00:01'/>
<script path='vif-bridge'/>
</interface>
<disk type='file' device='disk'>
<driver name='file'/>
<source disk='/image/blubb.img'/>
<target dev='hda'/>
</disk>
<disk type='file' device='cdrom'>
<source file='/image/blubb.iso'/>
<target dev='hdc'/>
<readonly/>
</disk>
<graphics type='vnc' autoport='yes'/>
<input type='tablet' bus='usb'/>
</devices>
</domain>
On the SLAVE I define this VM like:
virsh --connect xen+tcp://server/ define blubb.xml
And then I want to clone this VM like decribed above.
Hope somebody can help :)
Regards , Jessica
2010/7/15 Cole Robinson <crobinso at redhat.com>
> On 07/15/2010 06:14 AM, Bla Blubb wrote:
> > Hi,
> >
> > I want to use libvirt to manage my Xen-Server and have some questions.
> >
> > I have one SERVER with libvirt-bin 0.4.6.1 (from the Debian Lenny
> > Repository), Xen 3.1. All the images of Xen determine in /image.
> >
> > Then I have an SLAVE with libvirt-bin 0.4.6.1 (from the Debian Lenny
> > Repository).
> >
> >>From this SLAVE I want to start / stop and clone my virtual machines on
> > SERVER. I figured out to place the configuration files on the SLAVE to
> start
> > / stop the virtual machines on the SERVER.
> >
> > Now I want to clone a defined VM:
> > virt-clone --connect xen+tcp://server/ --original blubb --name
> kopievonblubb
> > --file /image/kopievonblubb.img
> > ERROR [Errno 2] Datei oder Verzeichnis nicht gefunden:
> '/image/blubb.img'
> >
> > I want to clone the VM on the SERVER and place the clones Image on the
> > SERVER in the /image folder.
> > Does this cloning not working on remote hosts? Or have I a mistake or is
> the
> > version of libvirt to old?
> >
>
> The version of libvirt on the both hosts is too old. You need at least
> libvirt 0.6.4, and virtinst 0.500.0 or later IIRC. Then you need to make
> sure that your storage is part of a libvirt storage pool (basically make
> /image on the server a libvirt directory pool: virsh pool-define-as
> --type dir --target /images)
>
> - Cole
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20100716/0d492daf/attachment.htm>
More information about the virt-tools-list
mailing list