-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
help request: Changing the size of a volume in imperitive microvm #315
Comments
The The size option is only used on auto-creation as there is no logic for resizing volumes yet. I wonder at all whether we should ever attempt to do this automatically, given the risk for data loss. I'd accept PRs for growing volumes' file-system, and for logging a warning if a volume should be shrunk. |
I see, thanks for the explanation. For some reason I was under the impression that the volume was supposed to be ephemeral, and that it would be recreated on each build. I makes sense that it would not be possible to resize the volume if that is not the case. In other words, the only way for me to change the size of the volume, would be to delete it from |
I personally have no use-case for ephemeral volumes, I always want to keep my data. Trigger automatic recreation by deleting the volume. 😁 I still think that automatic growing could be a useful feature, so I'm leaving this issue opened. |
I agree that automatic growing would be a useful feature. My use case here was finding out that the default root volume size is not large enough for k3s to work, then failing to increase its size. I have finally cracked the issue of re-creating the volume after deleting it. I'm not sure what my problem was initially, perhaps I was doing some steps out of order. For reference my working steps were:
|
Hello,
I have imperatively deployed a vm using the following command:
nix run .#nixosConfigurations.k3s-microvm-2.config.microvm.deploy.rebuild [email protected] [email protected] -- --use-remote-sudo
I found that the default size for the root volume was too small, so I explicitly set it using
microvm.volumes
. I found that redeploying using the above command seems to do nothing. It will do some work, often it will hang onrefreshing nix database
, but when it completes and I log in to the microvm again, I find that the size of the root volume has not changed.In troubleshooting i have also tried the following:
microvm -l
- this tells me that my machine should be rebuild and rebootedsudo microvm -Ru k3s-microvm-2
but this errors out with a message that no rebuild is necessary, contrarty to the output of-l
/var/lib/microvms/
redeploy host, rebuild withmicrovm.deploy.rebuild
, restart systemd servicedf /
to check the size of the root volume. Sometimes the host key changes, which indicates that the root volume was recreated, but the size always remains the same.The only way I've been able to successfully change the size of the volume is by changing the name of my microvm, and fully redeploying (hence why in these examples the machine is named
k3s-microvm-2
Any advice and recommendations is welcomed! I am about to head out but I can provide my config if necessary. Many thanks!
The text was updated successfully, but these errors were encountered: