KVM

Solved: internal error boot orders have to be contiguous and starting from 1

I exported a VM from RHEV 3.0 to an export domain. Then I imported the VM into RHEV 3.1.

I was surprised that the VM would not start. Instead, I got this message:

Exit message: internal error boot orders have to be contiguous and starting from 1

Upon further inspection, the boot order information was completely missing from the imported KVM definition:

    <disk device="disk" snapshot="no" type="block">
      <source dev="/rhev/data-center/a1f867a3-237a-4be3-8e07-bf61f5b95280/71051d89-b9bd-4db5-8fe1-7c4499114874/images/d543a66c-4dd6-4d49-a8ea-7d65c137ce41/39bbb768-13d0-4bb8-ae93-a2c8611da655"/>
      <target bus="virtio" dev="vda"/>
      <serial>d543a66c-4ef6-4d49-a8ea-7d65c137ce41</serial>
      <driver cache="none" error_policy="stop" io="native" name="qemu" type="raw"/>
    </disk>

I solved this by just editing the imported VM's disk in the RHEV UI. I changed the disk's properties from bootable to nonbootable and saved the change. Then I changed it back to bootable again. This wrote in the boot order:

    <disk device="disk" snapshot="no" type="block">
      <source dev="/rhev/data-center/a1f867a3-237a-4be3-8e07-bf61f5b95280/71051d89-b9bd-4db5-8fe1-7c4499114874/images/d543a66c-4dd6-4d49-a8ea-7d65c137ce41/39bbb768-13d0-4bb8-ae93-a2c8611da655"/>
      <target bus="virtio" dev="vda"/>
      <serial>d543a66c-4ef6-4d49-a8ea-7d65c137ce41</serial>
      <boot order="1"/>
      <driver cache="none" error_policy="stop" io="native" name="qemu" type="raw"/>
    </disk>

I think this happened because the VM had a CD mounted in the RHEV 3.0 data center that was unavailable in the RHEV 3.1 data center.

See also: https://bugzilla.redhat.com/show_bug.cgi?id=874952

Topic: 

Solution to VM missing from Virtual Machine Manager

I restarted a standalone KVM host running RHEL6 and when I opened Virtual Machine Manager, my guest virtual machine wasn't listed at all.

Eek!

Turns out I had been messing around with the XML definition in /etc/libvirt/qemu/machinename.xml (I know, I know...consider my hand slapped) and broke it. Fortunately /var/log/libvirt/libvirtd.log was kind enough to let me know what went wrong:

error : catchXMLError:653 : at line 33: Opening and ending tag mismatch: source line 32 and disk

I freaked out again after I asked virsh to list my virtual machines and the domain was not listed -- it was an empty list:

# virsh list
Id Name                 State
----------------------------------

Turns out it's just inactive, since it couldn't start up, since I broke the configuration file.

# virsh list --inactive
Id Name                 State
----------------------------------
  - machinename.example.com shut off

I repaired the XML configuration and made sure the the VM was set to autostart on reboot:

# virsh autostart machinename.example.com
Domain machinename.example.com marked as autostarted

Adrenaline level dropping fast.

Topic: 
Subscribe to RSS - KVM