Unverified Commit 3d3861ab authored by Kroese's avatar Kroese Committed by GitHub
Browse files

Add vhost support in NAT mode

Add vhost support in NAT mode
parents c714159a 89adfa79
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ jobs:
    - uses: actions/checkout@v3
    -
      name: Create a release
      uses: kroese/github-release@v6
      uses: action-pack/github-release@v6
      env:
        GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
      with:
@@ -81,7 +81,7 @@ jobs:
        body: "Release v${{ vars.MAJOR }}.${{ vars.MINOR }}"
    -
      name: Increment minor version
      uses: kroese/increment@v1
      uses: action-pack/increment@v1
      with:
        name: 'MINOR'
        token: ${{ secrets.REPO_ACCESS_TOKEN }}
@@ -97,7 +97,7 @@ jobs:
        fetch-depth: 0
    -
      name: Push to Gitlab mirror
      uses: kroese/gitlab-sync@v2
      uses: action-pack/gitlab-sync@v2
      with:
        url: ${{ secrets.GITLAB_URL }}
        token: ${{ secrets.GITLAB_TOKEN }}
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ services:
            RAM_SIZE: "512M"
        devices:
            - /dev/kvm
            - /dev/vhost-net
        cap_add:
            - NET_ADMIN        
        ports:
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ services:
            DISK_SIZE: "16G"
        devices:
            - /dev/kvm
            - /dev/vhost-net
        cap_add:
            - NET_ADMIN                       
        ports:
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ set -u

: ${DHCP:='N'}

if [ "$DHCP" = "Y" ]; then
if [[ "${DHCP}" == [Yy1]* ]]; then
  PORT=5555
  IP="127.0.0.1"
else
+4 −4
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ if [ -f "${DATA}" ]; then

    echo "INFO: Resizing data disk from $OLD_SIZE to $DATA_SIZE bytes.."

    if [ "$ALLOCATE" = "N" ]; then
    if [[ "${ALLOCATE}" == [Nn]* ]]; then

      # Resize file by changing its length
      truncate -s "${DATA_SIZE}" "${DATA}"; 
@@ -58,7 +58,7 @@ if [ -f "${DATA}" ]; then
        echo "ERROR: Could not allocate a file for the virtual disk." && exit 85
      fi

      if [ "$ALLOCATE" = "Z" ]; then
      if [[ "${ALLOCATE}" == [Zz]* ]]; then

        GB=$(( (REQ + 1073741823)/1073741824 ))

@@ -81,7 +81,7 @@ fi

if [ ! -f "${DATA}" ]; then

  if [ "$ALLOCATE" = "N" ]; then
  if [[ "${ALLOCATE}" == [Nn]* ]]; then

    # Create an empty file
    truncate -s "${DATA_SIZE}" "${DATA}"
@@ -102,7 +102,7 @@ if [ ! -f "${DATA}" ]; then
      echo "ERROR: Could not allocate a file for the virtual disk." && exit 87
    fi

    if [ "$ALLOCATE" = "Z" ]; then
    if [[ "${ALLOCATE}" == [Zz]* ]]; then

      echo "INFO: Preallocating ${DISK_SIZE} of diskspace, please wait..."
      dd if=/dev/urandom of="${DATA}" count="${DATA_SIZE}" bs=1M iflag=count_bytes status=none
Loading