[OmniOS-discuss] no interface found installing kvm

Lars Nordin lars.nordin at photonet.se
Thu Feb 19 11:04:51 UTC 2015


Hi gurus!in
I try to to install pfsence in a kvm virtual machine. First in boot 
interfaces is found but later it prompts in vnc:
No interface found do you want to declare one?
And auto detect fails.

beginning of vm boot:

qemu-system-x86_64: -net 
vnic,vlan=0,name=net0,ifname=pfwan0,macaddr=2:8:20:93:f5:d9: vnic dhcp 
disabled

qemu-system-x86_64: -net 
vnic,vlan=1,name=net1,ifname=pflan0,macaddr=2:8:20:41:46:7d: vnic dhcp 
disabled


startscript:

#!/usr/bin/bash

# on omnios command is /usr/bin/qemu-system-x86_64

# configuration
NAME="PfSense2.13"
NUM=2
VNIC0=pfwan0
VNIC1=pflan0
#VNIC2=pftlout0
#VNIC3=pftlin0
#VNIC4=print0
#HDD=/dev/zvol/rdsk/mainpool/vm/pfsense/os
HDD=/dev/zvol/rdsk/daedaluspool/pfroot/os
#CD=/mainpool/nfs/iso/pf213.iso
CD=/mnt/pfSense-LiveCD-2.1.5-RELEASE-amd64.iso
MEM=2048

# don't change below here!

TLN=`expr 7000 + $NUM`
mac0=`dladm show-vnic -po macaddress $VNIC0`
mac1=`dladm show-vnic -po macaddress $VNIC1`
#mac2=`dladm show-vnic -po macaddress $VNIC2`
#mac3=`dladm show-vnic -po macaddress $VNIC3`
#mac4=`dladm show-vnic -po macaddress $VNIC4`

/usr/bin/qemu-system-x86_64 \
-name $NAME \
-boot cd \
-enable-kvm \
-vnc 0.0.0.0:$NUM \
-smp cores=1,threads=2,sockets=1 \
-m $MEM \
-no-hpet \
-localtime \
-drive file=$HDD,if=ide,index=0 \
-drive file=$CD,media=cdrom,if=ide,index=2 \
-net nic,vlan=0,name=net0,model=virtio,macaddr=$mac0 \
-net vnic,vlan=0,name=net0,ifname=$VNIC0,macaddr=$mac0 \
-net nic,vlan=1,name=net1,model=virtio,macaddr=$mac1 \
-net vnic,vlan=1,name=net1,ifname=$VNIC1,macaddr=$mac1 \
#-net nic,vlan=2,name=net2,model=virtio,macaddr=$mac2 \
#-net vnic,vlan=2,name=net2,ifname=$VNIC2,macaddr=$mac2 \
#-net nic,vlan=3,name=net3,model=virtio,macaddr=$mac3 \
#-net vnic,vlan=3,name=net3,ifname=$VNIC3,macaddr=$mac3 \
#-net nic,vlan=4,name=net4,model=virtio,macaddr=$mac4 \
#-net vnic,vlan=4,name=net4,ifname=$VNIC4,macaddr=$mac4 \
-vga std \
-cpu host \
-pidfile /pfroot/pids/$NAME.pid \
-monitor telnet:localhost:$TLN,server,nowait,nodelay \
-daemonize

if [ $? -gt 0 ]; then
     echo "Failed to start VM"
     exit
fi

port=`expr 5900 + $NUM`
public_nic=$(dladm show-vnic|grep vnic0|awk '{print $2}')
public_ip=$(ifconfig $public_nic|grep inet|awk '{print $2}')

echo "Started VM: $NAME"
echo "VNC available at: host IP ${public_ip} port ${port}"
echo "QEMU Monitor, do: # telnet localhost $TLN. Note: use Control ] to 
exit monitor before quit!
"
What am I missing?

/Lars Nordin


More information about the OmniOS-discuss mailing list