...
Code Block |
---|
language | bash |
---|
title | 1. Install KVM and reboot the hosted DilOS |
---|
|
root@dilos:~# apt update && apt install driver-kvm && reboot |
Code Block |
---|
language | bash |
---|
title | 2. Download QEMU software distribution |
---|
|
root@dilos:~# wget https://apt2.dilos.org/dilos/isos/kvm/smartdc.tar.gz |
Code Block |
---|
language | bash |
---|
title | 3. Extract downloaded tar archive in to the root directory |
---|
|
root@dilos:~# tar xfv smartdc.tar.gz -C / |
Code Block |
---|
|
language | bash |
---|
title | 4. Select and copy bios image for the nested VM | 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 |
---|
language | bash |
---|
title | 4. Create dataset on hosted DilOS for netsted OS |
---|
|
root@dilos:~# zfs create -V 16Gb rpool/kvm0 |
...
Code Block |
---|
language | bash |
---|
title | 6. 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 |
---|
language | bash |
---|
title | Command 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 |
...