Skip to content

Changed VolumeMode to PersistentVolumeBlock#1094

Draft
Deblazz wants to merge 43 commits into
netgroup-polito:masterfrom
Deblazz:feature_vdd-fs-to-block
Draft

Changed VolumeMode to PersistentVolumeBlock#1094
Deblazz wants to merge 43 commits into
netgroup-polito:masterfrom
Deblazz:feature_vdd-fs-to-block

Conversation

@Deblazz

@Deblazz Deblazz commented Apr 16, 2026

Copy link
Copy Markdown
Collaborator

Description

VolumeMode of VMs virtual disks migrated from Filesystem to Block type, to have less layers of abstraction between the running VM and ceph. Also, added the VMDataVolumeStorageClassName function to explicitly forge a StorageClassName used for the DataVolume.

How Has This Been Tested?

This configuration has been functionally tested by running a VM successfully and syntax checked by using make fmt and make vet.

@Deblazz Deblazz requested a review from a team as a code owner April 16, 2026 09:35
@kingmakerbot

Copy link
Copy Markdown
Collaborator

Hi @Deblazz. Thanks for your PR.

I am @kingmakerbot.
You can interact with me issuing a slash command in the first line of a comment.
Currently, I understand the following commands:

  • /rebase: Rebase this PR onto the master branch
  • /merge: Merge this PR into the master branch
  • /hold: Adds hold label to prevent merging with /merge
  • /unhold: Removes the hold label to allow merging with /merge
  • /deploy-staging: Deploy a staging environment to test this PR (the build-all flag enables user environments building)
  • /undeploy-staging: Manually undeploy the staging environment

Make sure this PR appears in the CrownLabs changelog, adding one of the following labels:

  • kind/breaking: 💥 Breaking Change
  • kind/feature: 🚀 New Feature
  • kind/bug: 🐛 Bug Fix
  • kind/cleanup: 🧹 Code Refactoring
  • kind/docs: 📝 Documentation

Co-authored-by: abellonioandrea <s343884@studenti.polito.it>
Co-authored-by: iliy27 <s347640@studenti.polito.it>
@Deblazz Deblazz force-pushed the feature_vdd-fs-to-block branch from 7584d29 to eceffde Compare April 16, 2026 09:38
@abellonioandrea

Copy link
Copy Markdown
Collaborator

/deploy-staging

@kingmakerbot

Copy link
Copy Markdown
Collaborator

Your staging environment has been correctly deployed/updated!
Available here: Frontend, Qlkube
Operators: add the crownlabs.polito.it/operator-selector=staging-1094 label to your tenant.

@AleTopp

AleTopp commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

@Deblazz @abellonioandrea Sorry, I think I lost something, didn't you say on Tuesday that changing to Block was increasing by 100% the startup time?

@abellonioandrea

Copy link
Copy Markdown
Collaborator

We are doing some tests, since with a loop disk (so that is not reflecting correctly the reality) seems that the time needed is higher. In any case, another point of our project is to allow Kubevirt VMs to be live migrated, and it is only possibile with the volume mode set to block and not with filesystem.

@AleTopp AleTopp marked this pull request as draft April 20, 2026 17:01
@AleTopp AleTopp added the kind/feature New feature or request label Apr 22, 2026
Comment thread operators/pkg/forge/virtualmachines.go Outdated
@QcFe

QcFe commented Apr 28, 2026

Copy link
Copy Markdown
Collaborator

I'd say this can be almost merged, would just ask to write a brief test for your new method.
When you're done don't forget to set this PR to ready :)

@abellonioandrea

Copy link
Copy Markdown
Collaborator

I have just added an annotation, and now live migration it's working.
We will wrote some tests!

Comment thread operators/pkg/forge/virtualmachines.go Outdated
Comment on lines +63 to +64
Annotations: map[string]string{
PodBridgeNetworkLiveMigrationAnnotation: podBridgeNetworkLiveMigrationValue,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're theoretically not using bridge mode, is this really needed?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this, the live migration is not working
To be precise in the virtual machine I am getting this error:
cannot migrate VMI which does not use masquerade, bridge with kubevirt.io/allow-pod-bridge-network-live-migration VM annotation or a migratable plugin to connect to the pod network

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok but we're supposed to be using masquerade actually...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay I didn't know, so it is only a problem related to the fact we are running vms manually in KubeVirt without the crownlabs infrastructure

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will revert the changes

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please check just in case? I added self-edit on your tenant ns.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm that on a virtual machine in my tenant namespace I see the same error as before for the live migration enable

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that actually VMS are not in Masquerade but are in Bridge mode.

Interfaces: []virtv1.Interface{*virtv1.DefaultBridgeNetworkInterface()},

DefaultBridgeNetworkInterface must be changed to DefaultMasqueradeNetworkInterface.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this explains several things. I'd say it's better to discuss this tonight at the weekly in order to understand together if there could be further implications by switching this...

@AleTopp AleTopp linked an issue May 11, 2026 that may be closed by this pull request
@pull-request-size pull-request-size Bot added size/M and removed size/S labels May 19, 2026
@abellonioandrea

Copy link
Copy Markdown
Collaborator

/deploy-staging

@kingmakerbot

Copy link
Copy Markdown
Collaborator

Your staging environment has been correctly deployed.
You can access the application frontend and Qlkube APIs using the following URLs:

chaging working modality from pvc copy in dv to use pmp so the pvc is mirrored
@abellonioandrea

Copy link
Copy Markdown
Collaborator

/deploy-staging

@kingmakerbot

Copy link
Copy Markdown
Collaborator

Your staging environment has been correctly deployed.
You can access the application frontend and Qlkube APIs using the following URLs:

@Deblazz

Deblazz commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator Author

/deploy-staging

@kingmakerbot

Copy link
Copy Markdown
Collaborator

Your staging environment has been correctly deployed.
You can access the application frontend and Qlkube APIs using the following URLs:

@Deblazz

Deblazz commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator Author

/deploy-staging

@kingmakerbot

Copy link
Copy Markdown
Collaborator

Your staging environment has been correctly deployed.
You can access the application frontend and Qlkube APIs using the following URLs:

@Deblazz

Deblazz commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator Author

/deploy-staging

@kingmakerbot

Copy link
Copy Markdown
Collaborator

Your staging environment has been correctly deployed.
You can access the application frontend and Qlkube APIs using the following URLs:

@Deblazz

Deblazz commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator Author

/deploy-staging

@kingmakerbot

Copy link
Copy Markdown
Collaborator

Your staging environment has been correctly deployed.
You can access the application frontend and Qlkube APIs using the following URLs:

@Deblazz

Deblazz commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator Author

/deploy-staging

@kingmakerbot

Copy link
Copy Markdown
Collaborator

Your staging environment has been correctly deployed.
You can access the application frontend and Qlkube APIs using the following URLs:

@Deblazz

Deblazz commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator Author

/deploy-staging

@kingmakerbot

Copy link
Copy Markdown
Collaborator

Your staging environment has been correctly deployed.
You can access the application frontend and Qlkube APIs using the following URLs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cloudprog This is a specification for a Cloud Programming course project kind/feature New feature or request sig/api sig/ui size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] LIVE MIGRATION

5 participants