Skip to content
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

Duplicated disk references on Imported VMs when disk names contain whitespaces #6664

Closed
3 tasks
OpenNebulaSupport opened this issue Jul 23, 2024 · 0 comments
Closed
3 tasks

Comments

@OpenNebulaSupport
Copy link
Collaborator

Description
When importing a POWEROFF from a vCenter cluster, if the VM references a disk that contains whitespaces on its name, for example New Virtual Machine 2.vmdk, the VM will fail to boot afterwards with the following error

Tue Jul 23 15:02:56 2024 [Z0][VMM][E]: DEPLOY: ERROR: deploy: Deploy of VM 2 on vCenter cluster opn-cluster with /var/lib/one/vms/2/deployment.1 failed due to "GenericVmConfigFault: Failed to lock the file"on attempt #0. ERROR: deploy: Deploy of VM 2 on vCenter cluster opn-cluster with /var/lib/one/vms/2/deployment.1 failed due to "GenericVmConfigFault: Failed to lock the file"on attempt #1. ERROR: deploy: Deploy of VM 2 on vCenter cluster opn-cluster with /var/lib/one/vms/2/deployment.1 failed due to "GenericVmConfigFault: Failed to lock the file"on attempt #2.

The problem could be coming from the import process. When importing a VM with the following disk information on the VMX

scsi0.present = "TRUE"
scsi0:0.deviceType = "scsi-hardDisk"
scsi0:0.fileName = "New Virtual Machine 2.vmdk"
sched.scsi0:0.shares = "normal"
sched.scsi0:0.throughputCap = "off"
scsi0:0.present = "TRUE"

It yields a disk entry with the following SOURCE = “New%20Virtual%20Machine%202/New%20Virtual%20Machine%202.vmdk”

When resuming the VM a sync operation that tries to sync the OpenNebula XML with the vCenter VMX, the same disk entry gets added again

scsi0.virtualDev = "pvscsi"
scsi0.present = "TRUE"
scsi0:0.deviceType = "scsi-hardDisk"
scsi0:0.fileName = "New Virtual Machine 2.vmdk"
sched.scsi0:0.shares = "normal"
sched.scsi0:0.throughputCap = "off"
scsi0:0.present = "TRUE"
scsi0:1.deviceType = "scsi-hardDisk"
scsi0:1.fileName = "New Virtual Machine 2.vmdk"
scsi0:1.present = "TRUE"
scsi0:1.redo = ""
scsi0:0.redo = "

Resulting in a VM with a single disk definition in OpenNebula and a duplicated disk reference on vCenter.

To Reproduce

  • Import a VM that uses a disk containing whitespaces
  • Resume the VM

Expected behavior
The VM VMX should not be updated with duplicated disk references

Details

  • Version: 6.8

Progress Status

  • Code committed
  • Testing - QA
  • Documentation (Release notes - resolved issues, compatibility, known issues)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants