SOLVED Error cloning Ubuntu VM

bar17

Dabbler
Joined
Oct 24, 2019
Messages
33
Hello, I recently created a Ubuntu 18.04.03 VM with a VirtIO disk and networking. It is in the folder /mnt/tank1/ds1/virtual/fn/

The disk is called was automatically named as a zvol in as virtual/fn/Ubuntu_Full_Node-hhrpo

The permissions for virtual and virtual/fn are nobody:virtual 770.

When I hit the clone button (3 dots --> Clone) I receive the following error:

Code:

[ENOENT] vm_create.devices.1.attributes.path: Disk path /dev/zvol/tank1/ds1/virtual/fn/Ubuntu_Full_Node-hhrpo_Ubuntu_Full_Node_clone0 does not exist. 

Error: Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 165, in call_method
    result = await self.middleware.call_method(self, message)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1107, in call_method
    return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1055, in _call
    return await methodobj(*args)
  File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 664, in nf
    return await f(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/vm.py", line 1436, in clone
    raise e
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/vm.py", line 1419, in clone
    await self.create(vm)
  File "/usr/local/lib/python3.6/site-packages/middlewared/service.py", line 290, in create
    f'{self._config.namespace}.create', self, self.do_create, [data]
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1055, in _call
    return await methodobj(*args)
  File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 664, in nf
    return await f(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/vm.py", line 963, in do_create
    raise verrors
middlewared.service_exception.ValidationErrors: [ENOENT] vm_create.devices.1.attributes.path: Disk path /dev/zvol/tank1/ds1/virtual/fn/Ubuntu_Full_Node-hhrpo_Ubuntu_Full_Node_clone0 does not exist.


Any idea what is going on?

I was hoping to clone the initial install to make spinning up new machines easy.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Which FreeNAS version are you using? Cloning a VM works for me in FN11.2-U7. Error message appears to mean zvol for clone cannot be created. Permissons is the usual suspect and why you have "nobody:virtual" 770 I have no idea. My VM zols are created in a dataset that is UNIX type and has the default user/group of root/wheel, with 755 perms.
 

bar17

Dabbler
Joined
Oct 24, 2019
Messages
33
Which FreeNAS version are you using? Cloning a VM works for me in FN11.2-U7. Error message appears to mean zvol for clone cannot be created. Permissons is the usual suspect and why you have "nobody:virtual" 770 I have no idea. My VM zols are created in a dataset that is UNIX type and has the default user/group of root/wheel, with 755 perms.

I am using FreeNAS-11.2-U7 as well. I changed the permissions of /mnt/tank1/ds1/virtual/fn/ to root:wheel 755 but it still does not work. The reason they were set as nobody:virtual is because I have each dataset owned by the group corresponding to its name, that way I can assign different jails, shares, etc to have access to specific datasets. I suppose I don't mind if the folder with virtual computers is a bit different, as nothing else should need to access the folder.

I suppose having the folder named on creation may have downstream effects. I could try and make the virtual machine again from scratch with the permissions already as root:wheel 755.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
You appear to have along path "/mnt/tank1/ds1/virtual/fn/" under which your VM zvol lives. So can the clone process transverse the entire path? You don't have any space/quota/rservation limits on the dataset where is clone is failing to be created?
 

bar17

Dabbler
Joined
Oct 24, 2019
Messages
33
You appear to have along path "/mnt/tank1/ds1/virtual/fn/" under which your VM zvol lives. So can the clone process transverse the entire path? You don't have any space/quota/rservation limits on the dataset where is clone is failing to be created?

I have no space limitations. I deleted the dataset /virtual/ and deleted the virtual computers. I recreated the /virtual dataset with default settings (root:wheel 755), installed a fresh Ububtu, updated, shut it down. Clone --> success!

I guess you can't get to creative with the permissions of the folder that a VM is created in AND simply changing back to root:wheel doesn't work, it has to be created in it to begin with...
 
Top