[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libvir] Some doubts for OpenVZ



On Fri, Jul 06, 2007 at 04:09:40PM +0530, Shuveb Hussain wrote:
> Hi,
> 
> I have some basic doubts.
> 
> 1. The OpenVZ system has one config file per VM which contains all the
> VM's parameters. So, during libvirt start-up, these files can be read,
> or openvz utils can be popened() to get information regarding these VMs.
> Is there a necessity to have per-vm config files in libvirt for the
> OpenVZ VMs? I understand UUIDs are used to identify each of the running
> VMs. Where will these values persist? Can I do away with UUIDs for
> OpenVZ and avoid the libvirt specific config file?

No, we definitely need UUIDs. If there's no way to associate extra metadata
with Open VZ configs, then probably best to try and come up with a way to
map a UUID to a OpenVZ guest via an extranal file. At simplest I guess you
could have a directly containing 1 file per VM, and each file merely contain
the 16 byte UUID. Or maybe there's a way to deterministically generate a
UUID based on some other piece of data. eg, take a 14 byte UUID for the host
and add in 2 bytes per VM from its VPS ID to form a 16 byte UUID for the VM.
That might allow you to form a UUID without needing to store it anywhere.

> 2. In OpenVZ, there is just a VPS ID/Name. There is no temporary
> reference like 'id'. For example QEMU is using the process PID. There is
> no such notion for OpenVZ. In that case, can I make 'name' and 'id' same
> for OpenVZ?

There is no defined rule that says 'id' has to be temporary, so I think
you can probably use 'VPS ID' as your 'id' value. Basically the difference
between 'id', 'name' and 'uuid' is all todo with uniqueness

  - ID is required to be unique amongst any active virtual machines
    on a single host
  - Name is required to be unique amongst any active or inactive virtual
    machines on a single host
  - UUID is required to be unique amongst all virtual machines in the 
    world

Now it sounds like 'VPS ID' is more unique than neccessary, but that's not
a problem. 

Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]