Author Topic: [SOLVED] Install from KVM image is not working  (Read 3015 times)

Josir

  • Zen Monk
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
[SOLVED] Install from KVM image is not working
« on: January 21, 2011, 09:48:11 pm »
Hi folks,

I am trying to run the kvm image but the vm is not recognizing the disk.

Here is my disk config:

    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' />
      <source file='/srv/Linux13.qcow2'/>
      <target dev='hda' bus='ide'/>
    </disk>

Does somebody have a virsh xml definition for the kvm image supplied by Zentyal ?

Thanks in advance,
Josir Gomes
« Last Edit: January 22, 2011, 09:37:31 pm by Josir »

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: Install from KVM image is not working
« Reply #1 on: January 22, 2011, 04:50:47 am »
The following works for me:

Code: [Select]
<domain type='kvm'>
  <name>zentyal</name>
  <uuid>71f72b0f-caa4-3d2d-8467-3c2bac25a98f</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='i686' machine='pc-0.12'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/srv/images/Zentyal.qcow2'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <interface type='network'>
      <mac address='52:54:00:5c:e8:e9'/>
      <source network='default'/>
      <model type='virtio'/>
    </interface>
    <console type='pty'>
      <target port='0'/>
    </console>
    <console type='pty'>
      <target port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes'/>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
    </video>
  </devices>
</domain>

The disk config seems the same, so I don't know why that doesn't work for you :(
Zentyal Server Lead Developer

Josir

  • Zen Monk
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: Install from KVM image is not working
« Reply #2 on: January 22, 2011, 09:36:58 pm »
Thanks a lot J.A.

Your configuration is perfect.

My mistake was on boot device config. that was <boot dev='cdrom'>
That's why vm was not booting....

  <os>
    <type arch='x86_64' machine='pc-0.11'>hvm</type>
    <boot dev='hd'/>
  </os>

The mistake was silly but without your config file, it will be much more difficult to find it.
Thanks again.
Josir