Compare commits
2 Commits
6a5f54d169
...
f7eaa11a5f
Author | SHA1 | Date | |
---|---|---|---|
f7eaa11a5f | |||
924a0b22ec |
@@ -20,7 +20,7 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# This script provides an example of a PVC provisioner script. It will create a
|
# This script provides an example of a PVC provisioner script. It will create a
|
||||||
# standard VM config and install a RHEL-like OS using rinse.
|
# standard VM config and install a RHEL 8+ or similar OS using rinse.
|
||||||
|
|
||||||
# This script can thus be used as an example or reference implementation of a
|
# This script can thus be used as an example or reference implementation of a
|
||||||
# PVC provisioner script and expanded upon as required.
|
# PVC provisioner script and expanded upon as required.
|
||||||
@@ -571,21 +571,6 @@ class VMBuilderScript(VMBuilder):
|
|||||||
with open(hostname_file, "w") as fh:
|
with open(hostname_file, "w") as fh:
|
||||||
fh.write("{}".format(vm_name))
|
fh.write("{}".format(vm_name))
|
||||||
|
|
||||||
# Fix the cloud-init.target since it's broken by default
|
|
||||||
cloudinit_target_file = "{}/etc/systemd/system/cloud-init.target".format(
|
|
||||||
temporary_directory
|
|
||||||
)
|
|
||||||
with open(cloudinit_target_file, "w") as fh:
|
|
||||||
# We lose our indent on these raw blocks to preserve the apperance of the files
|
|
||||||
# inside the VM itself
|
|
||||||
data = """[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
[Unit]
|
|
||||||
Description=Cloud-init target
|
|
||||||
After=multi-user.target
|
|
||||||
"""
|
|
||||||
fh.write(data)
|
|
||||||
|
|
||||||
# Due to device ordering within the Libvirt XML configuration, the first Ethernet interface
|
# Due to device ordering within the Libvirt XML configuration, the first Ethernet interface
|
||||||
# will always be on PCI bus ID 2, hence the name "ens2".
|
# will always be on PCI bus ID 2, hence the name "ens2".
|
||||||
# Write a DHCP stanza for ens2
|
# Write a DHCP stanza for ens2
|
||||||
@@ -695,6 +680,7 @@ GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# Run any imports first
|
# Run any imports first
|
||||||
|
import os
|
||||||
from pvcapid.vmbuilder import open_zk
|
from pvcapid.vmbuilder import open_zk
|
||||||
from pvcapid.Daemon import config
|
from pvcapid.Daemon import config
|
||||||
import daemon_lib.common as pvc_common
|
import daemon_lib.common as pvc_common
|
||||||
|
Reference in New Issue
Block a user