[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt-users] How to create a guest os from existing disk image file with virt-install

I have configured KVM with Fedora Core 13 by enabling the KVM virtualization option while installing OS.
I have successfully created the guest OS by using the virt-install API

/usr/sbin/virt-install --name centos5 --ram 512 --disk path=/var/lib/libvirt/images/
centos.img,size=5 --network network:default --accelerate --vnc -c /tmp/CentOS-5.3-i386-bin-DVD.iso

Os installed successfully and after rebooting am able to login to the guest OS using the virt-viewer command using vnc viewer ..It shows

Booting from Hard Disk...
GRUB Loading stage2.....

But the guest os is not booted

I want to the create the guest os from existing configured disk /var/lib/libvirt/images/centos.img.. What modifications should be done with my configuration file ??
Pleas help me to solve this.

[root kvmcluster ~]# virsh dumpxml centos5
<domain type='qemu' id='2'>
    <type arch='i686' machine='fedora-13'>hvm</type>
    <boot dev='cdrom'/>
  <clock offset='utc'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/centos.img'/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    <disk type='file' device='cdrom'>
      <driver name='qemu'/>
      <source file='/tmp/CentOS-5.3-i386-bin-DVD.iso'/>
      <target dev='hdc' bus='ide'/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' unit='0'/>
    <controller type='ide' index='0'>
      <alias name='ide0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    <interface type='network'>
      <mac address='52:54:00:bf:32:c2'/>
      <source network='default'/>
      <target dev='vnet0'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    <serial type='pty'>
      <source path='/dev/pts/2'/>
      <target port='0'/>
      <alias name='serial0'/>
    <console type='pty' tty='/dev/pts/2'>
      <source path='/dev/pts/2'/>
      <target port='0'/>
      <alias name='serial0'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/>
      <model type='cirrus' vram='9216' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
  <seclabel type='dynamic' model='selinux'>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]