Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: Josir on January 21, 2011, 09:48:11 pm

Title: [SOLVED] Install from KVM image is not working
Post by: Josir 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
Title: Re: Install from KVM image is not working
Post by: J. A. Calvo 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 :(
Title: Re: Install from KVM image is not working
Post by: Josir 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