Any help on this would be appreciated I believe I have followed everything correctly.
I have created my own template from an ISO and installed this all is working fine I can deploy this.
As part of the install I installed the opennebula contextulization deb package and this allows the VM to gain an IP address from Opennebula which is great.
However if I deploy from this template and increase the disk size it is not reflected in df -h or fdisk -l
Is there something that needs to be done manually to modify the context scripts specific to the system?
If so how would I go about that.
Ideally it would be good if when we increased the VM’s disk size it was reflected in the VM.
OpenNebula version, front-end host OS and version, Hypervisor OS and version, addon-context-linux version, guest OS is debian but… version , what datastore drivers (TM_MADs) are in use, etc?
There are a lot of places where the resize procedure could brake - libvirt incompatibility, datastore driver incompatibility, contextualization incompatibility with the guest OS, bugs, etc…
Also, does the images from the OpenNebula marketplace do resize properly on same setup/datastore?
Hello thanks for the response , of course here is the info.
I am running a lab setup 2 x kvm nodes built on Ubuntu 16.04.
Sunstone is installed on one of the nodes.
Opennebula version is 5.4
Guest os is Debian 7
I have a couple of datastores setup for testing, local storage on each node using ssh transfer mode and an nfs datastores.
The marketplace images work correctly so I think all pre requosists etc. Are in place and it’s probably something I am missing on the guest VM
The context packages have been installed via apt-get and have pulled the latest version
The network context and other contexts (e.g. I can set the root password on boot) all work fine it’s just the disk re-size which isn’t working, I can see errors on the console when it boots however they go way to quick for me to see what they are.
I think that in your case you should try running the resize script /etc/one-context.d/loc-05-grow-rootfs manually (as root) and see where it breaks. Hopefully there is a missing package dependency or something like that.
Looks like the script is failing as it cannot locate the device:
However its looking for the wrong device:
root@observium ~# bash /etc/one-context.d/loc-05-grow-rootfs
FAILED: /dev/dm-: does not exist
resize2fs 1.42.12 (29-Aug-2014)
The filesystem is already 4456448 (4k) blocks long. Nothing to do!
I was also setup openenbula 5.4.XX version with centos then faced issues with disk resize. found that its a bug in opennebula please go through on below link
Could you provide the output of mount, cat /etc/mtab, cat /proc/mountsand cat /etc/fstab?
It looks like that LVM is not properly detected and it is branching to a wrong code path.
Also, which version/archive/package of one-context you are using?