标签:linu 管理 etc ports cal iso add port bridge
创建 vm:
#!/usr/bin/env zsh tap_IF=tap0 bridge_IF=bridge0 physical_IF=re0 iso_Path=/bhyve/ISO/CentOS.iso vol_Path=/dev/zvol/zdata/linux_0 uefi_Path=/usr/local/share/uefi-firmware/BHYVE_UEFI.fd vm_Name=gentoo cpu_Num=2 mem_Size=2048M vol_Size=24G kldload vmm kldload if_tap sysctl net.link.tap.up_on_open=1 ifconfig $tap_IF create ifconfig $bridge_IF create ifconfig $bridge_IF addm $physical_IF addm $tap_IF ifconfig $bridge_IF up zfs create -V $vol_Size -o volmode=dev zroot/$vm_Name # cd /usr/ports/sysutils/bhyve-firmware # make install clean bhyve -AHP -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,$tap_IF -s 3:0,virtio-blk,$vol_Path -s 4:0,ahci-cd,$iso_Path -c $cpu_Num -m $mem_Size -l bootrom,$uefi_Path $vm_Name
管理 vm:
ls -al /dev/vmm
bhyvectl --destroy --vm=guest_Name配置文件:
/etc/sysctl.conf
/boot/loader.conf
/etc/rc.conf
FreeBSD_11-系统管理——{Part_10 - bhyve}
标签:linu 管理 etc ports cal iso add port bridge
原文地址:http://www.cnblogs.com/hadex/p/6724081.html