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

Alexandre DERUMIER aderumier at odiso.com
Thu Jul 30 10:59:14 CEST 2015


>>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
>>
>>lxc.rootfs = storeid:100/ct-100-1.raw
>>Then generate the path , activate_volumes with mounting loop,rbd  at ct start.
>>
>>
>>I think we can't use this syntax directly because lxc_start need full path for lxc.rootfs or lxc.mount.entry ?
>>
>>Maybe can we use 
>>pve.volid1 = storeid:mountpoint
>>pve.volid2 = storeid:mountpoint
>>pve.volid3 = storeid:mountpoint
>>
>>to store config,
>>the at vm_start, update lxc.rootfs && lxc.mount.entry  ?


Oh, I didn't that It's almost what we are doing currently ?

pve.volid : storeid:volname
lxc.rootfs: loop:/var/lib/vz/images/128/vm-128-rootfs.raw



So, it coud be easy to extend it to manage multiple disk

pve.volid1 : storeid:volname:/
lxc.rootfs: loop:/var/lib/vz/images/128/vm-128-rootfs.raw

pve.volid2 : storeid:volname:/home
lxc.mount.entry: /home ....





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

>>vm-$vmid-rootfs-$i.raw 
>> 
>>or 
>> 
>>vm-$vmid-ext4fs-$i.raw 
>> 
>>or 
>> 
>>vm-$vmid-lxc-$i.raw 
>> 
>>? 



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

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 

lxc.rootfs = storeid:100/ct-100-1.raw 
Then generate the path , activate_volumes with mounting loop,rbd at ct start. 


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

Maybe can we use 
pve.volid1 = storeid:mountpoint 
pve.volid2 = storeid:mountpoint 
pve.volid3 = storeid:mountpoint 

to store config, 
the at vm_start, update lxc.rootfs && lxc.mount.entry ? 









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

> On July 30, 2015 at 9:18 AM Alexandre DERUMIER <aderumier at odiso.com> wrote: 
> 
> 
> Currently for lxc, 
> 
> we create root disk with vm-$vmid-rootfs.raw. 
> 
> I'm thinking if we want to add multiple disk support, with different mount 
> points, 
> 
> Could be use same format than qemu 
> 
> vm-$vmid-disk-$i 
> 
> Like this, we could re-use easily PVE::Storage. 

I would like have different names for kvm and lxc images: 

vm-$vmid-rootfs-$i.raw 

or 

vm-$vmid-ext4fs-$i.raw 

or 

vm-$vmid-lxc-$i.raw 

? 
_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 



More information about the pve-devel mailing list