[pve-devel] lxc : disk file names, should'nt we use same pattern than qemu ?

Alexandre DERUMIER aderumier at odiso.com
Thu Jul 30 12:29:34 CEST 2015


> >>do we really need to have rootfs or ext4fs in filename ? 

>>Yes. Else people can use it for KVM (we need a way to avoid that).

so, using ct- as prefix instead vm- could prevent that right ?

ct-100-1.raw 



----- Mail original -----
De: "dietmar" <dietmar at proxmox.com>
À: "aderumier" <aderumier at odiso.com>
Cc: "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Jeudi 30 Juillet 2015 11:11:49
Objet: Re: [pve-devel] lxc : disk file names, should'nt we use same pattern than qemu ?

> >>do we really need to have rootfs or ext4fs in filename ? 

Yes. Else people can use it for KVM (we need a way to avoid that). 

> for example : lxc.rootfs = .../100/vm-100-rootfs.raw 
> 
> 
> if not, why not something generic like ct-$vmid-$i.raw ? 
> 
> (ct for container, vm for vms) 
> 
> lxc.rootfs = .../100/ct-100-1.raw 
> 
> 
> 
> 
> 
> Also, 
> I see that currently we put loop,nbd in config with path 
> 
> lxc.rootfs = loop:/var/lib/vz/images/100/ct-100-1.raw 
> 
> I think we should do like in qemu 
> 
> pve.volid = storeid:100/ct-100-1.raw 

lxc needs that. But we store this information with 'pve.volid'. 

> Then generate the path , activate_volumes with mounting loop,rbd at ct start. 

We already do this: pve.volid ==> pve.volid 

> I think we can't use this syntax directly because lxc_start need full path for 
> lxc.rootfs or lxc.mount.entry ? 

yes 

> Maybe can we use 
> pve.volid1 = storeid:mountpoint 
> pve.volid2 = storeid:mountpoint 
> pve.volid3 = storeid:mountpoint 
> 
> to store config, 
> the at vm_start, 

we update when you change 'pve.volid'. It is not really necessary to 
do it at start time. 



More information about the pve-devel mailing list