Closed csmart closed 4 years ago
It might be useful to run commands on the boot disk of a guest before it is launched. For example, to set a local mirror, or set a proxy, etc.
This is run as a part of the disk-create.yaml task, after the disk is created and before cloud-init and qemu-guest-agent are installed.
Simply create a list of shell commands that you want to be run against a machine, through the virt_infra_disk_cmd variable.
virt_infra_disk_cmd
For example, to set the mirror to use on a Fedora box:
virt_infra_disk_cmd:
Just make sure that it is valid shell commands and it will get run on the disk as root. Note that the VM will have host networking and should be able to get out to network to access the Internet if required.
It might be useful to run commands on the boot disk of a guest before it is launched. For example, to set a local mirror, or set a proxy, etc.
This is run as a part of the disk-create.yaml task, after the disk is created and before cloud-init and qemu-guest-agent are installed.
Simply create a list of shell commands that you want to be run against a machine, through the
virt_infra_disk_cmd
variable.For example, to set the mirror to use on a Fedora box:
virt_infra_disk_cmd:
Just make sure that it is valid shell commands and it will get run on the disk as root. Note that the VM will have host networking and should be able to get out to network to access the Internet if required.