Help With Distributing VMs

snesreviews

New Member
Jul 7, 2008
26
0
1
Hi Again,

I want to live in a world where I can distribute VMs across dozens of machines, ideally with the same starting image. This is fairly complex and I am terrible at describing things so I will try and explain this in bullet points:


  1. I want the same VM image to work out of the box on different machines, ideally without having to open up a VNC console
  2. All of the guests should use DHCP, and will send their hostname upon registration
  3. The hostnames should all be in similar format. i.e. the first RH4 box on machine 1 should be rh4-01, but on machine 2, it should be rh4-02 etc.
  4. The mac addresses of equivalent VM guests on different hostnames should all be different, but remain static upon installation.
The network issue is the biggie. If I could somehow pass some information from the host to the guest (mapping a directory on the host as a device to the guest?), these issues could all be resolved.

Do you have any ideas on how this could be done or are there some upcoming features that could help with engineering a solution for this?

Thanks again!
 
how?? and what??

  1. I want the same VM image to work out of the box on different machines,
    Use VMWARE WS or Virtualbox for that - or make sujre that fully-virtualized Systems run on the same hardware under the same kernel on all maschines
    ideally without having to open up a VNC console
    how do you want to connect??
    maybe by opening a virtualbox, or?
  2. All of the guests should use DHCP, and will send their hostname upon registration
    just change their MAC-Adress and adjust their hostname, then use fixed adresses in your DHCP-Server
  3. The hostnames should all be in similar format. i.e. the first RH4 box on machine 1 should be rh4-01, but on machine 2, it should be rh4-02 etc.
    Do it manually (or with a small skript) like I said before
  4. The mac addresses of equivalent VM guests on different hostnames should all be different, but remain static upon installation.
    What installation??
    Do it manually like I said before
 
Proxmox, anyone?

I'm not sure what VMware would accomplish here which proxmox can't (bear in mind none of my guests are windows) - from what I have experienced so far, proxmox is extremely powerful and convenient. VMware would run into the same problem with hostnames in the guestOS, and the kvm images produced by proxmox already work out of the box on different hardware. The only outstanding problems I have found in accomplishing my dream solution are those relating to the network... which I had a little think about:

To re-emphasize what I want, here's an example:

Server 01: proxmox-01
Guest 01 hostname: ubuntu-01
Guest 02 hostname: rh-01
Guest 03 hostname: suse-01

Server 02: proxmox-02
Guest 01 hostname: ubuntu-02
Guest 02 hostname: rh-02
Guest 03 hostname: suse-02

Server 03: proxmox-03
Guest 01 hostname: ubuntu-03
Guest 02 hostname: rh-03
Guest 03 hostname: suse-03

Bearing in mind we can statically set mac addresses for each guest at will, so we could make the last 2 characters of the mac translate to the host number. E.g. for proxmox-02, MAC = xx:xx:xx:xx:xx:02.

Now, assume each guest has a script on startup which will set the hostname according to the last two characters of the mac address before registering it through DHCP. This way, the only setup required when moving server is a script to change those macs accordingly in the conf file, and to change the proxmox hostname...

I think this will work, even if it is a little bit twisted, but is there a nicer way to do this in any upcoming releases which require less thought?

Thanks!
 
Why don't you create an openvz template? It is much faster, lightweight, and finally solves what you want (you assign an IP when you create the VM).

- Dietmar
 
Thanks Dietmar - I'll have a look at openvz to see if it can resolve the linux side of things (I haven't tried it yet) - but I wanted to run solaris distributions as well, so I think I still need to use KVM for that. Is openvz the line you guys are moving toward where possible?
 
Thanks Dietmar - I'll have a look at openvz to see if it can resolve the linux side of things (I haven't tried it yet) - but I wanted to run solaris distributions as well, so I think I still need to use KVM for that. Is openvz the line you guys are moving toward where possible?

Yes, OpenVZ is our preferred way to run Linux and currently all our certified virtual appliances run as OpenVZ containers.
 
OK - after a bit of fighting, I now have an openvz release set up. Unfortunately, this still seems to report using the 2.6.24 kernel which comes with proxmox. Upon further investigation, I found this: http://wiki.openvz.org/Features.

This makes me a little bit nervous - this means that regardless of the openvz container type, it will always, at the core, use the proxmox kernel. I would prefer to keep the virtualised kernel where possible to get as close to the emulated system as possible, so I think I will stick with KVM where I can for now. On the upside though, openvz managed to load RH8 where KVM couldn't so I may have little choice on that front!
 
lol - well it's cool, yes... but it ultimately means that I'm not running a fully virtualised OS so if I build and test something with the proxmox kernel, there is a bigger chance it will core on the machine it's actually intended for (I'm planning on using this as a virtualised build/qa farm).

KVM doesn't seem to like the SUSE install disks though so I may have to go down the openvz route there too :(
 
(Open)VZ was originally designed with web hosting in mind. Providing VPSes are very nearly bare metal speed.

If you're trying to do something vmware-like and compile things for other Linux kernel versions and Solaris and Windows and all that, KVM is certainly more what you're looking for.

I believe the next release of Proxmox VE is supposed to update KVM so maybe you'll have better luck.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!