Eric Sammons | 18 Nov 2005 21:26
Picon
Favicon

OpenVZ + VPS +dhclient

I have installed fedora core 4, followed up with the install of OpenVZ.  
Everything seems to work well; however, I have a need to use dhcp rather 
than static IP addresses.  Can I configure a VPS to use dhclient rather 
than a static ip address?  If so how?  I tried to:

# vzctl enter ###
# dhclient venet0

The guest was never able to contact the dhcp server.

My VPS is also fedora core 4.

Thanks!
eanxgeek

Kirill Korotaev | 19 Nov 2005 05:35
Picon

OpenVZ + VPS +dhclient

Hello Eric,

you are the first who wants such configuration :), but I suppose it is 
possible to do it if better understand what you are doing and what are 
your goals.

Do you want your VPSs to be accessiable outside from the network?

1. If the answer is "no", then you can setup any local IPs to VPSs and 
configure NAT in the host system. Thus your VPSs will have local IPs, 
will be able to connect to the network, but won't be accessiable from 
outside (though you can map one specific port of the host system to VPS 
port, i.e. can make VPS http server to appear on some specific port of 
host system IP).

2. If the answer is "yes", then I suppose there is definetely something 
strange in your configuration, since DHCP can bring you arbitrary IP 
address and you will have to have some DNS tricks or otherwise you still 
won't be able to determine VPS IP easily  from the outside.
But the good news is that it is possible to do either :)
I have no dhclient on my machine, but dhcpcd I use here accepts -T 
option which allows (as follows from man page) to get multiple IPs 
without setuping them on the interface itself). So you will need to 
write some simple script which will reserve IP addresses from DHCP this 
way and configure them on VPS with `vzctl set <VPSID> --ipadd <IP>` 
command. Remember to delete previous VPS IP before adding a new one.

Hope this will work for you,
Kirill

(Continue reading)

Eric L. Sammons | 19 Nov 2005 22:09
Picon
Favicon

OpenVZ + VPS +dhclient

My intent is to have my guests (VPS systems) be avaialble to the network 
without using iptables, SNAT, or NAT to forward packets.  I am using fedora so 
I have dhclient available to me and not dhcpcd, at least not with my package 
base.  Anyone know how to "grab" more than one IP address from a DHCP server 
using dhclient.  There is no -T option.

Thanks!

>===== Original Message From Kirill Korotaev <dev@...> =====
>Hello Eric,
>
>you are the first who wants such configuration :), but I suppose it is
>possible to do it if better understand what you are doing and what are
>your goals.
>
>Do you want your VPSs to be accessiable outside from the network?
>
>1. If the answer is "no", then you can setup any local IPs to VPSs and
>configure NAT in the host system. Thus your VPSs will have local IPs,
>will be able to connect to the network, but won't be accessiable from
>outside (though you can map one specific port of the host system to VPS
>port, i.e. can make VPS http server to appear on some specific port of
>host system IP).
>
>2. If the answer is "yes", then I suppose there is definetely something
>strange in your configuration, since DHCP can bring you arbitrary IP
>address and you will have to have some DNS tricks or otherwise you still
>won't be able to determine VPS IP easily  from the outside.
>But the good news is that it is possible to do either :)
>I have no dhclient on my machine, but dhcpcd I use here accepts -T
(Continue reading)

Eric L. Sammons | 19 Nov 2005 22:13
Picon
Favicon

X11 and vncserver under VPS

First, let me start by stating I am fairly new to OpenVZ.  Now, last night I 
tried to use the pre packaged template for Fedora-core-4-default, which worked 
fine, then I attempted to install vncserver + X11.  These installs all seemed 
to work fine, I did notice that a new fedora kernel was installed.  Well, at 
some point I decided to vzctl restart <vpsid> and it seemed the image started, 
but I could not access it via ssh or vzctl enter.  When hardware 0 reboots it 
shows OpenVZ starts, but that VPS 101 fails to start.

So any idea how I might set up X11 under a VPS?  Also, along the same note, is 
there a good reference on how to build my own template?

Thanks!

Kir Kolyshkin | 21 Nov 2005 04:03
Picon

X11 and vncserver under VPS

Eric,

First, when submitting a bug report or a problem description please 
always try to be as specific as possible. In this case it would be 
helpful if you tell exactly the packages you have installed, the 
commands you use to do that etc.

Second, the problem is xorg-x11 requires kernel-drm thus kernel is about 
to be installed but it conflicts with our 'dev' package. If you have 
used vzyum or yum it just bails out telling there is a conflict.

