qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] QEMU IP Address Accessibility


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] QEMU IP Address Accessibility
Date: Thu, 25 Aug 2016 18:41:13 +0100
User-agent: Mutt/1.6.2 (2016-07-01)

* Joey Connelly (address@hidden) wrote:
> Hey QEMU devs team,
> 
> I'm a CS graduate student working on Virtual Machine Software Security
> research at Boise State University. I was hoping I could have a few minutes
> of your time to ask a few simple QEMU specific questions.
> 
> *[1.]* When creating a QEMU process, you can set the VM’s IP address when
> created right?

There are a few different ways of setting QEMUs networking up, with different
answers to your questions.

The basic one (unless you specify anything else) is 'user mode' or 'SLIRP'
which is a form of NAT, and it gives the answers of:
   1) Yes you can - see the manpage under -net user and in particular the net=
      option
   2) No - not visible from the host directly but you can do specific port
      forwarding, see the hostfwd=  option
   3) No, not visible to a 3rd party host

So that's all rather restricted.

But that's only the basic version - you can set qemu up to connect the
emulated network device to the real network of your host; this is a bit
more complex to setup, but then the answers are:
   1) No, you can't set the IP address with qemu, it just gets out of the way
     and passes L2 packets around; it's then up to some other layer
     to setup IP (e.g. NAT on the host or your real networks DHCP server)
   2) Yes it's accessible from the host (assuming you're not using macvtap)
   3) And yes it's accessible from a 3rd party host.

For this see the tap and bridge options in the manpage.
They can be a bit tricky to setup depending what exactly you want to do;
If you have libvirt setup on your host it can do a lot of that
(with appropriate nat/firewalling/etc) for you.

Dave

> 
> 
> 
> *[2.]* Once a VM has been created with QEMU is its IP address accessible
> from the host machine? And if so, could you help me construct a valid
> command that would access its IP address?
> 
> 
> 
> *[3.]* Is it accessible from a third party machine? And if so, could you
> help me construct a valid command that would access its IP address?
> 
> 
> 
> 
> 
> Thanks,
> 
> -Joey
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

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