SOLVED Error Creating VM

dudemanbacon

Dabbler
Joined
Jun 11, 2014
Messages
17
I'm messing around with virtual machines and getting the following error while trying to create one. This is my home FreeNAS, so this is not an enterprise environment. I did run into issues while upgrading to version 11.2 BETA 1 and had to migrate my phython DB manually as suggested by cipehr in this post: https://forums.freenas.org/index.php?threads/11-2-beta-1-login-issues.68448/page-2. I am not sure if this is related to the failure or not. Does anyone have any idea how I can fix this issue? I've searched the forums for this error and am not finding a solution. Thanks in advance.

OS Version:
FreeNAS-11.2-MASTER-201809110900
(Build Date: Sep 11, 2018 12:13)
Processor: Intel(R) Xeon(R) CPU E5540 @ 2.53GHz (16 cores)
Memory: 20 GiB



ERROR when creating VM:

Error: Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/usr/local/www/freenasUI/freeadmin/sqlite3_ha/base.py", line 412, in execute
execute = self.locked_retry(Database.Cursor.execute, query, params)
File "/usr/local/www/freenasUI/freeadmin/sqlite3_ha/base.py", line 389, in locked_retry
rv = method(self, *args, **kwargs)
sqlite3.OperationalError: table vm_device has no column named order

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 155, in call_method
result = await self.middleware.call_method(self, message)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1033, 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 973, in _call
return await methodobj(*args)
File "/usr/local/lib/python3.6/site-packages/middlewared/service.py", line 278, in create
f'{self._config.namespace}.create', self, self.do_create, [data]
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 973, 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 1022, in do_create
raise e
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/vm.py", line 1010, in do_create
await self.middleware.call('datastore.insert', 'vm.device', device)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1037, in call
return await self._call(name, serviceobj, methodobj, params, app=app, pipes=pipes, io_thread=True)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 987, in _call
return await run_method(methodobj, *args)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 933, in run_in_thread
return await self.loop.run_in_executor(executor, functools.partial(method, *args, **kwargs))
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 668, in nf
return f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/datastore.py", line 219, in insert
obj.save()
File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py", line 796, in save
force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py", line 824, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py", line 908, in _save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py", line 947, in _do_insert
using=using, raw=raw)
File "/usr/local/lib/python3.6/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 1045, in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1054, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python3.6/site-packages/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python3.6/site-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/usr/local/www/freenasUI/freeadmin/sqlite3_ha/base.py", line 412, in execute
execute = self.locked_retry(Database.Cursor.execute, query, params)
File "/usr/local/www/freenasUI/freeadmin/sqlite3_ha/base.py", line 389, in locked_retry
rv = method(self, *args, **kwargs)
django.db.utils.OperationalError: table vm_device has no column named order
 
D

dlavigne

Guest
That definitely looks like fallout from a failed upgrade. If this is a testing system, just do a fresh install of BETA3 (or master if you're really bleeding edge testing). That will resolve that error which is due to a missing migration during the upgrade.
 

dudemanbacon

Dabbler
Joined
Jun 11, 2014
Messages
17
It's not a "testing" system, just my home NAS. I do have an available upgrade to BETA3. I'll try that upgrade and see if it fixes the issue. I'd rather not do a fresh install, I have 7TB of data. If it's a must, I'll need to research the proper procedure to do that without affecting the zfs pools.
 

dudemanbacon

Dabbler
Joined
Jun 11, 2014
Messages
17
This post can be ignored. I've just re-learned a lesson to always verify hardware requirements when upgrading to newer versions. Prior to upgrading to v11, I was running v9 and unfortunately using flash drives with only the bare minimum requirements, 4GB. I'm going to purchase 32GB sticks and do a fresh reinstall tonight.
 

dudemanbacon

Dabbler
Joined
Jun 11, 2014
Messages
17
Probably not necessary, but I'll post in case it helps someone else. I actually DO have 8GB flash drives installed. The problem is that there was tons of old firmware files in the SYSTEM ---> Boot Environments section. I removed all of the old, un-needed files and now have enough space to upgrade. I'm not sure if it'll repair the Python DB at this point, but at least I know what caused the original upgrade failure. I'll probably still replace the 8GB drives with 32GB drives at this point.....
 

Mryusef1

Dabbler
Joined
Mar 28, 2019
Messages
22
I have the same problem. I am using version FreeNAS-11.2-U3. I am running an quad core i5 with 16 gb ram and using a ssd as my boot drive. Below is the error I get when trying to start the VM. Could you please point me in the right direction.

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 1141, 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 1081, 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 1139, in start

await self._manager.start(vm)

File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/vm.py", line 62, in start

list(done)[0].result()

File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/vm.py", line 317, in run

raise CallError(f'VM {self.vm["name"]} failed to start: {output}')

middlewared.service_exception.CallError: [EFAULT] VM windows failed to start: vm_create: Device not configured
 

dudemanbacon

Dabbler
Joined
Jun 11, 2014
Messages
17
Is virtualization enabled in BIOS? Also, did you upgrade to your current version? If so, you may want to reinstall a fresh copy. I did that and it resolved my issues. I then had to upgrade my CPUs because they did not support the FreeBSD virtualization platform, Bhyve. What is the exact model of your processor?
 

Mryusef1

Dabbler
Joined
Mar 28, 2019
Messages
22
The motherboard I'm using doesn't seem to support vitalization. I am planing on upgrading soon so I will wait and see if I have that problem after I upgrade. Thanks for the help.
 
Top