... as in "most stoopid"!
So, here is the situation :
Client was just delivered with an Hyper-V cluster for his web services; once he tries to setup Apache & Co on his CentOS instances, figures that 50GB originally requested is not enough, wants to change it to 120GB...
So, virtual machines running linux with LVM partition, should be easy right? We might even be able to do it live, no need to shutdown the instance... let's check it out!
I found this little procedure, quite straight-forward, about manipulating LVM partition in a virtual environment :
https://www.rootusers.com/how-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk/
But then I found out that you can only do so if the virtual disk was attached to a SCSI controller; I had a problem here, because the VM was already configured, installed and running via a IDE controller in Hyper-V. Oh well, the client didn't have any issue with us stopping the VMs in the beginning, we could address this issue later.
So I followed the procedure and expended the VHDX file from 50GB to 128 (I always prefer to do things at the power of 2 in the binary realm).
This morning I decided to do a test run on an Hyper-V cluster we use for testing; created a VM, change from IDE controller to SCSI, installed CentOS without a fuss. Then, when I tried to boot the VM by itself :
WTS?
Again, a little search and I find the answer :
https://blogs.msdn.microsoft.com/virtual_pc_guy/2009/12/01/why-hyper-v-cannot-boot-off-of-scsi-disks-and-why-you-should-not-care/
Sorry Ben, but I do care : the TechNet link states that "Starting in Windows Server® 2012 R2, Hyper-V delivers the ability to expand or shrink the size of a virtual hard disk while the virtual machine is still running." but a VM on Hyper-V cannot boot off of a SCSI disks?
As we say in French, Je ne sais plus sur quel pied danser...
So, here is the situation :
Client was just delivered with an Hyper-V cluster for his web services; once he tries to setup Apache & Co on his CentOS instances, figures that 50GB originally requested is not enough, wants to change it to 120GB...
So, virtual machines running linux with LVM partition, should be easy right? We might even be able to do it live, no need to shutdown the instance... let's check it out!
I found this little procedure, quite straight-forward, about manipulating LVM partition in a virtual environment :
https://www.rootusers.com/how-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk/
But then I found out that you can only do so if the virtual disk was attached to a SCSI controller; I had a problem here, because the VM was already configured, installed and running via a IDE controller in Hyper-V. Oh well, the client didn't have any issue with us stopping the VMs in the beginning, we could address this issue later.
[ https://technet.microsoft.com/en-us/library/dn282286(v=ws.11).aspx ]
- VHDX - the ability to expand and shrink virtual hard disks is exclusive to virtual hard disks that are using the .vhdx file format. Online resizing is supported for VHDX disk types, including fixed, differencing, and dynamic disks. Virtual hard disks that use the .vhd file format are not supported for resizing operations.
- SCSI controller - the ability to expand or shrink the capacity of a virtual hard disk is exclusive to .vhdx files that are attached to a SCSI controller. VHDX files that are attached to an IDE controller are not supported.
So I followed the procedure and expended the VHDX file from 50GB to 128 (I always prefer to do things at the power of 2 in the binary realm).
This morning I decided to do a test run on an Hyper-V cluster we use for testing; created a VM, change from IDE controller to SCSI, installed CentOS without a fuss. Then, when I tried to boot the VM by itself :
WTS?
Again, a little search and I find the answer :
https://blogs.msdn.microsoft.com/virtual_pc_guy/2009/12/01/why-hyper-v-cannot-boot-off-of-scsi-disks-and-why-you-should-not-care/
Sorry Ben, but I do care : the TechNet link states that "Starting in Windows Server® 2012 R2, Hyper-V delivers the ability to expand or shrink the size of a virtual hard disk while the virtual machine is still running." but a VM on Hyper-V cannot boot off of a SCSI disks?
As we say in French, Je ne sais plus sur quel pied danser...