kvm2 - generic FreeBSD test machine
guest os: FreeBSD/amd64
cpu: 1
memory size: 512 MB
storage: file - 10 GB
IP address: 192.68.122.19
back to virtual machines page.
Links
Speeding up builds on FreeBSD,
Bugs
bugs: 213155,
History / work log
2017-10-10: kvm2 - ssh to guest
tingo@kg-vm4:~$ ssh tingo@192.168.122.19 Password for tingo@kvm2.local: Last login: Tue Oct 10 22:22:10 2017 from 192.168.122.1 FreeBSD 10.4-RELEASE (GENERIC) #0 r324094: Fri Sep 29 01:45:44 UTC 2017 Welcome to FreeBSD! Release Notes, Errata: https://www.FreeBSD.org/releases/ Security Advisories: https://www.FreeBSD.org/security/ FreeBSD Handbook: https://www.FreeBSD.org/handbook/ FreeBSD FAQ: https://www.FreeBSD.org/faq/ Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ FreeBSD Forums: https://forums.FreeBSD.org/ Documents installed with the system are in the /usr/local/share/doc/freebsd/ directory, or can be installed later with: pkg install en-freebsd-doc For other languages, replace "en" with a language code like de or fr. Show the version of FreeBSD installed: freebsd-version ; uname -a Please include that output and any error messages when posting questions. Introduction to manual pages: man man FreeBSD directory layout: man hier Edit /etc/motd to change this login announcement. To see the 10 largest files on a directory or partition, use du /partition_or_directory_name | sort -rn | head -- Dru <genesis@istar.ca> $
ok. 2017-10-10: vm4 - install the machine (finally)
tingo@kg-vm4:~$ virt-install --connect qemu:///system --name kvm2 --memory 512 --cpu Opteron_G3 --vcpus 1 --cdrom ~/dl/bsd/fbsd/10.4/FreeBSD-10.4-RELEASE-amd64-disc1.iso --os-variant=freebsd10.3 --disk size=10 --virt-type=kvm --network=default --console pty,target_type=virtio WARNING Graphics requested but DISPLAY is not set. Not running virt-viewer. WARNING No console to launch for the guest, defaulting to --wait -1 Starting install... Allocating 'kvm2.qcow2' | 10 GB 00:00:00 Creating domain... | 0 B 00:00:00 Domain installation still in progress. Waiting for installation to complete. Domain has shutdown. Continuing. Domain creation completed. Restarting guest.
ok
2017-10-10: vm4 - dumpxml
tingo@kg-vm4:~$ virsh --connect qemu:///system dumpxml kvm2 <domain type='kvm' id='38'> <name>kvm2</name> <uuid>23b3ec12-aba7-4e23-90ed-0e6732295d5d</uuid> <memory unit='KiB'>524288</memory> <currentMemory unit='KiB'>524288</currentMemory> <vcpu placement='static'>1</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-2.8'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <vmport state='off'/> </features> <cpu mode='custom' match='exact'> <model fallback='forbid'>Opteron_G3</model> </cpu> <clock offset='utc'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='no'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <pm> <suspend-to-mem enabled='no'/> <suspend-to-disk enabled='no'/> </pm> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/kvm2.qcow2'/> <backingStore/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <backingStore/> <target dev='hda' bus='ide'/> <readonly/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <alias name='usb'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <alias name='usb'/> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <alias name='usb'/> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <alias name='usb'/> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'> <alias name='pci.0'/> </controller> <controller type='ide' index='0'> <alias name='ide'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='virtio-serial' index='0'> <alias name='virtio-serial0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </controller> <interface type='network'> <mac address='52:54:00:fd:ed:85'/> <source network='default' bridge='virbr0'/> <target dev='vnet0'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <console type='pty' tty='/dev/pts/3'> <source path='/dev/pts/3'/> <target type='virtio' port='0'/> <alias name='console0'/> </console> <channel type='spicevmc'> <target type='virtio' name='com.redhat.spice.0' state='disconnected'/> <alias name='channel0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> <input type='mouse' bus='ps2'> <alias name='input0'/> </input> <input type='keyboard' bus='ps2'> <alias name='input1'/> </input> <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> <image compression='off'/> </graphics> <sound model='ich6'> <alias name='sound0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </sound> <video> <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <redirdev bus='usb' type='spicevmc'> <alias name='redir0'/> <address type='usb' bus='0' port='1'/> </redirdev> <redirdev bus='usb' type='spicevmc'> <alias name='redir1'/> <address type='usb' bus='0' port='2'/> </redirdev> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </memballoon> </devices> <seclabel type='none' model='none'/> <seclabel type='dynamic' model='dac' relabel='yes'> <label>+64055:+64055</label> <imagelabel>+64055:+64055</imagelabel> </seclabel> </domain>
ok 2017-10-10: vm4 - supported cpu models for x86_64 arch:
tingo@kg-vm4:~$ virsh --connect qemu:///system cpu-models x86_64 486 pentium pentium2 pentium3 pentiumpro coreduo n270 core2duo qemu32 kvm32 cpu64-rhel5 cpu64-rhel6 kvm64 qemu64 Conroe Penryn Nehalem Westmere SandyBridge IvyBridge Haswell-noTSX Haswell Broadwell-noTSX Broadwell Skylake-Client athlon phenom Opteron_G1 Opteron_G2 Opteron_G3 Opteron_G4 Opteron_G5 ok.
2017-10-10: vm4 - with --cpu Opteron_G5 or Opteron_G4 FreeBSD 10.4 hangs, with Opteron_G3 it boots.
2017-10-10: vm4 - ok, setting --cpu kvm64 seems to help
tingo@kg-vm4:~$ virt-install --connect qemu:///system --name kvm2 --memory 512 --cpu kvm64 --vcpus 1 --cdrom ~/dl/bsd/fbsd/10.4/FreeBSD-10.4-RELEASE-amd64-disc1.iso --os-variant=freebsd10.3 --disk size=10 --virt-type=kvm --network=default --console pty,target_type=virtio WARNING Graphics requested but DISPLAY is not set. Not running virt-viewer. WARNING No console to launch for the guest, defaulting to --wait -1 Starting install... Allocating 'kvm2-2.qcow2' | 10 GB 00:00:00 Creating domain... | 0 B 00:00:00 Domain installation still in progress. Waiting for installation to complete.
and now I can use the install in virt-viewer.
2017-10-10: kvm2 - setting hw.use_xsave=0
in the boot loader doesn't help, the kernel still hangs.
2017-10-10: this seems to be a bug, se FreeBSD bug 213155,
2017-10-10: vm4 - let me create another test kvm machine, and install 10.4 on it.
tingo@kg-vm4:~$ virt-install --connect qemu:///system --name kvm2 --memory 512 --cpu host --vcpus 1 --cdrom ~/dl/bsd/fbsd/10.4/FreeBSD-10.4-RELEASE-amd64-disc1.iso --os-variant=freebsd10.4 --disk size=10 --virt-type=kvm --network=default --console pty,target_type=virtio ERROR Error validating install location: Distro 'freebsd10.4' does not exist in our dictionary
ok, fix that
tingo@kg-vm4:~$ virt-install --connect qemu:///system --name kvm2 --memory 512 --cpu host --vcpus 1 --cdrom ~/dl/bsd/fbsd/10.4/FreeBSD-10.4-RELEASE-amd64-disc1.iso --os-variant=freebsd10.3 --disk size=10 --virt-type=kvm --network=default --console pty,target_type=virtio WARNING Graphics requested but DISPLAY is not set. Not running virt-viewer. WARNING No console to launch for the guest, defaulting to --wait -1 Starting install... Allocating 'kvm2.qcow2' | 10 GB 00:00:00 Creating domain... | 0 B 00:00:00 Domain installation still in progress. Waiting for installation to complete.
and run virt-viewer from a "ssh -Y" shell
tingo@kg-vm4:~$ virt-viewer --wait --connect qemu:///system kvm2
then install and finish. Unfortunately, it hangs at boot again.