Jump to content

VM xml file best management practices


Recommended Posts

I am looking for some suggestions on managing my VMs in particular the resulting XML files.

 

Let me start by saying I am a newbie with VMs and have been experimenting  with VMs in unraid over the past couple of months.  It has been a lot of fun and I have a lot to learn.

 

I find that I start with testing the VM utilizing VNC as the graphics card which is one xml then I experiment with GPU passthrough which is a different xml file and I end up wanting to save all these versions until I have a sucessful/stable VM.  What I have been doing is emailing myself the xml for each of these and when I stop the VM and want to test something...I then paste the xml and then attempt to start the VM....then I end up going back to the original...so I have all of this back and forth (which can be difficult if I am using my smart phone to switch VMs).

 

This method seems to be cumbersome, so I thought I would reach out and see what others were doing.  It would be nice if we could save multiple versions of an xml file and select the one we want when starting a VM.

 

As I am typing this...I started thinking... is it possible to create a new VM and just have it point to the same image file.  I assume the xml file would need its own unique uuid in the xml.

 

Any suggestions would be greatly appreciated!

 

Dan

Link to comment

I pretty much do the same thing.... Copy and paste the XML out and email it to myself in case the change I make breaks the VM, then I can paste back to the original.

Going forward I think the 6.2 update is going to add a lot of functionality to the GUI in terms of VMs so fingers crossed we won't need to edit the XML as much as we do now to pass through entire ssds, usb controllers and other pcie devices.

 

Link to comment

What i do is to have multiple versions of the xml file.

 

I will create a vm using vnc and call it for example windows 10 vnc.

 

This is my base vm template for that machine. After i have that working i will click  add vm and choose template .xml expert.

I  copy the xml from the vm i first created and paste it into the new template, but change two parts.

 

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>windows 10 vnc</name>
  <uuid>f2d2787d-25a1-e509-3b7f-c2fd11fa88ea</uuid>
  <description>windows 10 </description>
  <metadata>

 

You must change the name to something different to original template say for example  <name>windows 10 gpu passthrough</name>

 

then delete the line  <uuid>f2d2787d-25a1-e509-3b7f-c2fd11fa88ea</uuid>

 

A new uuid will be automatically added when you first start the vm.

 

This way you can test many different vm configs. i have vms with vnc, gpu passthrough, usb contoller passthrough all in separate xml files

 

vmscreen.png

  • Like 1
Link to comment
  • 7 years later...
On 1/30/2016 at 4:38 AM, SpaceInvaderOne said:

You must change the name to something different to original template say for example  <name>windows 10 gpu passthrough</name>

 

then delete the line  <uuid>f2d2787d-25a1-e509-3b7f-c2fd11fa88ea</uuid>

 

A new uuid will be automatically added when you first start the vm.

Does windows care if the UUID suddenly changes?

I have a old baremetal installation that i've converted into a vm from your tutorials but have been worried about changing the UUID on it for non-gpu vms

Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...