Anyway, to solve the problem some trick is needed. The trick is to have 
a package installed which claims it provides kernel-drm = 4.3.0 so 
xorg-x11 dependencies will be satisfied. So I have an updated version of 
dummy package (which is created just for those tricks) that does just 
that; it is attached.

What you need to do with it is:
1. Place it to /vz/template/fedora-core/4/i386/vz-addons/ directory.
2. cd to that directory and run createrepo as root (if you do not have 
createrepo installed you can take rpm from 
http://linux.duke.edu/projects/metadata/generate/)
3. Update template cache by running vzpkgcache (check that this very 
version of dummy package is put into cache), then create a new VPS and 
go on from there (vzyum VPSID install xorg-x11 vnc-server).

Restoring your existing VPS would be a bit more complex...

Eric L. Sammons wrote:

(Continue reading)

Kir Kolyshkin | 21 Nov 2005 04:07
Picon

X11 and vncserver under VPS

Actual RPM is now attached.

Kir Kolyshkin wrote:

> Eric,
>
> First, when submitting a bug report or a problem description please 
> always try to be as specific as possible. In this case it would be 
> helpful if you tell exactly the packages you have installed, the 
> commands you use to do that etc.
>
> Second, the problem is xorg-x11 requires kernel-drm thus kernel is 
> about to be installed but it conflicts with our 'dev' package. If you 
> have used vzyum or yum it just bails out telling there is a conflict.
>
> Anyway, to solve the problem some trick is needed. The trick is to 
> have a package installed which claims it provides kernel-drm = 4.3.0 
> so xorg-x11 dependencies will be satisfied. So I have an updated 
> version of dummy package (which is created just for those tricks) that 
> does just that; it is attached.
>
> What you need to do with it is:
> 1. Place it to /vz/template/fedora-core/4/i386/vz-addons/ directory.
> 2. cd to that directory and run createrepo as root (if you do not have 
> createrepo installed you can take rpm from 
> http://linux.duke.edu/projects/metadata/generate/)
> 3. Update template cache by running vzpkgcache (check that this very 
> version of dummy package is put into cache), then create a new VPS and 
> go on from there (vzyum VPSID install xorg-x11 vnc-server).
>
(Continue reading)

Chris Schultz | 21 Nov 2005 19:40
Picon

X11 and vncserver under VPS

Kir,

Thanks for all of your help and valuable information. As a learning exercise
I too am trying to build my own fedora-core-4 templates using RedHat's
"server" install as a baseline I noticed the dummy package you mentioned
below, but I also noticed vzdev throws things off a bit as well. It
advertizes the 'dev' capability without a version. RedHa't own udev
specifies a version of 3.2-7 and some packages request that. I ended up
going through a painful exercise of iteratively removing packages from my
template's .list file and an exclude statement in my yum.conf to get around
the conflicts.

Would it be possible to get the spec files for both packages?

Thanks,

Chris

On 11/21/05, Kir Kolyshkin <kir@...> wrote:
>
> Eric,
>
> First, when submitting a bug report or a problem description please
> always try to be as specific as possible. In this case it would be
> helpful if you tell exactly the packages you have installed, the
> commands you use to do that etc.
>
> Second, the problem is xorg-x11 requires kernel-drm thus kernel is about
> to be installed but it conflicts with our 'dev' package. If you have
> used vzyum or yum it just bails out telling there is a conflict.
(Continue reading)

Kir Kolyshkin | 22 Nov 2005 04:59
Picon

X11 and vncserver under VPS


Chris Schultz wrote:

> Kir,
>
> Thanks for all of your help and valuable information.  As a learning 
> exercise I too am trying to build my own fedora-core-4 templates using 
> RedHat's "server" install as a baseline  I noticed the dummy package 
> you mentioned below, but I also noticed vzdev throws things off a bit 
> as well.  It advertizes the 'dev' capability without a version.  
> RedHa't own udev specifies a version of 3.2-7 and some packages 
> request that.  I ended up going through a painful exercise of 
> iteratively removing packages from my template's .list file and an 
> exclude statement in my yum.conf to get around the conflicts. 

Can you tell me which packages requires specific version of dev so I can 
fix it.

>
> Would it be possible to get the spec files for both packages?

Sources of all the three RPMS we supply in vz-addons are available from 
template metadata source at
http://download.openvz.org/template/metadata/fedora-core-4/src/

>
> Thanks,
>
> Chris
>
(Continue reading)


Gmane