[CentOS] KVM virt-install on disk image - "no space"

Tsuyoshi Nagata nagata3333333 at jp.fujitsu.com
Thu Apr 21 23:57:40 UTC 2011


Hi Jussi
After installing guest image,
  Convert it from raw to qcow2 by "convert" command.

qemu-img convert -f raw disk0.raw -O qcow2 newdisk0.qcow2

Now you can mount newdisk  to empty VM with virt-manager.
Or you can edit <DOMAIN>.xml as follows..

/var/lib/libvirt/qemu/<DOMAIN>.xml:

<domain type='kvm'>
   <name>vm1</name>
   <memory>524288</memory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686'>hvm</type>
     <boot dev='hd'/>
   </os>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <devices>
     <emulator>/usr/libexec/qemu-kvm</emulator>
     <disk type='file' device='disk'>
       <driver name='qemu' type='qcow2'/>
       <source file='/home/tsuyoshi/test/newdisk0.qcow2'/>
       <target dev='hda' bus='ide'/>
     </disk>
     <serial type='pty'>
       <target port='0'/>
     </serial>
     <console type='pty'>
       <target port='0'/>
     </console>
   </devices>
</domain>

--
Tsuyoshi




More information about the CentOS mailing list