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.

Having trouble cloning a VM

Featured Replies

I've created a 'gold image' to use for subsequent VMs that I want to create. When I try to clone this VM i get this rsync error:
 

rsync error: errors selecting input/output files, dirs (code 3) at main.c(829) [Receiver=3.4.1] Percentage: Transfer Rate: Time remaining: .

 

I've attached a screenshot of the whole output.


When I run clone, a new vm does popup (screenshot), but is does not appear that a disk has been created. The cloned VM does have an XML file, but I did not see a disk listed in it.

 

Further, a directory is created for the cloned vm, but it is empty (screenshot)

 

I've tried googling around but can not seem to find much that is specific to Unraid 7 for that error or cloning.

I've also tired looking for Unraid's documentation about cloning VMs but found nothing. Does any documentation exist?

 

Any help is greatly appreciated!

 

 

 

Screenshot 2025-05-03 121156.png

Screenshot 2025-05-03 120848.png

Screenshot 2025-05-03 120743.png

Edited by bukweet
added more info

Solved by bmartino1

  • Solution
4 hours ago, bukweet said:

I've created a 'gold image' to use for subsequent VMs that I want to create. When I try to clone this VM i get this rsync error:
 

rsync error: errors selecting input/output files, dirs (code 3) at main.c(829) [Receiver=3.4.1] Percentage: Transfer Rate: Time remaining: .

 

I've attached a screenshot of the whole output.


When I run clone, a new vm does popup (screenshot), but is does not appear that a disk has been created. The cloned VM does have an XML file, but I did not see a disk listed in it.

 

Further, a directory is created for the cloned vm, but it is empty (screenshot)

 

I've tried googling around but can not seem to find much that is specific to Unraid 7 for that error or cloning.

I've also tired looking for Unraid's documentation about cloning VMs but found nothing. Does any documentation exist?

 

Any help is greatly appreciated!

 

 

 

Screenshot 2025-05-03 121156.png

Screenshot 2025-05-03 120848.png

Screenshot 2025-05-03 120743.png

 

did you make snapshots?
-Their is some metadata for the vidsk then that not getting copped...

 

?rsync is not command to use here you want a full copy cp comand to copy the vdisk...

Ah is see your using the plugin...

 

The command execution fails due to missing folder /mnt/disk4/domains/WindowsGoldImag_clone

make this folder first...

mkdir -P /mnt/disk4/domains/WindowsGoldImag_clone

 

esentail script when rsync to confirm and make sure the files are the same failed as the initial vdsik failed to existing in the new "clone" folder...

 

 

double check your share setting for domain as well as it appears that your /mnt/user/domains is not on disk 4 or its partal being assigned to it?

and the script is trying to copy and call a direct disk share not /mnt/user

 

image.thumb.png.03d667b93bdf9043286c223823c8be20.png

 

as VM shouldn't have secondary storage set...

  • Community Expert
31 minutes ago, bmartino1 said:

?rsync is not command to use here you want a full copy cp comand to copy the vdisk...

Ah is see your using the plugin...

This is the way the clone function in VM manager works tries CP with reflink if that fails reverts to rsync. You cannot clone if snapshots exist.

 

5 hours ago, bukweet said:

Further, a directory is created for the cloned vm, but it is empty (screenshot)

The rsync failed can you try running in manually to see why it fails?

  • Author

@bmartino1invadr

Quote

 

The command execution fails due to missing folder /mnt/disk4/domains/WindowsGoldImag_clone

make this folder first..

 


Doing this made it work right away!

I assumed that the Clone function would also create the directory.

I do find it strange that there is no official documentation (that I can find:) about snapshots or cloning VMs.

Anyways, heaps of thanks to you all!

  • 4 weeks later...
On 5/3/2025 at 4:19 PM, SimonF said:

This is the way the clone function in VM manager works tries CP with reflink if that fails reverts to rsync.

This fails on every VM on every one of my systems, 100% of the time. How can this be fixed/addressed? Did I miss a thread where this is discussed in more detail?

