mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-04-25 15:35:57 +03:00
[GH-ISSUE #268] Change default Settings to virtio-scsi by default? (for fstrim support ) #174
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/webvirtcloud#174
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @4920441 on GitHub (Dec 6, 2019).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/268
Hi,
how can I change the default parameters, so "fstrim" compatible vms are created by default without manually changing the xml files?
I found a couple of parameters, but not all I need to achieve this...:
Thanks for you help (again:-)
Cheers,
4920441
@catborise commented on GitHub (Dec 9, 2019):
hi,
Doesn't "INSTANCE_VOLUME_DEFAULT_BUS = 'virtio'" key value in settings.py file solve the problem?
INSTANCE_VOLUME_DEFAULT_BUS = 'virtio' -> INSTANCE_VOLUME_DEFAULT_BUS = 'scsi' creates the xml like you specified.
or you want different thing?
@4920441 commented on GitHub (Dec 9, 2019):
Nearly but the discard key is still missing....
<driver name='qemu' type='qcow2' discard='unmap'/>@catborise commented on GitHub (Dec 10, 2019):
i am working on create instance . it is a big change. i will consider it with the new change.
@catborise commented on GitHub (Dec 13, 2019):
@4920441 hi, can you please checkout my repo to test new vm creation operation and discard etc adding. please check and add new settings from settings.py.template
@4920441 commented on GitHub (Dec 13, 2019):
Hi catborise,
yeah sure, I'll do that. I come back to you.
Cheers,
4920441
@4920441 commented on GitHub (Dec 14, 2019):
@catborise commented on GitHub (Dec 14, 2019):
sudo virtualenv venv statement causes that problem , do not use it... because default python version is python3 on your environment.
for now app works with python2.
@4920441 commented on GitHub (Dec 14, 2019):
Thanks, now it ran without an error despite :
But in
webvirtcloud/settings.py.templateare no other options as before, I think.....
I did adapt those befor myself:
@catborise commented on GitHub (Dec 14, 2019):
you can use your settings as before. ..
with this update there are some new settings. you can use them as you wish
new entries
@4920441 commented on GitHub (Dec 14, 2019):
Hi,
after adding the new variables and restarted the hypervisor I only get a
502 Bad Gateway
nginx/1.16.1
....
Even when I comment the lines out again, it does not come back.... Don't see why at the moment....
@catborise commented on GitHub (Dec 14, 2019):
your nginx working but not gunicorn.
do not make them comment line. app does not work if it cannot reach them.
check it to see if the services is working or not.
supervisorctl status
@4920441 commented on GitHub (Dec 14, 2019):
It is not working any more but why? I doubt it has anything to to with editing the files, because I rolled that part completely back....:
supervisorctl status
novncd RUNNING pid 3022, uptime 0:00:17
webvirtcloud RUNNING pid 3030, uptime 0:00:17
@catborise commented on GitHub (Dec 14, 2019):
stop supervisorctl services with supervisorctl stop webvirtcloud
then start it with manually to see if it working.
go to webvirtcloud directory
check outputs. and try to enter url with browser
@4920441 commented on GitHub (Dec 14, 2019):
Erm....
before I tried what you just wrote I did a
and then:
but anyway the webvirtcloud interface is reachable again and at least seems to be working again.
Where is it started automatically? An how did I start it the way I did - I mean, the first one was an erro r and the second one complained port 8000 is already used - so despite the first error it seems to have started at the first point....
But anyway:
@4920441 commented on GitHub (Dec 14, 2019):
After a reboot it's still working.... but with supervisorctl status it is still not shown as it is in your output:
@catborise commented on GitHub (Dec 14, 2019):
dont worry gstfsd is not an essential component. novncd and webvirtcloud is.
python manage.py runserver starts webvirtcloud manually. because it is already started, it does not started.(port is already using by another webvirtcloud process). i think everything is okey.
ps: i recommend an isolated environment for webvirtcloud like vm or docker. it gives you more flexibility and more controllable environment
@4920441 commented on GitHub (Dec 15, 2019):
Yeah, I have to take a closer look to docker anyway.... Do you maybe have some hints how to put webvirtcloud step by step into docker?
@4920441 commented on GitHub (Dec 15, 2019):
Something is still noch right....
After it was working again, I edited the settings.py again like so:
After the reboot Port 8000 was closed again and hence webvirtcloud could not work.
...errr... I seee:
INSTANCE_MACHINE_DEFAULT_TYPE = `'q35'
lets test again:-)
Cheers
@4920441 commented on GitHub (Dec 15, 2019):
Anyway default'ly creating the mentioned settings still does not work.
default I get created virtio disks and no (virt-)scsi disks. It does not matter if I chose a new flavor or create it in any other way
Despite the fact that INSTANCE_VOLUME_DEFAULT_BUS ='scsi' is still present. (that part did already work before the patch :-(
Still, after a reboot the newly generated instances are all 'vda + virtio' - no sda + scsi any more and still no discard option in the xml file.
Thats the (part of the) generated xml file:
@4920441 commented on GitHub (Dec 15, 2019):
@catborise
Now I see... 'MY REPO' is catbories's webvirtcloud ant not retspen's repository.... eeek... didn't get that until now - since we are discussing this in retspens git Part....
Will the changes merge sometime? I don't really wann switch from one to another every couple of weeks:-)
@4920441 commented on GitHub (Dec 15, 2019):
After swiching from respens git to yours I got a couple of errores regarding missing python libvirts and some differences in the config file which I could all solve, but this one gives me a headache...:
Login screen is schown, but after entering the credentials this comes along... what to do now? Seems to be a pretty elementary problem..
(i moved the whole old /srv/webvirtcloud directory to a backup place and began installing from your repository (caborise) again from scratch. that's what I've done so far...)
@catborise commented on GitHub (Dec 15, 2019):
please follow installation guide. probably you missed some steps like python manage.py migrate and python manage.py makemigrations or copy old installation db.sqlite file to new installation dir.
ps: docker installation script in repo. you can use it. lookup to repo wiki
@4920441 commented on GitHub (Dec 15, 2019):
I had to migrate twice - don't know why:
(venv) root@ryzenserver:/srv/webvirtcloud# python manage.py migrate
I saw I did it in the scrollback of my terminal, but thought after the second time thelogin worked again.
The Create Instance Session is way better than it was before... do some more testing before trying to do something with docker :-)
Thanks a lot!
cheers,
P.S.: did you try to generate a Raspberry Pi Image or something with this, too? does it already work?