Giter Site home page Giter Site logo

Comments (5)

poblin-orange avatar poblin-orange commented on June 17, 2024

recreating the stemcell with the new property to disable bosh micro (unused with cloudstack) reduces the base stemcell size

export BOSH_MICRO_ENABLED=no

Might improve provisioning time ?

from bosh-cloudstack-cpi-release.

dpassante avatar dpassante commented on June 17, 2024

Since VHD is not on a dynamic format, this will have no effect on the VHD size.

from bosh-cloudstack-cpi-release.

dpassante avatar dpassante commented on June 17, 2024

Latest qemu-img version (2.0) available on Ubuntu Trusty is now compatible with XenServer dynamic VHD format.
It also can convert the cloudstack-xen-ubuntu.raw file created by “image_create” stage to VHD without the img => qcow2 => raw conversion.

Dynamic disk type reduces VHD size to 1.2GB.

root@ubuntu-trusty:/DATA# file cloudstack-xen-ubuntu.raw
root.img: x86 boot sector 
root@ubuntu-trusty:/DATA# ls -lh cloudstack-xen-ubuntu.raw
-rw-r--r-- 1 root root 3.1G Aug  9 10:36 cloudstack-xen-ubuntu.raw
root@ubuntu-trusty:/DATA# time qemu-img convert cloudstack-xen-ubuntu.raw -O vpc -o subformat=dynamic stemcell.vhd

real    0m20.341s
user    0m0.219s
sys 0m1.072s
root@ubuntu-trusty:/DATA# ./vhd-util check -n stemcell.vhd 
stemcell.vhd is valid
root@ubuntu-trusty:/DATA# ./vhd-util read -p -n stemcell.vhd 
VHD Footer Summary:
-------------------
Cookie              : conectix
Features            : (0x00000002) <RESV>
File format version : Major: 1, Minor: 0
Data offset         : 512
Timestamp           : Tue Aug  9 10:37:03 2016
Creator Application : 'qemu'
Creator version     : Major: 5, Minor: 3
Creator OS          : Windows
Original disk size  : 3096 MB (3246759936 Bytes)
Current disk size   : 3096 MB (3246759936 Bytes)
Geometry            : Cyl: 6291, Hds: 16, Sctrs: 63
                    : = 3096 MB (3246759936 Bytes)
Disk type           : Dynamic hard disk
Checksum            : 0xffffecc9|0xffffecc9 (Good!)
UUID                : 21f9840f-874d-4133-9642-18503e91c9c5
Saved state         : No
Hidden              : 0

VHD Header Summary:
-------------------
Cookie              : cxsparse
Data offset (unusd) : 18446744073709
Table offset        : 1536
Header version      : 0x00010000
Max BAT size        : 1549
Block size          : 2097152 (2 MB)
Parent name         : 
Parent UUID         : 00000000-0000-0000-0000-000000000000
Parent timestamp    : Sat Jan  1 01:00:00 2000
Checksum            : 0xfffff464|0xfffff464 (Good!)

root@ubuntu-trusty:/DATA# ls -lh stemcell.vhd 
-rw-r--r-- 1 root root 1.2G Aug  9 10:37 stemcell.vhd

The Azure "prepare_vhd_image_stemcell" apply.sh with dynamic vhd mode and bzip2 should work for Cloudstack stemcells.

#!/usr/bin/env bash
set -e

base_dir=$(readlink -nf $(dirname $0)/../..)
source $base_dir/lib/prelude_apply.bash

rm -f $work/root.vhd

# Convert raw to dynamic vhd
qemu-img convert -O vpc -o subformat=dynamic $work/${stemcell_image_name} $work/root.vhd

pushd $work
tar zcf stemcell/image root.vhd
bzip2 -c root.vhd > stemcell/image
popd

from bosh-cloudstack-cpi-release.

poblin-orange avatar poblin-orange commented on June 17, 2024

thks.
here the result for stemcell 3262.5

+ qemu-img convert -O vpc -o subformat=dynamic /mnt/stemcells/cloudstack/xen/ubuntu/work/work/cloudstack-xen-ubuntu.raw /mnt/stemcells/cloudstack/xen/ubuntu/work/work/root.vhd                                                                                                                                                                 
+ sudo apt-get install -y faketime                                                                                                                                      
Reading package lists...                                                                                                                                                
Building dependency tree...                                                                                                                                             
Reading state information...                                                                                                                                            
faketime is already the newest version.                                                                                                                                 
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.                                                                                                          
+ vhd-util check -n /mnt/stemcells/cloudstack/xen/ubuntu/work/work/root.vhd                                                                                             
/mnt/stemcells/cloudstack/xen/ubuntu/work/work/root.vhd is valid                                                                                                        
+ vhd-util read -p -n /mnt/stemcells/cloudstack/xen/ubuntu/work/work/root.vhd                                                                                           
VHD Footer Summary:                                                                                                                                                     
-------------------                                                                                                                                                     
Cookie              : conectix                                                                                                                                          
Features            : (0x00000002) <RESV>                                                                                                                               
File format version : Major: 1, Minor: 0                                                                                                                                
Data offset         : 512                                                                                                                                               
Timestamp           : Fri Aug 12 10:41:02 2016                                                                                                                          
Creator Application : 'qemu'                                                                                                                                            
Creator version     : Major: 5, Minor: 3                                                                                                                                
Creator OS          : Windows                                                                                                                                           
Original disk size  : 3072 MB (3221471232 Bytes)                                                                                                                        
Current disk size   : 3072 MB (3221471232 Bytes)                                                                                                                        
Geometry            : Cyl: 6242, Hds: 16, Sctrs: 63                                                                                                                     
                    : = 3072 MB (3221471232 Bytes)                                                                                                                      
Disk type           : Dynamic hard disk                                                                                                                                 
Checksum            : 0xffffea87|0xffffea87 (Good!)                                                                                                                     
UUID                : f8c4d887-0d88-4ae7-aad7-2698bcd7f380                                                                                                              
Saved state         : No                                                                                                                                                
Hidden              : 0                                                                                                                                                 

VHD Header Summary:
-------------------
Cookie              : cxsparse
Data offset (unusd) : 18446744073709
Table offset        : 1536          
Header version      : 0x00010000    
Max BAT size        : 1537          
Block size          : 2097152 (2 MB)
Parent name         :               
Parent UUID         : 00000000-0000-0000-0000-000000000000
Parent timestamp    : Sat Jan  1 00:00:00 2000            
Checksum            : 0xfffff470|0xfffff470 (Good!)       

+ ls -lh /mnt/stemcells/cloudstack/xen/ubuntu/work/work/root.vhd
-rw-r--r-- 1 root root 1.2G Aug 12 10:41 /mnt/stemcells/cloudstack/xen/ubuntu/work/work/root.vhd
+ pushd /mnt/stemcells/cloudstack/xen/ubuntu/work/work                                          
/mnt/stemcells/cloudstack/xen/ubuntu/work/work /opt/bosh                                        
+ bzip2 -c root.vhd                                                                             
+ popd                                                                                          

from bosh-cloudstack-cpi-release.

poblin-orange avatar poblin-orange commented on June 17, 2024

Please find the 3262.5 stemcell here.
http://orange-candidate-cloudstack-xen-stemcell.s3.amazonaws.com/bosh-stemcell/cloudstack/bosh-stemcell-3262.5-cloudstack-xen-ubuntu-trusty-go_agent.tgz

If you see the expected provisioning time progress, ill close this issue

from bosh-cloudstack-cpi-release.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.