[et-mgmt-tools] import existing vms into virt-manager

Daniel P. Berrange berrange at redhat.com
Tue Aug 21 19:01:06 UTC 2007


On Tue, Aug 21, 2007 at 02:50:43PM -0400, Bryan Kearney wrote:
> I have been trying to get xen and kvm up and running, and have 
> eventually done so by setting up a bridge and defining the vm through 
> command line. I launch them now with the following commands:
> 
> qemu-kvm
>    -hda /dev/mapper/VolGroup00-virtFactory
>    -boot c
>    -net nic,macaddr=52:64:60:12:34:78,vlan0
>    -net tap,vlan0
>    -m 256
> 
> I would like to start using the virt-* tools directly. Is there a way 
> for me to import this information into virt manager? Both the wizard and 
> virt-install assume I am starting with the bare install.

At this time there's no official easy way to do it.  

If you have pre-installed disk images either, manually write XML config
to go wit hit and use 'virsh define foo.xml'. Or run 'virt-install' pointing
it to your existing disk, and let it boot up into the installer. Then just
use 'virsh destroy' to shutdown the installer. The installer won't have
done any damage to your disks at that point, but virt-install will have 
written out a permanent config file which yuo can now use with 'virsh start'.

I plan to add a '--import' flag to virt-install to make this a little more
pleasant where it'd just check your disk image for a valid boot sector and
if so write out the config & skip the booting of installer altogether.

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




More information about the et-mgmt-tools mailing list