RSYNC (maybe unexpectedly) takes an excruciatingly long time even for a modest 30GB image.

Also of note, is that the MAC addresses for defined interfaces are always different on the "clone" than on the original. That's kind of a big deal to my pfSense image.

On 5/3/2025 at 4:19 PM, SimonF said:

You cannot clone if snapshots exist.

5-year old kid mode: why?

As an aside, will it be possible after some future update to clone a running VM?

Edited by Espressomatic

  • Community Expert
3 hours ago, Espressomatic said:

T W

This fails on every VM on every one of my systems, 100% of the time. How can this be fixed/addressed? Did I miss a thread where this is discussed in more detail?

RSYNC (maybe unexpectedly) takes an excruciatingly long time even for a modest 30GB image.

Also of note, is that the MAC addresses for defined interfaces are always different on the "clone" than on the original. That's kind of a big deal to my pfSense image.

5-year old kid mode: why?

As an aside, will it be possible after some future update to clone a running VM?

Which file system type is the domains share on? The file system has to support COW and if was btrfs the VMs need to be in subvolumes.

I create a new MAC so if a clone was started it would not have duplicate macs if original was running.

For snapshots it the complexity of the overlay files, paths etc. May support in the future.

Technically it may be possible to clone a running machine but would need to use snapshots, Not sure on the memory thou. Why would you want to clone a running machine?

Just now, SimonF said:

1 - Which file system type is the domains share on? The file system has to support COW and if was btrfs the VMs need to be in subvolumes.

2 -I create a new MAC so if a clone was started it would not have duplicate macs if original was running.

3 - For snapshots it the complexity of the overlay files, paths etc. May support in the future.

4 - Technically it may be possible to clone a running machine but would need to use snapshots, Not sure on the memory thou. Why would you want to clone a running machine?

  1. ZFS

  2. Settings within my VM depend on MAC address(es) of the interfaces - changing requires new settings to be made within the VM which is kind of no longer a clone

  3. Would like to see it. Currently can a single Snapshot of a VM be cloned to create a new VM without snapshots?

  4. Some VMs may be part of critical infrastructure on the network. For example, my pfSense VM which is my firewall/router. I can take it down, and continue to access the Unraid UI and make a clone, but while it's down, I can't connect to anything else or with any other machines/systems on my LAN.

  • Community Expert
3 minutes ago, Espressomatic said:

Would like to see it. Currently can a single Snapshot of a VM be cloned to create a new VM without snapshots?

Yes but it is not implemented. I am looking a backup options so I know the process in effect it will backup a VM pulling the snapshots chain into a new image. The overlay file is only the changes so it is dependant on the base image(s). But you can create a new image using qemu-img on the overlay and it will pull the data from the other files into a single image.

I can look to add an option for MAC to leave or generate with the later being the default.

ZFS does not support copy on write I believe. Hence why the CP fails.

1 hour ago, SimonF said:

ZFS does not support copy on write I believe. Hence why the CP fails.

Wait, I thought one of the core principles of ZFS was that it is inherently a copy-on-write FS.

Edited by Espressomatic

  • Community Expert
8 hours ago, Espressomatic said:

Wait, I thought one of the core principles of ZFS was that it is inherently a copy-on-write FS.

The issue was ZFS did not support cp --reflink, but it looks like it may have been added. Currently clone does --reflink=always but for zfs it needs to be =auto I will do some testing over the weekend.

  • Community Expert
19 hours ago, Espressomatic said:

Wait, I thought one of the core principles of ZFS was that it is inherently a copy-on-write FS.

Cat you provide the output of.

cat /sys/module/zfs/parameters/zfs_bclone_enabled

1

zpool get all | grep feature@block_cloning

vmpool feature@block_cloning active local

zfs feature@block_cloning disabled local

root@GUITest:/#

Here it is. "1" just like you got for the first, then...

zpool get all | grep feature@block_cloning

nvme_pool feature@block_cloning disabled local

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.