Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using 6.12.6, I lost all of my virtual machines by specifying a different location for libvirt storage. Can they be restored and if so, how?

Featured Replies

Hello,

 

My goal was to move the Libvirt storage location from  /mnt/vms_nvme/libvirt.img to a new larger NVME -  /mnt/vms2_nvme/libvirt.img.
I did not delete the image file from the original location or delete any other files.

I disabled VM using VM Manager and updated the location to  /mnt/vms2_nvme/libvirt.img and then I enabled VM. When I checked VM's there was nothing there and then I thought it was because there was no libvirt.img file in the new location. I wanted to go back to the original location and when I did that, there were still no VM's listed.

Is there a way I can restore my original setup?

I have attached the diagnostics for your review.

Thanks in advance for anyone who can help.

 

frankenstein-diagnostics-20231208-1141.zip

Solved by Ablatem

  • Author

Adding some information from the libvirt log

I see the Network error but in the VM Manager the Default Network Source is virbr0

 

 

image.thumb.png.fdd19824f4b151a3102247ba01f41b1c.png

 

 

image.png.11615862ef93fbb585363fbc43e0391c.png

 

 

 

  • Community Expert
15 minutes ago, Ablatem said:

I disabled VM using VM Manager and updated the location to  /mnt/vms2_nvme/libvirt.img and then I enabled VM.

But did you move the existing file to the new location? If not it'd create a new empty one.

 

When changing you may need to stop the array completely or even reboot, stopping/starting VM without also stopping Docker often causes libvirt.img not to unmount correctly.

 

16 minutes ago, Ablatem said:

to a new larger NVME

Why? It's just 1GB.

 

 

  • Author

Hello, @Kilrah,
 

Thanks for your response.

I did not move the existing file before so I thought that could be the issue.  I wanted to go back to the original location and that is when I saw no VM's.

I just tried restarting the array and that didn't make any difference so I took another look at the locations. I see a problem -
in both locations (/mnt/vms_nvme  and /mnt/vms2_nvme) there are libvirt.img files - so 2 image files. Both are the same size - 1.07 GB

I thought about what you mentioned about the file size being only 1 GB and I decided that it could be left where it is and I can move VM's from the original nvme over to the new nvme to make a little extra space.

With that being said, I assume that now I need to delete the libvirt.img file located in the new location:  /mnt/vms2_nvme  - then restart the array again.
I know what happens when you assume so can you confirm that?

 

  • Community Expert

Deleting the new one and making sure the settings point to the "old" file should work.

I would set VM and Docker services to disabled, reboot, check after starting array that the file is at the expected place and settings point to it, then restart the services.

Edited by Kilrah

  • Author

I deleted the new libvirt.img file and made sure VM Manager was set to point to the original location.

image.png.a01b68a5bdff7affd0bc8793c6a7dabb.png

 

I disabled Docker and VM then I rebooted.

When it came back online, I confirmed that the VM Manager location was the same and it was.  I started Docker and VM.

image.png.a9f8c56eaa5165854a97a028c2602471.png

When I checked VM, there were still no VMs listed. 

I looked at the libvirt log and I see an error about the Network interface being already in use by interface br0 - I don't know where this is coming from because in VM Manager, the Default network source is virbr0

 

image.thumb.png.2f3d7a993744f6b57d67b0483681d738.png

 

I see this under Libvirt volume info - Should I check Correct file system errors and click 'scrub'?

image.thumb.png.80f43d4117d30c7a756a517bd85b77a5.png

 


 

  • Community Expert

If you don't have the old libvirt or a backup you can recreate the VMs and point to the existing vdisks.

  • Author

Thanks for the reply, @JorgeB.

I do have the old libvirt and I am pointing to it but I can't get any vm's to be listed. The libvirt.img file I have is 1.07 GB.

Is there a documented process for recreating the VM's using the existing vdisk file?  I am making a copy of one of my existing VM's vdisk and then I was going to attempt to recreate it.

Could the network error I am seeing in the libvirt log be causing a problem with not being able to see the existing vm's?

image.thumb.png.e9df40c7bed368399dbba6208ebd5052.png

  • Author
  • Solution

I was able to restore a 'test' vm which looks fine.

I created a new vm and used the same name as before as assigned CPU and RAM. The Primary vDisk location is set to Auto since it was using a valid path - /mnt/user/domains/RedHat/vdisk1.img

Network Source is virbrO
Network Model is virtio-net

 

I didn't make any other changes. So far so good - I will take another look at it and then try a restore of another VM.

Does this sounds like the correct process to use as far as recreating the vm's?

Note: I had to change the Network Source to br0  - Network Model - left this the same - virtio-net
This change gave me network connectivity.  I will use this setting going forward.

Edited by Ablatem

  • Community Expert
18 hours ago, Ablatem said:

Does this sounds like the correct process to use as far as recreating the vm's?

Yes, that should do it.

  • Author

Thanks @Kilrah and @JorgeB for your assistance.
 

I have been able to recreate my original VM's with no issues using the steps I mentioned above in the comment I marked as the solution.

I appreciate the help.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.