[virt-tools-list] How do I use virt-clone anyway? Errors messages

Cole Robinson crobinso at redhat.com
Mon Aug 3 13:04:21 UTC 2009


On 08/02/2009 11:29 PM, Andreas Davour wrote:
> (please cc, I'm not on the list, yet)
> 
> I've installed a vm using virt-install, and when I try to clone it I 
> encounter an error. I have no idea what this means. Help?
> 
> root at zareason:~/Virtualise# dd if=/dev/zero of=./HD/ubuntu-srv2.img bs=8 
> count=268435456
> 268435456+0 records in
> 268435456+0 records out
> 2147483648 bytes (2.1 GB) copied, 626.566 s, 3.4 MB/s

This step isn't required, it is one of the things virt-clone should take
care of for you.

> root at zareason:~/Virtualise# virt-clone --debug -o "ubuntu-srv1" -n 
> "ubuntu-srv2" --connect=qemu:///system  -f HD/ubuntu-srv2.img
> Sun, 02 Aug 2009 00:51:42 DEBUG    start clone with HV qemu:///system
> Sun, 02 Aug 2009 00:51:42 DEBUG    Using libvirt URI connect 
> 'qemu:///system'
> Sun, 02 Aug 2009 00:51:42 DEBUG    Detected storage as type 'file'
> This will overwrite the existing path 
> '/home/ante/Virtualise/HD/ubuntu-srv2.img'!
> Do you really want to use this disk (yes or no)? yes
>   Disk /home/ante/Virtualise/HD/ubuntu-srv2.img is already in use by 
> another guest!
> Do you really want to use the disk (yes or no)?  yes
> Sun, 02 Aug 2009 00:52:18 DEBUG    Detected storage as type 'file'
> Sun, 02 Aug 2009 00:52:18 DEBUG    Validating original guest parameters
> Sun, 02 Aug 2009 00:52:18 DEBUG    Original paths: 
> ['/home/ante/Virtualise/HD/ubuntu-srv1.img']
> Sun, 02 Aug 2009 00:52:18 DEBUG    Original sizes: [2147483648]
> Sun, 02 Aug 2009 00:52:18 DEBUG    Original types: [True]
> Sun, 02 Aug 2009 00:52:18 DEBUG    Original idxs: [1]
> Sun, 02 Aug 2009 00:52:18 DEBUG    original guest status: 5
> Sun, 02 Aug 2009 00:52:18 ERROR    Domain ubuntu-srv2 already exists
> Sun, 02 Aug 2009 00:52:18 DEBUG    Traceback (most recent call last):
>    File "/usr/bin/virt-clone", line 215, in main
>      design.setup()
>    File "/usr/lib/python2.6/dist-packages/virtinst/CloneManager.py", line 
> 341, in setup
>      self.setup_original()
>    File "/usr/lib/python2.6/dist-packages/virtinst/CloneManager.py", line 
> 236, in setup_original
>      raise RuntimeError, _("Domain %s already exists") % self._clone_name
> RuntimeError: Domain ubuntu-srv2 already exists
> 
> root at zareason:~/Virtualise#
> 
> Why is the newly dd created file "in use" by another guest? Where are 
> the traces of this "Domain ubuntu-srv2 already exists" ghost?! I'm 
> trying to create it, so how can it already exist?
> 
> Thankful for any help, RTFM pointers or walkthroughs.
> 

Not sure why you are seeing that, what is the output of 'virsh --connect
qemu:///system list --all'. What virtinst version are you using? If it's
prior to 0.400.3, I'd recommend an upgrade, since virt-clone was pretty
rough around the edges prior to that release.

- Cole




More information about the virt-tools-list mailing list