Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
title1. Install KVM and reboot the hosted DilOS
root@dilos:~# apt update && apt install driver-kvm && reboot
Code Block
languagebash
title2. Download QEMU software distribution
root@dilos:~# wget https://apt2.dilos.org/dilos/isos/kvm/smartdc.tar.gz
Code Block
languagebash
title3. Extract downloaded tar archive in to the root directory
root@dilos:~# tar xfv smartdc.tar.gz -C /
4. Select and copy bios image for the nested VM
Code Block
languagebash
title
root@dilos:~# cp /smartdc/share/qemu/bios.bin /smartdc/share/qemu/extboot.bin

Note: During tests, -bios option of QEMU was not working correctly. QEMU is always looking for bios in /smartdc/share/qemu/extboot.bin by default.


Code Block
languagebash
title4. Create dataset on hosted DilOS for netsted OS
root@dilos:~# zfs create -V 16Gb rpool/kvm0

...

Code Block
languagebash
title6. Run virtual machine and start installation from boot CD with DilOS image
root@dilos:~# /smartdcusr/bin/qemu-system-x86_64 -enable-kvm -smp 2 -m 2048 \
        -drive file=/dev/zvol/rdsk/rpool/kvm1,if=virtio,index=0,media=disk,boot=on,id=disk0  \
        -bios /smartdc/share/qemu/extboot.bin \
        -vnc 0.0.0.0:0,password -monitor stdio \
        -device virtio-net-pci,mac=02:08:20:80:8e:d3,tx=timer,x-txtimer=200000,x-txburst=128,vlan=1 \
        -net vnic,vlan=1,name=net1,ifname=vnic1 \
        -device virtio-net-pci,mac=02:08:20:78:6f:55,tx=timer,x-txtimer=200000,x-txburst=128,vlan=2 \
        -net vnic,vlan=2,name=net2,ifname=vnic2 \
        -boot order=cd \
        -drive file=/root/dilos-2.0.1.22.iso,media=cdrom,if=ide,index=1 -boot order=cd

...

Code Block
languagebash
titleCommand to run VM after it is installed
root@dilos:~# /smartdcusr/bin/qemu-system-x86_64 -enable-kvm -smp 2 -m 2048 \
        -drive file=/dev/zvol/rdsk/rpool/kvm1,if=virtio,index=0,media=disk,boot=on,id=disk0  \
        -bios /smartdc/share/qemu/extboot.bin \
        -vnc 0.0.0.0:0,password -monitor stdio \
        -device virtio-net-pci,mac=02:08:20:80:8e:d3,tx=timer,x-txtimer=200000,x-txburst=128,vlan=1 \
        -net vnic,vlan=1,name=net1,ifname=vnic1 \
        -device virtio-net-pci,mac=02:08:20:78:6f:55,tx=timer,x-txtimer=200000,x-txburst=128,vlan=2 \
        -net vnic,vlan=2,name=net2,ifname=vnic2

...