[OmniOS-discuss] TEST REQUEST - Running kvm in a zone verification
John D Groenveld
jdg117 at elvis.arl.psu.edu
Wed Mar 11 18:23:05 UTC 2015
In message <5F988F8F-D3C4-4085-98C6-2D0D3D27E3AB at omniti.com>, Dan McDonald writ
es:
>This most recent update to bloody has put the /dev/kvm device entry into non-g
>lobal ipkg or lipkg zones. The idea is you can run KVM instances in zones, wh
>ich is something not available in r151012 or earlier.
You can run a single KVM instance in a zone with r151012
but you must add /dev/dld and /dev/kvm.
>I've not been able to test this yet, so I cannot yet make the claim that "you
>can run KVM in a zone starting with r151014". I would appreciate some communi
>ty help here. I have *some* availability for questions and help, but I really
> would like someone to take this and run with it.
Awesome!
Now to hunt down some raw iron for bloody.
John
groenveld at acm.org
# cat /etc/release
OmniOS v11 r151012
Copyright 2014 OmniTI Computer Consulting, Inc. All rights reserved.
Use is subject to license terms
# zonecfg -z doors export
create -b
set zonepath=/var/opt/zones/doors
set brand=ipkg
set autoboot=false
set ip-type=exclusive
add net
set physical=vnic2
end
add net
set physical=vnic3
end
add device
set match=/dev/kvm
end
add device
set match=/dev/dld
end
#!/usr/bin/bash
# configuration
NAME=doors
VNIC=vnic3
HDD=/root/doors.raw
CD=/root/openSUSE-13.2-DVD-x86_64.iso
VNC=5
MEM=8192
mac=`dladm show-vnic -po macaddress $VNIC`
/usr/bin/qemu-system-x86_64 \
-name $NAME \
-boot cd \
-enable-kvm \
-vnc 0.0.0.0:$VNC \
-cpu host \
-smp 4 \
-m $MEM \
-no-hpet \
-usbdevice tablet \
-localtime \
-drive file=$HDD,if=ide,index=0 \
-drive file=$CD,media=cdrom,if=ide,index=2 \
-net nic,vlan=0,name=net0,model=e1000,macaddr=$mac \
-net vnic,vlan=0,name=net0,ifname=$VNIC,macaddr=$mac \
-vga cirrus \
-monitor unix:/tmp/$NAME.monitor,server,nowait,nodelay \
-daemonize
if [ $? -gt 0 ]; then
echo "Failed to start VM"
fi
port=`expr 5900 + $VNC`
public_nic=$(dladm show-vnic|grep vnic2|awk '{print $2}')
public_ip=$(ifconfig $public_nic|grep inet|awk '{print $2}')
echo "Started VM:"
echo "Public: ${public_ip}:${port}"
More information about the OmniOS-discuss
mailing list