ArchipelProject / Archipel

XMPP Based Orchestrator
http://archipelproject.org
GNU Affero General Public License v3.0
800 stars 126 forks source link

qemu-dm line removed when importing VM #1116

Closed emoon closed 9 years ago

emoon commented 9 years ago

Hi,

When I import a VM (in "Other VMs" for the Hypervisor) That I have created in virt-manager the line:

<devices>
  <emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
  ...
</devices>

Seems to go missing. This causes me to get an error in libxenlight that it can't create a domain.

CyrilPeponnet commented 9 years ago

Are you sure you are using the nightlies ?

emoon commented 9 years ago

Yeah I'm using this:

Feb 25 18:25 latest-archipel-agent.tar.gz

So it's a few days old but fairly recent.

emoon commented 9 years ago

Is there a good way that I can verify which version I'm running just to make sure I have a new one?

CyrilPeponnet commented 9 years ago

Depends on how you install it in the first place.

On Mar 2, 2015, at 1:47 PM, Daniel Collin notifications@github.com wrote:

Is there a good way that I can verify which version I'm running just to make sure I have a new one?

— Reply to this email directly or view it on GitHub.

CyrilPeponnet commented 9 years ago

And which UI do you use ? Nightlies as well ?

On Mar 2, 2015, at 1:46 PM, Daniel Collin notifications@github.com wrote:

Yeah I'm using this:

Feb 25 18:25 latest-archipel-agent.tar.gz So it's a few days old but fairly recent.

— Reply to this email directly or view it on GitHub.

emoon commented 9 years ago

Yeah I followed the steps here: https://github.com/ArchipelProject/Archipel/wiki/Installation-manual (Nightlies section)

I may of course have screwed something up or such so I wonder if I can verify that I'm running the right version somehow.

CyrilPeponnet commented 9 years ago

As far as I can remember it could be another issue (related to xenlight and libvirt).

Can you try to:

For a given running domU in Xen do a virsh dumpxml mydomU > mydomu.xml. Then virsh destroy mydomU and virsh create mydomu.xml.

Check also that the libvirt_uri from archipel.conf match the libvirt_uri used when you use libvirt by hand.

emoon commented 9 years ago

I tried this today:

Create a VM/domain in virt-manager. Start and run that and works as expected with this config:

<domain type='xen' id='29'>
  <name>test-bsd-vm</name>
  <uuid>e066187a-aada-464e-a681-3e77fedfe08e</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>8</vcpu>
  <os>
    <type arch='x86_64' machine='xenfv'>hvm</type>
    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>destroy</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
    <disk type='file' device='disk'>
      <source file='/var/lib/libvirt/images/test-bsd-vm.img'/>
      <backingStore/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <source file='/home/emoon/iso/FreeBSD-10.1-RELEASE-amd64-bootonly.iso'/>
      <backingStore/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='ide' index='0'/>
    <interface type='network'>
      <mac address='00:16:3e:3c:c4:16'/>
      <source network='default'/>
      <model type='e1000'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='5918' autoport='yes' keymap='en-us'/>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
    </video>
  </devices>
</domain>

Now I import into Archipel. Switch CPU count up/down. Hit validate and then XML ends up like this:

<domain type="xen">
  <name>test-bsd-vm</name>
  <uuid>e066187a-aada-464e-a681-3e77fedfe08e</uuid>
  <memory unit="KiB">2097152</memory>
  <currentMemory unit="KiB">2097152</currentMemory>
  <vcpu placement="static">8</vcpu>
  <os>
    <type machine="xenfv" arch="i686">hvm</type>
    <loader type="rom">/usr/lib/xen/boot/hvmloader</loader>
    <boot dev="cdrom"/>
    <bootmenu enable="no"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset="utc"/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>destroy</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <disk device="disk" type="file">
      <source file="/var/lib/libvirt/images/test-bsd-vm.img"/>
      <target bus="ide" dev="hda"/>
      <address bus="0" controller="0" type="drive" target="0" unit="0"/>
    </disk>
    <disk device="cdrom" type="file">
      <source file="/home/emoon/iso/FreeBSD-10.1-RELEASE-amd64-bootonly.iso"/>
      <target bus="ide" dev="hdb"/>
      <readonly/>
      <address bus="0" controller="0" type="drive" target="0" unit="1"/>
    </disk>
    <controller index="0" type="ide"/>
    <interface type="network">
      <mac address="00:16:3e:3c:c4:16"/>
      <source network="default"/>
      <model type="e1000"/>
    </interface>
    <serial type="pty">
      <target port="0"/>
    </serial>
    <console type="pty">
      <target type="serial" port="0"/>
    </console>
    <input bus="ps2" type="mouse"/>
    <input bus="ps2" type="keyboard"/>
    <graphics autoport="yes" keymap="en-us" type="vnc" port="-1"/>
    <video>
      <model type="cirrus" vram="9216" heads="1"/>
    </video>
  </devices>
</domain>
CyrilPeponnet commented 9 years ago

Retry when the next nightly will be build (UI only). http://build.archipelproject.org

emoon commented 9 years ago

Sweet! Thanks.