virsh define vm.xml

> On Dec 26, 2020, at 20:38, Chris Murphy <li...@colorremedies.com> wrote:
> 
> On Sat, Dec 26, 2020 at 5:29 AM Patrick O'Callaghan
> <pocallag...@gmail.com> wrote:
>> 
>>> On Thu, 2020-12-24 at 16:26 -0700, Chris Murphy wrote:
>>> Two other ideas:
>>> 
>>> You could create an "original" copy of the VM that you never touch,
>>> and then clone it to restore. What I don't know is whether clone
>>> implies duplicating all the storage too. If so then you might want the
>>> original to have no file set for the virtual drive.
>>> 
>>> I've gotten somewhat adept at fiddling with the xml using 'virsh edit
>>> $vm' but there's a somewhat recent feature you can enable in
>>> virt-manager to directly edit xml in virt-manager. For every device on
>>> the left side UI, there's GUI configuration on the right side, but at
>>> the top there's a tab to see the xml. You have to go dig in
>>> virt-manager preferences to enable xml editing, otherwise you just get
>>> to look at the xml, not change it. I've started doing this rather than
>>> editing the xml directly via virsh edit.
>> 
>> Yes, I've used that. My current difficulty (annoyance really) is that
>> having edited the xml file in a local directory, I can run it using
>> 'virsh create ...' and it duly appears in the virt-manager panel.
>> However if I close virt-manager or end my login session it doesn't show
>> up on restarting and I have to do the 'virsh create' again. I can't
>> figure out how to actually install the new VM where virt-manager will
>> find it (having deleted the original one). I've had a look at virt-
>> clone but haven't managed to find right incantation yet.
> 
> 
> I'm not sure I know of an elegant way to do it but you could create a
> new VM in virt-manager, then use 'virsh edit VM' to edit it, and copy
> paste your backup xml into that edit window and save it. Viola. I know
> it'll work cuz I've done it, but yeah something more elegant might be
> nice.
> 
> 
> -- 
> Chris Murphy
> _______________________________________________
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org

Reply via email to