multipass icon indicating copy to clipboard operation
multipass copied to clipboard

File lock error

Open vishaldhiman86 opened this issue 1 year ago • 6 comments

Describe the bug launch failed: Cannot get image info: qemu-img failed (Process returned exit code: 1) with output: qemu-img: Could not open '/var/snap/multipass/common/data/multipassd/vault/instances/Vcasa67011/root.qcow2': Failed to get shared "write" lock Is another process using the image [/var/snap/multipass/common/data/multipassd/vault/instances/Vcasa67011/root.qcow2]?

To Reproduce How, and what happened?

  1. multipass launch --name Vcasa307300 --cpus 1 --memory 1G --disk 12G --network name=br0,mode=manual,mac=22:22:32:99:10:0A --cloud-init cloud-init_Vcasa307300.yaml file:///root/convert/root.qcow2

Expected behavior It should launch the VM

Logs Please provide logs from the daemon, see accessing logs on where to find them on your platform.

Additional info

  • OS: ubuntu22.04
  • multipass version multipass 1.15.0-dev.306+gfa2b29055
  • multipass info
  • multipass get local.driver qemu

Additional context Add any other context about the problem here.

vishaldhiman86 avatar Sep 21 '24 18:09 vishaldhiman86

Can someone please check it, I need to fix this quickly Already deployed too much VMs , but getting this error for some vm

vishaldhiman86 avatar Sep 21 '24 18:09 vishaldhiman86

@vishaldhiman86 Thanks for reporting this.

Already deployed too much VMs , but getting this error for some vm

Do you mean the very same launch command multipass launch --name Vcasa307300 --cpus 1 --memory 1G --disk 12G --network name=br0,mode=manual,mac=22:22:32:99:10:0A --cloud-init cloud-init_Vcasa307300.yaml file:///root/convert/root.qcow2 succeeded sometimes?

Anyway, the error message suggests another process is using the image file in the VM Vcasa67011 folder. Can you try to find out which process is accessing it by running sudo lsof /var/snap/multipass/common/data/multipassd/vault/instances/Vcasa67011/root.qcow2?

georgeliao avatar Sep 23 '24 08:09 georgeliao

Yes, another process is using this. But if you can see the command which I have executed, there no reference given for that /var/snap/multipass/common/data/multipassd/vault/instances/Vcasa67011/root.qcow2

vishaldhiman86 avatar Sep 24 '24 03:09 vishaldhiman86

@vishaldhiman86 Then can you share more info about the exact behavior of that command? Is that behavior arbitrary? Did you succeed sometimes? In the case of this particular failure, which process is using that? Will closing that process make a difference?

georgeliao avatar Sep 24 '24 10:09 georgeliao

I am deploying multiple hostname using this command with same image i.e. file:///root/convert/root.qcow2 multipass launch --name $HOSTNAME--cpus 1 --memory 1G --disk 12G --network name=br0,mode=manual,mac=22:22:32:99:10:0A --cloud-init cloud-init_Vcasa307300.yaml file:///root/convert/root.qcow2

I have 50 hostnames that I was deploying with image file:///root/convert/root.qcow2 and some of them failed due to the error I mentioned earlier

After that I chose the image from the existing deployed VM eg: /var/snap/multipass/common/data/multipassd/vault/instances/Vcasa6000/root.qcow2 and used that image to deploy the rest of the VM and it was successful./

So I am guessing is there any limitation, or check

please suggest

vishaldhiman86 avatar Sep 24 '24 14:09 vishaldhiman86

Yes, another process is using this. But if you can see the command which I have executed, there no reference given for that /var/snap/multipass/common/data/multipassd/vault/instances/Vcasa67011/root.qcow2

Can you share more info on this part to help us understand which process is using it? sudo lsof /var/snap/multipass/common/data/multipassd/vault/instances/Vcasa67011/root.qcow2 this command I mentioned before should tell you.

georgeliao avatar Sep 26 '24 10:09 georgeliao

Closing for lack of activity.

ricab avatar Nov 15 '24 19:11 ricab