qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Virtual Machine Starts Without Internet Connection


From: l
Subject: Re: [Qemu-discuss] Virtual Machine Starts Without Internet Connection
Date: Sat, 22 Dec 2018 19:09:30 +0000

Jaap, I can start the Debian virtual machine guest and the redirects port 
directives will work if the guest can get on the WAN.   The issue is it does 
not have any internet connection.   I can not do an
$ apt update
$ ping -c 3 google.com

or ssh into it from the host.
$ ssh -p2222  address@hidden

I tried both of these start commands and the results are the same no internet 
connection.

kvm -hda debian_testing_64.qcow -m 1024 -netdev 
user,id=mynet,hostfwd=tcp::2222-:22,hostfwd=tcp::8888-:80 -device 
e1000,netdev=mynet

qemu-system-x86_64 -hda debian_testing_64.qcow -m 1024 -enable-kvm -netdev 
user,id=mynet,hostfwd=tcp::2222-:22,hostfwd=tcp::8888-:80 -device 
e1000,netdev=mynet

kvm -hda debian_testing_64.qcow -m 1024 -netdev 
user,id=mynet,hostfwd=tcp::2222-:22,hostfwd=tcp::8888-:80 -device 
e1000,netdev=mynet

Thanks

________________________________________
From: Jaap Crezee <address@hidden>
Sent: Saturday, December 22, 2018 3:23 AM
To: address@hidden; l; address@hidden
Subject: Re: [Qemu-discuss] Virtual Machine Starts Without Internet Connection

Hi,

This works for me:

"-netdev user,id=mynet,hostfwd=tcp::2222-:22,hostfwd=tcp::8888-:80"

That will also"route" port 2222 to the VM port 22 and 8888 to 80.

Regards

Jaap

On December 22, 2018 12:09:29 AM GMT+00:00, l <address@hidden> wrote:
>I tried both of these to start my virtual machine and it start
>correctly without any internet connection.
>
>qemu-system-x86_64 -m 256 -hda debian_testing_64.qcow -net
>nic,model=ne2k_pci -net user,hostfwd=tcp::9022-:22 -enable-kvm
>
>qemu-system-x86_64 -m 1024 -boot d -enable-kvm -net nic -net user -hda
>debian_testing_64.qcow
>
>Thanks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]