Just 做 IT

求知若饥 虚心若愚 안년하세요 (•‾̑⌣‾̑•)

virtualbox和kvm 切换

1 year ago 0


NOW_VM=`lsmod | grep vbox`
if [ x"$NOW_VM" = x"" ] ; then
        echo "Now is kvm, swithing to vbox..."
        rmmod kvm-intel
        rmmod kvm
 
        modprobe vboxdrv
        modprobe vboxnetadp
        modprobe vboxnetflt
else
        echo "Now is vbox, swithing to kvm..."
        rmmod vboxnetflt
        rmmod vboxnetadp
        rmmod vboxdrv
 
        modprobe kvm
        modprobe kvm-intel
fi
 
echo "Switching from    to xxx done."
lsmod | grep kvm
lsmod | grep vbox
echo "enjoy it now!"

Write a Comment