Mailinglist Archive: opensuse-virtual (33 mails)

< Previous Next >
Re: [opensuse-virtual] Static IP and internet access in a VM
On Friday 03 January 2014 10.48:27 Sankar P wrote:
Hi,

I am not sure if this is the right list but this seemed the most suitable.

I am using openSUSE 13.1 and using virt-manager I created a SLES
virtual machine. One of the applications that I am going to install in
the VM requires static ip address and so my VM must have static ip
address.

In the VM Details, I have set the NIC card to be "Virtual network
'default': NAT" and inside the VM I have given a static i.p. in the
yast. However, I am not able to access the internet from my VM.

So, what should I do to get:

1) a static i.p. for my VM
2) with the ability to access the internet in the VM (using the host's
internet connection) ?
3) Ability to ssh into the VM directly without coming into the host
machine, will be good to have but not at all needed if it will
complicate the setup (due to the static ip requirement)

In VirtualBox, I have achieved the above by creating two network cards
one with hostonly and another with Bridged networking. One will be
DHCP (bridged) and will give me access to the internet and the
hostonly will give me a static i.p. address for the VM. (IIRC)

Is there a way to satisfy this requirement ? Google does not seem to
return any helpful results for this.

Any help will be appreciated. Thanks.



Hi Sankar, on my side, if the vm has to be accessible directly I mostly use a
host bridge configuration
so the guest is directly connected to the same network. From there I use static
ip address.

Normally yast vm-install tools propose to create a bridge configuration but
then you will have to forget using networkmanager.

If you already have a bridge then you can edit the vm to pick up the host
bridge.
The qmenu xml definition in a host will look like

<interface type='bridge'>
<mac address='52:54:00:55:00:45'/>
<source bridge='br0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>

hope this help


--

Bruno Friedmann
Ioda-Net Sàrl www.ioda-net.ch

openSUSE Member
GPG KEY : D5C9B751C4653227
irc: tigerfoot
--
To unsubscribe, e-mail: opensuse-virtual+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-virtual+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation
References