[opensuse-virtual] Static IP and internet access in a VM
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. -- Sankar P http://psankar.blogspot.com -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
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@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
Hi Bruno, Sorry for the late reply as I did not get your mail as I was not subscribed to the list and I forgot to add my email address explicitly in the CC.
The qmenu xml definition in a host will look like
Also, sorry to say that I was not able to understand what you meant by qmenu xml definition. I am a total newbie when it comes to setting up VMs and have used jsut virtualbox with its helpful gui so far. If it is not too much of an effort, can you explain the steps for using/generating this XML or point me to relevant documentation where I can get static IP for my VM but with internet access ? I searched around but could not find anything newbie friendly. Thanks. Sankar 2014/1/3 Sankar P <sankar.curiosity@gmail.com>:
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.
-- Sankar P http://psankar.blogspot.com
-- Sankar P http://psankar.blogspot.com -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On Tuesday 07 January 2014 10.26:34 Sankar P wrote:
Hi Bruno,
Sorry for the late reply as I did not get your mail as I was not subscribed to the list and I forgot to add my email address explicitly in the CC.
The qmenu xml definition in a host will look like
Also, sorry to say that I was not able to understand what you meant by qmenu xml definition. I am a total newbie when it comes to setting up VMs and have used jsut virtualbox with its helpful gui so far. If it is not too much of an effort, can you explain the steps for using/generating this XML or point me to relevant documentation where I can get static IP for my VM but with internet access ? I searched around but could not find anything newbie friendly.
Thanks.
Sankar
Sorry if it was not clear, first I would recommend this bible :-) http://activedoc.opensuse.org/book/opensuse-virtualization-with-kvm You will then learn how to edit manually, or with virsh or virt-manager gui the definition of your vm. Hope this help you, otherwise, just ping back. -- Bruno Friedmann Ioda-Net Sàrl www.ioda-net.ch openSUSE Member GPG KEY : D5C9B751C4653227 irc: tigerfoot -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
2014/1/7 Bruno Friedmann <bruno@ioda-net.ch>:
On Tuesday 07 January 2014 10.26:34 Sankar P wrote:
Hi Bruno,
Sorry for the late reply as I did not get your mail as I was not subscribed to the list and I forgot to add my email address explicitly in the CC.
The qmenu xml definition in a host will look like
Also, sorry to say that I was not able to understand what you meant by qmenu xml definition. I am a total newbie when it comes to setting up VMs and have used jsut virtualbox with its helpful gui so far. If it is not too much of an effort, can you explain the steps for using/generating this XML or point me to relevant documentation where I can get static IP for my VM but with internet access ? I searched around but could not find anything newbie friendly.
Thanks.
Sankar
Sorry if it was not clear, first I would recommend this bible :-) http://activedoc.opensuse.org/book/opensuse-virtualization-with-kvm
You will then learn how to edit manually, or with virsh or virt-manager gui the definition of your vm.
Hope this help you, otherwise, just ping back.
ah, there seem to be a problem. The doc recommends me to create a new bridged network card (section 4.1.1.5) . Also my VM currently says: libvirt connection does not support interface management. However, since I am using network-manager I cannot use YaST to create a new bridged network card. I want to continue using network manager, as I want to access my wireless at home etc. So what will be the way forward ? To be honest, it feels like such a basic workflow requirement to require a static IP for a VM, that I am surprised that it is not straightforward. Any other help or pointers ? Thanks. Sankar
--
Bruno Friedmann Ioda-Net Sàrl www.ioda-net.ch
openSUSE Member GPG KEY : D5C9B751C4653227 irc: tigerfoot
-- Sankar P http://psankar.blogspot.com -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
Sankar P wrote:
2014/1/7 Bruno Friedmann <bruno@ioda-net.ch>:
On Tuesday 07 January 2014 10.26:34 Sankar P wrote:
Hi Bruno,
Sorry for the late reply as I did not get your mail as I was not subscribed to the list and I forgot to add my email address explicitly in the CC.
The qmenu xml definition in a host will look like
Also, sorry to say that I was not able to understand what you meant by qmenu xml definition. I am a total newbie when it comes to setting up VMs and have used jsut virtualbox with its helpful gui so far. If it is not too much of an effort, can you explain the steps for using/generating this XML or point me to relevant documentation where I can get static IP for my VM but with internet access ? I searched around but could not find anything newbie friendly.
Thanks.
Sankar
Sorry if it was not clear, first I would recommend this bible :-) http://activedoc.opensuse.org/book/opensuse-virtualization-with-kvm
You will then learn how to edit manually, or with virsh or virt-manager gui the definition of your vm.
Hope this help you, otherwise, just ping back.
ah, there seem to be a problem. The doc recommends me to create a new bridged network card (section 4.1.1.5) . Also my VM currently says: libvirt connection does not support interface management.
What distro? 13.1? Since 12.1, libvirt uses libnetcontrol for interface management on openSUSE.
However, since I am using network-manager I cannot use YaST to create a new bridged network card. I want to continue using network manager, as I want to access my wireless at home etc.
So what will be the way forward ? To be honest, it feels like such a basic workflow requirement to require a static IP for a VM, that I am surprised that it is not straightforward. Any other help or pointers ?
The libvirt wiki has quite a bit of info regarding libvirt's network support http://wiki.libvirt.org/page/Main_Page#Networking Regards, Jim -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
If you're using libvirt, I don't see whether you're trying to manage using CLI or a GUI. If you are able to use a GUI, then it's pretty easy to manage your virtual networks including creating and configuring any virtual network of your choosing. If I were to guess, your error is because you're trying to ;modify an existing virtual network or similar. Instead, just create a new connection with a different name. Of course, you'll need to know beforehand any existing networks so you don't have a conflict. Tony On Sun, Jan 12, 2014 at 8:18 PM, Sankar P <sankar.curiosity@gmail.com> wrote:
2014/1/7 Bruno Friedmann <bruno@ioda-net.ch>:
On Tuesday 07 January 2014 10.26:34 Sankar P wrote:
Hi Bruno,
Sorry for the late reply as I did not get your mail as I was not subscribed to the list and I forgot to add my email address explicitly in the CC.
The qmenu xml definition in a host will look like
Also, sorry to say that I was not able to understand what you meant by qmenu xml definition. I am a total newbie when it comes to setting up VMs and have used jsut virtualbox with its helpful gui so far. If it is not too much of an effort, can you explain the steps for using/generating this XML or point me to relevant documentation where I can get static IP for my VM but with internet access ? I searched around but could not find anything newbie friendly.
Thanks.
Sankar
Sorry if it was not clear, first I would recommend this bible :-) http://activedoc.opensuse.org/book/opensuse-virtualization-with-kvm
You will then learn how to edit manually, or with virsh or virt-manager gui the definition of your vm.
Hope this help you, otherwise, just ping back.
ah, there seem to be a problem. The doc recommends me to create a new bridged network card (section 4.1.1.5) . Also my VM currently says: libvirt connection does not support interface management. However, since I am using network-manager I cannot use YaST to create a new bridged network card. I want to continue using network manager, as I want to access my wireless at home etc.
So what will be the way forward ? To be honest, it feels like such a basic workflow requirement to require a static IP for a VM, that I am surprised that it is not straightforward. Any other help or pointers ?
Thanks.
Sankar
--
Bruno Friedmann Ioda-Net Sàrl www.ioda-net.ch
openSUSE Member GPG KEY : D5C9B751C4653227 irc: tigerfoot
-- Sankar P http://psankar.blogspot.com -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
participants (4)
-
Bruno Friedmann
-
Jim Fehlig
-
Sankar P
-
Tony Su