Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no network in vm after commit docker image and run on another server #122

Closed
shifujun opened this issue Jan 6, 2021 · 3 comments
Closed

Comments

@shifujun
Copy link

shifujun commented Jan 6, 2021

I build and test a container well on a Ubuntu desktop, commit it and push. Then pull and run on another centos headless server.

But, in container(Arch Linux), curl work well. in macOS VM no network, include curl and nslookup.

How to debug this problem?

I noticed in README.md there is Then have QEMU on the host if you haven't already, does it relative? I don't understand why we need install QEMU on host while docker image include it?

Infos:

docker run -it --rm     --device /dev/kvm     -p 50922:10022     -e "DISPLAY=${DISPLAY:-:0.0}"     -e EXTRA="-monitor telnet::45454,server,nowait -nographic -serial null" customImage

[arch@4d6d8fa5d902 OSX-KVM]$ cat Launch.sh 
#!/bin/sh
set -eu
sudo chown    $(id -u):$(id -g) /dev/kvm 2>/dev/null || true
sudo chown -R $(id -u):$(id -g) /dev/snd 2>/dev/null || true
exec qemu-system-x86_64 -m ${RAM:-8}000 \
-cpu Penryn,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check \
-machine q35,accel=kvm:tcg \
-smp ${SMP:-4},cores=${CORES:-4} \
-usb -device usb-kbd -device usb-tablet \
-device isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal\(c\)AppleComputerInc \
-drive if=pflash,format=raw,readonly,file=/home/arch/OSX-KVM/OVMF_CODE.fd \
-drive if=pflash,format=raw,file=/home/arch/OSX-KVM/OVMF_VARS-1024x768.fd \
-smbios type=2 \
-audiodev ${AUDIO_DRIVER:-alsa},id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda \
-device ich9-ahci,id=sata \
-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2 \
-device ide-hd,bus=sata.2,drive=OpenCoreBoot \
-drive id=MacHDD,if=none,file=/home/arch/OSX-KVM/mac_hdd_ng.img,format=qcow2 \
-device ide-hd,bus=sata.4,drive=MacHDD \
-netdev user,id=net0,hostfwd=tcp::${INTERNAL_SSH_PORT:-10022}-:22,hostfwd=tcp::${SCREEN_SHARE_PORT:-5900}-:5900, -device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:09:49:17 \
-monitor stdio \
-vga vmware \
${EXTRA:-}

@sickcodes
Copy link
Owner

--device /dev/kvm comes with qemu

@shifujun
Copy link
Author

shifujun commented Jan 7, 2021

--device /dev/kvm comes with qemu

could you please elaborate?

@shifujun
Copy link
Author

solved 🥳

The problem is we have multiple DNS server defined in Host, the first of them not working. I guess qemu just use the first one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants