Meikel
2019-Jul-04 09:23 UTC
[CentOS] Creating KVM-based VM with virt-manager and virt-install on C7
Hi folks, for learning purposes I create KVM-based VM with the virt-manager. Later I get rid of the VM and repeat the "process" again. When recreating the VM I always enter the same values into the wizard in virt-manager (i.e. I want to speicfy a given MAC). I'd like to "automate" this procedure, all of what I do in virt-manager for creating the new VM, I' d like to do it with a bash script using virt-install. I' wndering if it is possible to "record" the values when I enter them into virt-manager and extract those values for usage with virt-install? It's not clear to me when I enter a field in the wizard what is the corresponding parameter in virt-install. Regards, Meikel
Phil Wyett
2019-Jul-04 14:31 UTC
[CentOS] Creating KVM-based VM with virt-manager and virt-install on C7
On Thu, 2019-07-04 at 11:23 +0200, Meikel wrote:> Hi folks, > > for learning purposes I create KVM-based VM with the virt-manager. > Later > I get rid of the VM and repeat the "process" again. When recreating > the > VM I always enter the same values into the wizard in virt-manager > (i.e. > I want to speicfy a given MAC). > > I'd like to "automate" this procedure, all of what I do in virt- > manager > for creating the new VM, I' d like to do it with a bash script using > virt-install. > > I' wndering if it is possible to "record" the values when I enter > them > into virt-manager and extract those values for usage with virt- > install? > It's not clear to me when I enter a field in the wizard what is the > corresponding parameter in virt-install. > > Regards, > > MeikelHi, I think your looking for: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-domain_commands-creating_a_virtual_machine_xml_dump_configuration_file After you have built the a VM in virt-manager say, with ith this XML file you can recreate the same VM, modify if needed and create other VMs etc. Regards Phil -- *** Playing the game for the games sake. *** IRC: kathenas Twitter: kathenasorg Website: https://kathenas.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part URL: <http://lists.centos.org/pipermail/centos/attachments/20190704/9d5d66cd/attachment.sig>