docker_survey_2_v04-0-01

Khắc phục lỗi khi cài đặt Docker Toolbox trên Windows đã bật Hyper-V

– Khi mà cài đặt xong Docker Toolbox và chạy Docker Quickstart Terminal, các bạn gặp phải trường hợp như thế này.

Running pre-create checks...
Error with pre-create check: "Hyper-V is installed. VirtualBox won't boot a 64bits VM when Hyper-V is activated. If it's installed but deactivated, you can use --virtualbox-no-vtx-check to try anyways"
Looks like something went wrong in step ´Checking if machine default exists´

Lỗi này xảy ra khi đoạn script chạy kiểm tra Hyper-V máy của bạn mà thông báo. Nên bạn chỉ cần edit lại dòng script để bỏ qua bước check này.

Các bạn vào đường dẫn mặc định cài đặt C:\Program Files\Docker Toolbox
Và Edit file start.sh

STEP="Checking if machine $VM exists"
if [ $VMEXISTSCODE -eq 1 ]; then
"${DOCKERMACHINE}" rm -f "${VM}" &> /dev/null || :
rm -rf ~/.docker/machine/machines/"${VM}"
#set proxy variables if they exists
if [ -n ${HTTPPROXY+x} ]; then
PROXYENV="$PROXYENV --engine-env HTTPPROXY=$HTTPPROXY"
fi
if [ -n ${HTTPSPROXY+x} ]; then
PROXYENV="$PROXYENV --engine-env HTTPSPROXY=$HTTPSPROXY"
fi
if [ -n ${NOPROXY+x} ]; then
PROXYENV="$PROXYENV --engine-env NOPROXY=$NOPROXY"
fi
"${DOCKERMACHINE}" create -d virtualbox $PROXYENV "${VM}"
fi

Tìm dòng :

"${DOCKERMACHINE}" create -d virtualbox $PROXYENV "${VM}"

Bạn sửa lại thành :

"${DOCKER_MACHINE}" create -d virtualbox --virtualbox-no-vtx-check $PROXYENV "${VM}"

Save lại quyền Administrator. Bạn chạy lại Docker Quickstart Terminal được không nha. Cám ơn các bạn.

Leave a Reply