[OmniOS-discuss] [SPAM] newbie virtualisation question
Rob Logan
Rob at Logan.com
Fri Dec 21 12:03:11 EST 2012
> http://omnios.omniti.com/wiki.php/VirtualMachinesKVM
to use virtio rather than emulated ide and e1000
make a guest cdrom:
wget https://github.com/joyent/smartos-vmtools/archive/master.zip
unzip master.zip
cd smartos-vmtools-master
pkg install cdrtools
./bin/build-image
mv cache/smartos-vmtools*.iso ..
change the master script for -drive if=virtio and include a boot and guest cdrom
leaving the e1000 so the install will find the internet. Windows will not see
any disks, so you do the "have disk" driver options and navigate to
smartos-vmtools/windows/drivers/viostor/Win7/amd64 to install the driver, then
windows will see its disk and you begin the install.
once fully installed, right click on cdrom
smartos-vmtools/windows/drivers/NetKVM/Vista/amd64/netkvm.inf
and select install.. bring the guest down and change -net model=virtio
There is a stunning increase in disk performance, but I haven't tested the
network or overhead difference yet... but it works:
http://rob.com/lancair/2012.12/OmniOS.png
I'm not sure how I want to manage my kvms yet, but I'd be willing
to edit the wiki if sent the raw code to edit or given a login.
my current modifyed script looks like:
#!/usr/bin/sh
vm=2
# zfs create -p -V 30G rpool/vm/win$vm
VNIC=vnic$vm
# dladm create-vnic -l rge0 $VNIC
mac=`dladm show-vnic -po macaddress $VNIC`
/usr/bin/qemu-system-x86_64 \
-name $vm \
-smp 2 \
-m 4096 \
-drive file=/dev/zvol/rdsk/rpool/vm/win$vm,if=virtio,index=0 \
-drive file=/vm/iso/en_windows_8_enterprise_x64_dvd_917522.iso,media=cdrom,if=ide,index=1 \
-drive file=/vm/iso/smartos-vmtools-20121220234417.iso,media=cdrom,if=ide,index=2 \
-net nic,name=net0,model=virtio,macaddr=$mac \
-net vnic,name=net0,ifname=$VNIC,macaddr=$mac \
-vga std \
-vnc 0.0.0.0:$vm \
-boot once=cd \
-enable-kvm \
-no-hpet \
-localtime \
-daemonize
if [ $? -gt 0 ]; then
echo "Failed to start VM"
fi
port=`expr 5900 + $vm`
public_nic=$(dladm show-vnic|grep vnic$vm|awk '{print $2}')
public_ip=$(ifconfig $public_nic|grep inet|awk '{print $2}')
echo
echo "Console at vnc://${public_ip}:${port}"
More information about the OmniOS-discuss
mailing list