[et-mgmt-tools] Importing kvm vm
Daniel P. Berrange
berrange at redhat.com
Wed May 27 20:18:41 UTC 2009
On Wed, May 27, 2009 at 03:44:18PM -0400, David H. Vree wrote:
> I am have a few kvm virtual machines that I have been running natively
> with kvm using commands like the following:
>
> kvm -hda mywinxp.qcow2 -m 2G -smp 2 -k en-us -name "My WinXP" -vga std
> -net nic -net user -soundhw all -cpu qemu64
>
> It doesn't appear that I can put this under libvirt control via
> virt-manager. Do I need to use virt-install from the command line or
> can I just hand write the XML and put it in /etc/libvirt/qemu?
Try this for a starting point
<domain type='kvm'>
<name>My WinXP</name>
<memory>2048000</memory>
<currentMemory>2048000</currentMemory>
<vcpu>2</vcpu>
<os>
<type arch='i686'>hvm</type>
</os>
<features>
<acpi/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<source file='/some/path/to/mywinxp.qcow2'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='user'>
<mac address='00:00:00:00:00:00'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='sdl'/>
</devices>
</domain>
Fill in a random mac address there & fix the disk path.... You'll
probably want type=vnc for the graphics instead of sdl
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the et-mgmt-tools
mailing list