[Midnightbsd-cvs] mports [21886] trunk/emulators: experimental microsoft hyper-v support
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Wed Sep 7 20:59:59 EDT 2016
Revision: 21886
http://svnweb.midnightbsd.org/mports/?rev=21886
Author: laffer1
Date: 2016-09-07 20:59:58 -0400 (Wed, 07 Sep 2016)
Log Message:
-----------
experimental microsoft hyper-v support
Modified Paths:
--------------
trunk/emulators/Makefile
Added Paths:
-----------
trunk/emulators/hyperv-is/
trunk/emulators/hyperv-is/Makefile
trunk/emulators/hyperv-is/distinfo
trunk/emulators/hyperv-is/files/
trunk/emulators/hyperv-is/files/pkg-message.A
trunk/emulators/hyperv-is/files/pkg-message.B
trunk/emulators/hyperv-is/pkg-descr
trunk/emulators/hyperv-is/pkg-install
trunk/emulators/hyperv-is/pkg-plist
Modified: trunk/emulators/Makefile
===================================================================
--- trunk/emulators/Makefile 2016-09-04 01:26:08 UTC (rev 21885)
+++ trunk/emulators/Makefile 2016-09-08 00:59:58 UTC (rev 21886)
@@ -9,6 +9,7 @@
SUBDIR += dgen-sdl
SUBDIR += dosbox
SUBDIR += extract-xiso
+SUBDIR += hyperv-is
SUBDIR += i386-wine
SUBDIR += ia64sim
SUBDIR += kqemu-kmod
Added: trunk/emulators/hyperv-is/Makefile
===================================================================
--- trunk/emulators/hyperv-is/Makefile (rev 0)
+++ trunk/emulators/hyperv-is/Makefile 2016-09-08 00:59:58 UTC (rev 21886)
@@ -0,0 +1,48 @@
+# $MidnightBSD$
+# $FreeBSD: head/emulators/hyperv-is/Makefile 370396 2014-10-07 20:27:29Z marino $
+
+PORTNAME= hyperv-is
+PORTVERSION= 1.1
+PORTREVISION= 0
+CATEGORIES= emulators
+MASTER_SITES= https://github.com/${MSLINK}/
+DISTNAME= ${DNAME}
+
+MAINTAINER= ports at MidnightBSD.org
+COMMENT= FreeBSD Integration Service on Hyper-v
+
+LICENSE= unknown
+
+USES= kmod uidfix
+BIS= ${PORTVERSION}
+MSBASE= FreeBSDonHyper-V/Hyperv-Ports/raw/hyperv-is-master
+MSLINK= ${MSBASE}/BIS-${BIS}/FreeBSD-9.1/ports
+MAKE_ARGS= BINDIR=${PREFIX}/sbin MANDIR=${PREFIX}/man/man
+PKGMESSAGE= ${FILESDIR}/${PMSG}
+
+FAKE_OPTS= trueprefix
+
+.include <bsd.port.pre.mk>
+
+CC= gcc -w
+WRKSRC= ${WRKDIR}/hyperv-is-${PORTVERSION}
+PLIST_SUB= B="@comment " A=""
+PMSG= pkg-message.A
+
+FILE_91= hyperv-is-9.1.${BIS}
+DNAME= ${FILE_91}
+
+post-patch:
+ @${REINPLACE_CMD} -e "s,/usr/sbin/,${TRUE_PREFIX}/sbin/,g" \
+ ${WRKSRC}/etc/rc.d/hv_kvpd
+
+pre-install:
+ @${MKDIR} ${PREFIX} \
+ ${FAKE_DESTDIR}/etc/rc.d \
+ ${FAKE_DESTDIR}/usr/local/hyperv/scripts \
+ ${FAKE_DESTDIR}/boot/kernel
+
+post-install:
+ ${MV} ${FAKE_DESTDIR}/etc/rc.d/* ${PREFIX}/etc/rc.d
+
+.include <bsd.port.post.mk>
Property changes on: trunk/emulators/hyperv-is/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/emulators/hyperv-is/distinfo
===================================================================
--- trunk/emulators/hyperv-is/distinfo (rev 0)
+++ trunk/emulators/hyperv-is/distinfo 2016-09-08 00:59:58 UTC (rev 21886)
@@ -0,0 +1,10 @@
+SHA256 (hyperv-is-8.4.1.1.tar.gz) = 21f21bf8192892b823a63ebcea8cfd916ab0572b965c06471388386765346ae6
+SIZE (hyperv-is-8.4.1.1.tar.gz) = 94356
+SHA256 (hyperv-is-9.1.1.1.tar.gz) = ab4dc50d4f66ef983bd0de96388ba95e29d1e987362336bf44e3ff971425245a
+SIZE (hyperv-is-9.1.1.1.tar.gz) = 94286
+SHA256 (hyperv-is-9.2.1.1.tar.gz) = 75e4ed3ba0c75ce5c67efed7b4f72ada3047f4cc986659b64c14979227292fd5
+SIZE (hyperv-is-9.2.1.1.tar.gz) = 94294
+SHA256 (hyperv-is-9.3.1.1.tar.gz) = 10a63b7b2a7bbfd158eed3852b0c25bfba3362c3cec28dfac641e22e61b23587
+SIZE (hyperv-is-9.3.1.1.tar.gz) = 94296
+SHA256 (hv-kvp-1.0.tar.gz) = c2c60ae645cae75b25934aae7b18c8a29bf00660a1e4ade5d8f31bb98d7ecc78
+SIZE (hv-kvp-1.0.tar.gz) = 30815
Property changes on: trunk/emulators/hyperv-is/distinfo
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/emulators/hyperv-is/files/pkg-message.A
===================================================================
--- trunk/emulators/hyperv-is/files/pkg-message.A (rev 0)
+++ trunk/emulators/hyperv-is/files/pkg-message.A 2016-09-08 00:59:58 UTC (rev 21886)
@@ -0,0 +1,19 @@
+#############################################################################
+After installing do the following steps:
+# Deleting Hyper-v BIS driver names
+ sed -i "" '/Loader labels for Hyper-v BIS driver/d' /boot/loader.conf
+ sed -i "" '/hv_vmbus_load/d' /boot/loader.conf
+ sed -i "" '/hv_utils_load/d' /boot/loader.conf
+ sed -i "" '/hv_storvsc_load/d' /boot/loader.conf
+ sed -i "" '/hv_netvsc_load/d' /boot/loader.conf
+ sed -i "" '/hv_ata_pci_disengage_load/d' /boot/loader.conf
+
+ #Hyper-v driver names
+ echo "# Loader labels for Hyper-v BIS drivers -do not modify" >> /boot/loader.conf
+ echo 'hv_vmbus_load="YES"' >> /boot/loader.conf
+ echo 'hv_utils_load="YES"' >> /boot/loader.conf
+ echo 'hv_storvsc_load="YES"' >> /boot/loader.conf
+ echo 'hv_netvsc_load="YES"' >> /boot/loader.conf
+ echo 'hv_ata_pci_disengage_load="YES"' >>/boot/loader.conf
+When deinstalled, restore /boot/loader.conf
+#############################################################################
Property changes on: trunk/emulators/hyperv-is/files/pkg-message.A
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/emulators/hyperv-is/files/pkg-message.B
===================================================================
--- trunk/emulators/hyperv-is/files/pkg-message.B (rev 0)
+++ trunk/emulators/hyperv-is/files/pkg-message.B 2016-09-08 00:59:58 UTC (rev 21886)
@@ -0,0 +1,17 @@
+#############################################################################
+To enable hv_kvp, you should do the steps following:
+ # Deleting kvp label
+ sed -i "" '/Loader labels for Hyper-V KVP drivers/d' /etc/rc.conf
+ sed -i "" '/hv_kvp_load/d' /etc/rc.conf
+
+ #hyperv driver names
+ echo '# Loader labels for Hyper-V KVP drivers -do not modify' >> /boot/loader.conf
+ echo 'hv_kvp_load="YES"' >> /boot/loader.conf
+
+# KVP - daemon label
+ sed -i "" '/Label for KVP daemon/d' /etc/rc.conf
+ sed -i "" '/hv_kvp_daemon_enable/d' /etc/rc.conf
+ echo '# Label for KVP daemon -do not modify' >> /etc/rc.conf
+ echo 'hv_kvp_daemon_enable="YES"' >> /etc/rc.conf
+After deinstall, you should restore /boot/loader.conf and /etc/rc.conf
+#############################################################################
Property changes on: trunk/emulators/hyperv-is/files/pkg-message.B
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/emulators/hyperv-is/pkg-descr
===================================================================
--- trunk/emulators/hyperv-is/pkg-descr (rev 0)
+++ trunk/emulators/hyperv-is/pkg-descr 2016-09-08 00:59:58 UTC (rev 21886)
@@ -0,0 +1,13 @@
+The hyperv-is provision a collection of kernel mode drivers as well as
+user-space daemons to facilitate integration with Hyper-v to provide a
+feature rich and high performance FreeBSD guest experience.
+
+The FreeBSD Integration Service on Hyper-v includes a collection of kernel
+mode drivers as well as user-space daemons to interact with the drivers
+that are required to run Hyper-V-specific devices known as FreeBSD
+Integration Services (BIS). It is to facilitate integration with Hyper-v
+to provide a feature rich and high performance FreeBSD guest experience.
+See the man page for a list of binaries and their functions.
+
+FreeBSD support for hyperv-is was first added by Microsoft BSD Integration
+Services Team <bsdic at microsoft.com>.
Property changes on: trunk/emulators/hyperv-is/pkg-descr
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/emulators/hyperv-is/pkg-install
===================================================================
--- trunk/emulators/hyperv-is/pkg-install (rev 0)
+++ trunk/emulators/hyperv-is/pkg-install 2016-09-08 00:59:58 UTC (rev 21886)
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# make install or pkg_add script
+# Checks labels/gptids for roots and swap partitions
+# adds hyperv labels in loader.conf
+#
+
+if [ "$2" = "PRE-INSTALL" ]; then
+echo "===> Pre-install Check"
+
+#rootfs check
+root_flag=$(mount | awk '/ on \/ / { print $1 }' | cut -d / -f3-)
+if [ "$root_flag" != "" ]; then
+ fs_test=$(glabel status | awk '{print $1}' | grep $root_flag)
+ if [ "$fs_test" == "" ]; then
+ echo " xxx rootfs Label/gptid missing in fstab"
+ fi
+else
+ echo " xxx rootfs Label/gptid missing in fstab"
+fi
+#swap check
+[ -f /etc/fstab ] && swap_flag=$(grep swap /etc/fstab | awk '{print $1}' | cut -d / -f3-)
+if [ "$swap_flag" != "" ]; then
+ sw_test=$(glabel status | awk '{print $1}' | grep $swap_flag)
+ if [ "$sw_test" == "" ]; then
+ echo " xxx swap Label/gptid missing in fstab"
+ fi
+else
+ echo " xxx swap Label/gptid missing in fstab "
+fi
+
+if [ "$fs_test" != "" -a "$sw_test" != "" ]; then
+ echo "===> Labels/gptids Found"
+ echo "===> Hyper-V BIS Installation Continues"
+else
+ echo "===> Labels/gptids Not found"
+ echo "===> Hyper-V BIS Installation Aborted"
+ echo "===> Refer to Disk UUID section in README document"
+ echo "===> Please refer the Prerequisites page and complete all steps"
+ echo "WWW: https://github.com/FreeBSDonHyper-V/Hyperv-Ports/wiki/Prerequisites "
+ exit 1
+fi
+fi
+exit 0
Property changes on: trunk/emulators/hyperv-is/pkg-install
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/emulators/hyperv-is/pkg-plist
===================================================================
--- trunk/emulators/hyperv-is/pkg-plist (rev 0)
+++ trunk/emulators/hyperv-is/pkg-plist 2016-09-08 00:59:58 UTC (rev 21886)
@@ -0,0 +1,18 @@
+hyperv/scripts/hv_get_dhcp_info
+hyperv/scripts/hv_get_dns_info
+hyperv/scripts/hv_set_ifconfig
+ at cwd /
+boot/modules/hv_ata_pci_disengage.ko
+boot/modules/hv_netvsc.ko
+boot/modules/hv_storvsc.ko
+boot/modules/hv_utils.ko
+boot/modules/hv_vmbus.ko
+ at cwd %%LOCALBASE%%
+etc/rc.d/hv_kvpd
+man/man1/hyperv-is.1.gz
+man/man4/hv_ata_pci_disengage.4.gz
+man/man4/hv_kvp.4.gz
+man/man4/hv_netvsc.4.gz
+man/man4/hv_storvsc.4.gz
+man/man4/hv_utils.4.gz
+man/man4/hv_vmbus.4.gz
Property changes on: trunk/emulators/hyperv-is/pkg-plist
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
More information about the Midnightbsd-cvs
mailing list