qemu-discuss
[Top][All Lists]
Advanced

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

Re: [Qemu-discuss] How to have dedicated IP for guest (that can't be use


From: Васил Рангелов
Subject: Re: [Qemu-discuss] How to have dedicated IP for guest (that can't be used by the host)?
Date: Sun, 5 Jul 2015 16:51:04 +0300

Thank you for the answer, but... How would I do that on Windows?

I tried installing the "tap" driver from 
https://openvpn.net/index.php/download/community-downloads.html (NDIS6, since I 
use Windows Server 2008 R2 == Windows 7), and then I assigned it an IP 
(192.168.200.1/24), but if I then try to start the VM with

````
"-netdev" "tap,id=user.0" "-device" "e1000,netdev=user.0 "
````

Qemu just fails to start the VM, and quits with no error message on screen. I 
even tried to rename the tap adapter to "br0", to be closer to the examples on 
the linked page, but the same thing happens.

The docs from the Qemu sources don't seem to provide any more hints either. 
Help?

-----Original Message-----
From: Fam Zheng [mailto:address@hidden 
Sent: Tuesday, June 23, 2015 4:15 AM
To: Васил Рангелов
Cc: address@hidden
Subject: Re: [Qemu-discuss] How to have dedicated IP for guest (that can't be 
used by the host)?

On Sun, 06/21 01:32, Васил Рангелов wrote:
> Hi.
> 
> As part of testing an application, I need to set up a network between 
> the host and the VM so that they can both be accessed from the host on 
> the same ports via different IPs. This can be done easily with 
> VirtualBox (and I've already done it...) but I need to do it with Qemu 
> instead, as the tests should eventually be ran on Travis-CI, which (if 
> a few articles I've seen are to be believed) can be ran in that environment, 
> while VirtualBox can't.
> 
> How can this be done?

You can use a bridged network setup, so your guest and host have their own IPs.

http://www.linux-kvm.org/page/Networking#private_virtual_bridge

> 
> I managed to successfully use
> ```
> "-netdev" "user,id=user.0 ,hostfwd=tcp::38728-:8728" "-device"
> "virtio-net,netdev=user.0"
> ```
> to set up port forwarding from a localhost port to the VM, but the 
> tests themselves require the same port on both host and VM, so that's 
> not a feasible solution :-/ .
> 
> I should note that my personal host OS is Windows Server 2008 R2, with 
> IIS being the server that occupies the ports on the host. On 
> Travis-CI, I'd of course be using Apache as an equivalent, but the 
> point is the setup should be as cross platform as possible (if 
> possible at all...), so that the application can be tested reliably on both 
> hosts.
> 
> Regards,
> Vasil Rangelov
> 
> 




reply via email to

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