[GH-ISSUE #33] Method to customise the virtual machine XML template and also set VNC password for webvirtmgr.db #25

Closed
opened 2026-02-27 16:00:44 +03:00 by kerem · 9 comments
Owner

Originally created by @JJClements on GitHub (Mar 1, 2013).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/33

It would be good to have an easy way (a separate template or config file) specifically for customising the XML template that gets created for each virtual machine through WebVirtMgr. At the moment if anyone wishes to edit how the XML virtual machine config files get created this has to be done by manually making changes to:

/var/www/webvirtmgr/virtmgr/views.py

It would be good to do this through the web interface as well if possible. Another feature would be an option to specify a VNC password in it so that the same password is written to:

/var/www/webvirtmgr/webvirtmgr.db

At the moment I have to change (line 553 of views.py):

vnc_passwd = ''.join([choice(letters + digits) for i in range(12)])
to
vnc_passwd = 'P@ssw0rd'

Originally created by @JJClements on GitHub (Mar 1, 2013). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/33 It would be good to have an easy way (a separate template or config file) specifically for customising the XML template that gets created for each virtual machine through WebVirtMgr. At the moment if anyone wishes to edit how the XML virtual machine config files get created this has to be done by manually making changes to: /var/www/webvirtmgr/virtmgr/views.py It would be good to do this through the web interface as well if possible. Another feature would be an option to specify a VNC password in it so that the same password is written to: /var/www/webvirtmgr/webvirtmgr.db At the moment I have to change (line 553 of views.py): vnc_passwd = ''.join([choice(letters + digits) for i in range(12)]) to vnc_passwd = 'P@ssw0rd'
kerem closed this issue 2026-02-27 16:00:44 +03:00
Author
Owner

@retspen commented on GitHub (Mar 1, 2013):

Not posible libvirt not view passwod in xml. May show the password on the VM page in collapse plugin (bootstrap).

<!-- gh-comment-id:14283928 --> @retspen commented on GitHub (Mar 1, 2013): Not posible libvirt not view passwod in xml. May show the password on the VM page in collapse plugin (bootstrap).
Author
Owner

@JJClements commented on GitHub (Mar 1, 2013):

Ok, so can you template out the virtual machine XML config to a seperate file to make it easier for us to edit the contents of the file. For example I want to add 'boot order='1'' to one of the disks. But at the moment I have to manually edit views.py which causes 2 problems.

  1. When you make changes to this file and I update the installation I have to go through the file and add everything back again
  2. You have some settings in the views.py that I assume many people (including myself) would want to change
<!-- gh-comment-id:14284960 --> @JJClements commented on GitHub (Mar 1, 2013): Ok, so can you template out the virtual machine XML config to a seperate file to make it easier for us to edit the contents of the file. For example I want to add 'boot order='1'' to one of the disks. But at the moment I have to manually edit views.py which causes 2 problems. 1) When you make changes to this file and I update the installation I have to go through the file and add everything back again 2) You have some settings in the views.py that I assume many people (including myself) would want to change
Author
Owner

@jlillis commented on GitHub (Mar 13, 2013):

Bump on this, it adds the ability to modify a lot of things aren't present in the interface (yet).

<!-- gh-comment-id:14816900 --> @jlillis commented on GitHub (Mar 13, 2013): Bump on this, it adds the ability to modify a lot of things aren't present in the interface (yet).
Author
Owner

@retspen commented on GitHub (Mar 13, 2013):

What do you mean about modify?

<!-- gh-comment-id:14841189 --> @retspen commented on GitHub (Mar 13, 2013): What do you mean about modify?
Author
Owner

@JJClements commented on GitHub (Mar 13, 2013):

So it would be good to have a separate file called something like template.xml where we can set some of the config we need ourselves, and any new machines that are built use this template when they are created.

At the moment the new VM is created using the config located in views.py, which is quite difficult to edit. For example, you include PAE - we do not need this. Also, you set the video model type to 'cirrus' and we use 'vga'. If you had a separate template.xml file we could set these things ourself without needing to edit views.py, search through all the code, and then make sure everything was indented correctly for python. It would be a lot easier!

<!-- gh-comment-id:14843012 --> @JJClements commented on GitHub (Mar 13, 2013): So it would be good to have a separate file called something like template.xml where we can set some of the config we need ourselves, and any new machines that are built use this template when they are created. At the moment the new VM is created using the config located in views.py, which is quite difficult to edit. For example, you include PAE - we do not need this. Also, you set the video model type to 'cirrus' and we use 'vga'. If you had a separate template.xml file we could set these things ourself without needing to edit views.py, search through all the code, and then make sure everything was indented correctly for python. It would be a lot easier!
Author
Owner

@JJClements commented on GitHub (Mar 13, 2013):

modify == change

<!-- gh-comment-id:14843050 --> @JJClements commented on GitHub (Mar 13, 2013): modify == change
Author
Owner

@jlillis commented on GitHub (Mar 13, 2013):

It would be cool to be able to modify a VMs XML within the interface
directly
On Mar 13, 2013 10:10 AM, "JJClements" notifications@github.com wrote:

modify == change


Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/33#issuecomment-14843050
.

<!-- gh-comment-id:14844757 --> @jlillis commented on GitHub (Mar 13, 2013): It would be cool to be able to modify a VMs XML within the interface directly On Mar 13, 2013 10:10 AM, "JJClements" notifications@github.com wrote: > modify == change > > — > Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/33#issuecomment-14843050 > .
Author
Owner

@retspen commented on GitHub (Mar 15, 2013):

Add button "Enable noVNC" - set VNC password (autogen password)

<!-- gh-comment-id:14948462 --> @retspen commented on GitHub (Mar 15, 2013): Add button "Enable noVNC" - set VNC password (autogen password)
Author
Owner

@m8labsteam commented on GitHub (Sep 12, 2016):

i also bump this

<!-- gh-comment-id:246234321 --> @m8labsteam commented on GitHub (Sep 12, 2016): i also bump this
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtmgr#25
No description provided.