[CentOS-virt] Loading a FreeBSD 10 VM on QEMU-KVM..

Tue Jan 21 17:54:51 UTC 2014
Stuart Barkley <stuartb at 4gh.net>

On Tue, 21 Jan 2014 at 05:22 -0000, Howard Leadmon wrote:

> The FreeBSD release I am trying to load on a guest VM is the
> production release of FreeBSD 10, the ISO grabbed from the master
> site is FreeBSD-10.0-RELEASE-amd64-disc1.iso, and the virt-install
> command I am using is:
> virt-install --connect qemu:///system -n FBSD-10_vm1 -r 2048 --vcpus=1
> --disk path=/dev/vg_virtual/FBSD-10_vm1 -c
> /images/FreeBSD-10.0-RELEASE-amd64-disc1.iso --graphics
> vnc,port=5920,listen= --noautoconsole --os-variant freebsd8
> --accelerate --network=bridge:br0 --network=bridge:br1
> I am specifying the freebsd8 flag, as I see no sign of a newer
> os-variant I can use, so that was the closest to what I was trying
> to run.  As stated before, if I try and boot FBSD 8 or 9, it works
> just fine, it's just when I try and launch 10 that I have this
> issue.

Just a FYI.  I'm successfully running FreeBSD 10.0-RC5 in a kvm VM
(under Ubuntu, so probably a different version of KVM).  Going to
upgrade to -RELEASE today (downloading image now).

I don't know what the freebsd8 variant flag does in virt-install, but
I don't bother with it.  I just create the KVM definition as a clone
of a previous one using 'virsh define' with an .xml file.

The following is an xml dump of my port building VM with the VM

    % virsh dumpxml kate
    <domain type='kvm'>
        <type arch='x86_64' machine='pc-1.0'>hvm</type>
        <boot dev='hd'/>
        <boot dev='cdrom'/>
        <bootmenu enable='yes'/>
      <clock offset='utc'/>
        <disk type='file' device='disk'>
          <driver name='qemu' type='raw' cache='writethrough'/>
          <source file='/data/vm-images/kate-root.img'/>
          <target dev='vda' bus='virtio'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
        <disk type='file' device='disk'>
          <driver name='qemu' type='raw' cache='writeback'/>
          <source file='/data/vm-images/kate-home.img'/>
          <target dev='vdb' bus='virtio'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
        <disk type='file' device='disk'>
          <driver name='qemu' type='raw' cache='writeback'/>
          <source file='/data/vm-images/kate-prev.img'/>
          <target dev='vdc' bus='virtio'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
        <disk type='file' device='cdrom'>
          <driver name='qemu' type='raw'/>
          <source file='/data/iso-images/freebsd/FreeBSD-10.0-RC5-amd64-disc1.iso'/>
          <target dev='hdc' bus='ide'/>
          <address type='drive' controller='0' bus='1' unit='0'/>
        <controller type='ide' index='0'>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
        <interface type='bridge'>
          <mac address='52:54:00:37:eb:b1'/>
          <source bridge='br0'/>
          <model type='virtio'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
        <serial type='pty'>
          <target port='0'/>
        <console type='pty'>
          <target type='serial' port='0'/>
        <input type='mouse' bus='ps2'/>
        <graphics type='vnc' port='-1' autoport='yes'/>
          <model type='cirrus' vram='9216' heads='1'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
        <memballoon model='virtio'>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>

When making a clone I just remove the '<uuid', '<mac' lines which will
get added back with different values.

I've never been lost; I was once bewildered for three days, but never lost!
                                        --  Daniel Boone