I installed openvz in my server but to create more virtual machines I need more than one ip address. But my service provider can only give one ip address for my server. Is there any software that supports subdomain or Server Name Indication. I searched google to find out whether Xen or KVM supports subdomain, but I failed to find any result.
-
2Lack of IP addresses isn't a problem you'll solve with virtualization. What _exactly_ are you trying to do? – Michael Hampton Mar 06 '13 at 10:53
-
I'm trying to create virtual machines for my colleagues. We have different projects working on for finals, some use JVM and others use python, I installed openvz with ISPConfig to manage the server, but I can't create virtual machines. do you have any ideas? – isuru madusanka Mar 06 '13 at 11:07
-
1Every virtual machine has to have its own IP address (just like every physical machine). Consider using IPv6 if you can. – Michael Hampton Mar 06 '13 at 11:56
-
Michael Hampton's comment is the best one so far - if you can use IPv6 you won't need NAT and port forwarding. – Jenny D Mar 07 '13 at 07:40
3 Answers
What you can do is to set up a private network with its own netspace, behind a router/server that does NAT. You give the various servers ipaddresses within the networks assigned to this, e.g. 10.0.0.1 and so on. Then have the router/NAT server do portmapping so that when colleague A connects by ssh to port 2022, they will arrive at virtual server A. When colleague B connects by ssh to port 2122, they will arrive at virtual server B, and so on.

- 27,780
- 21
- 75
- 114
You can create a virtual local network for your VMs and set up NAT using your external IP. HOWTO
In general you need to create a bridge on your host node using bridge-utils and assign some local IP to it.
Then add a network interface with another local IP to the container and set it to use your new bridge.
There is another HOWTO for that on the OpenVZ wiki.
After that all you have to do is configure NAT on your host node using iptables.

- 113
- 2
- 10
-
Can you provide more details in your answer than just a link? SF policy is that answers should be able to stand on their own in the event that the site the link goes to goes away. A high level of the steps involved would suffice. – slm Mar 06 '13 at 12:46
It sounds to me like you need a private cloud, that anyone can spin up VMs with worry about additional config, ie networks / source nats to the internet etc. you could try cloudstack from citrix. That will do what you want.. http://incubator.apache.org/cloudstack/

- 418
- 4
- 15
-
Thanks! I will check it out. I am reading their documentation and really like this private cloud concept. – isuru madusanka Mar 06 '13 at 16:35