-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] CRC not respecing disk-size config for hyper-v #3496
Comments
@gshipley Can you please provide the o/p of
|
Log file |
In the log file I can see following we have to check if that windows-11 specific issue because on linux I tried same and able to get disk expanded to 512GB.
|
@anjannath @jsliacan Can you folks try it on win-10 or in win-11 (if have one)? |
Will give it a try manually, but below is the test from this release on win10 baremetal machine (see the case that I isolated). It seemed to have worked. Not sure if we have access to Win11 atm. </testcase>
<testcase name="[It] podman preset basic use unset preset in config [podman-preset]" classname="Test Suite" status="passed" time="0.0644078"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use default values setup CRC [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="5.0212578"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use default values start CRC [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="675.978582"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use default values check VM's memory size [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="0.0954754"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use default values check VM's number of cpus [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="0.0649705"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use default values check VM's disk size [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="0.0659444"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use default values stop CRC [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="21.2395566"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use custom values start CRC [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="655.5058403"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use custom values check VM's memory size [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="0.0777708"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use custom values check VM's number of cpus [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="0.0613301"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use custom values check VM's disk size [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="0.0669636"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use custom values stop CRC [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="20.800499"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use flawed values start CRC with sub-minimum memory [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="0.0622494"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use flawed values start CRC with sub-minimum cpus [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="0.076805"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use flawed values start CRC with smaller disk [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="6.5156013999999995"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use flawed values start CRC with sub-minimum disk [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="0.0616362"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use default values again start CRC [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="517.8281093"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use default values again check VM's memory size [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="0.0823113"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use default values again check VM's number of cpus [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="0.0591255"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use default values again check VM's disk size [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="0.0667019"/>
<testcase name="[It] vary VM parameters: memory cpus, disk use default values again clean up [openshift-preset, vm-resize]" classname="Test Suite" status="passed" time="26.3750404"/>
</testsuite> |
There is some platform-specific code involved in disk resizing, the log you pasted is the generic code common to all 3 platforms. On Windows, this code needs to run before trying to resize the disk: crc/pkg/drivers/hyperv/hyperv_windows.go Lines 73 to 80 in 3291661
|
The
So the value of
and growing the filesystem inside the VM..
|
we can investigate and work on making the |
I just tested this on macOS, and the disk is resized even for the first start/fresh instance creation, so this is a Windows-specific issue. |
On windows 10, and now on windows 11, the disk size has never worked for me (first time or restarts) Kind of forgot about it as my init workflow just does it for me so never retried to see if CRC fixed it. This is a powershell script, you can put into a file like
I will retry today the newest crc double start to see if its working (Windows 11) |
I ran this script with the crc deleted and it still fails.
As you noted above the first time, nothing happens to resize, the line creation of the disk should probably pass the requested size (i assume 'Hyper-V\New-VM could take a disk param ?)
I snipped a bunch of stuff... but same log snipped from the second try - the instance is stopped, the size changed, crc started again and after second start it still says
log shows ...
I tried manually stop; resize; start using powershell |
…ing hyper-v driver in case of hyper-v driver the config value of disk-size was not applied to the VM disk image during creation of the instance this adds a new private helper resizeDisk and calls it during creation as well as vm config Update during start
General information
crc setup
before starting it (Yes/No)? YesCRC version
CRC status
This is after manually editing the vm setting in hyperv manager, otherwise disk usage will always show 32gb
CRC config
Host Operating System
Steps to reproduce
Expected
Virtual disk size matches the config value.
Actual
Disk size always remains at 32gb. Even after stop, cleanup, setup, start etc. In order to change the virtual disk size, as seen in above output, I need to stop the vm (crc stop) and then manually edit the disk size in hyper-v manager.
The text was updated successfully, but these errors were encountered: