Skip to content

Commit 5a94d3b

Browse files
author
Power Cloud Robot
authored
Merge pull request #602 from Karthik-K-N/add-doc
Add doc to build centos image with DHCP support
2 parents 9b193cc + e0daacd commit 5a94d3b

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ The typical image workflow comprises of the following steps:
3838
- Advanced scenarios for Qcow2 to ova image conversion - [guide](docs/Advanced%20Scenarios%20for%20Qcow2%20to%20OVA.md)
3939
- How to import image to PowerVS instance from COS - [guide](docs/How%20to%20Import%20Image%20to%20PowerVS%20Instance.md)
4040
- How to upload image to COS bucket using pvsadm - [guide](docs/How%20to%20Upload%20Image%20to%20COS.md)
41+
- How to build DHCP supported centos image - [guide](docs/Build%20DHCP%20enabled%20Centos%20Images.md)
4142

4243
### Samples
4344
Please take a look at the [samples](samples/README.md) folder for end-to-end examples.
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Overview
2+
3+
This guide talks about how to build centos image to support DHCP IP and import it to PowerVS workspace.
4+
5+
1. Build the image template
6+
```
7+
pvsadm image qcow2ova --prep-template-default > image-prep.template
8+
```
9+
10+
2. Add the below lines to end of `image-prep.template` file to customize network.
11+
```shell
12+
mkdir -p /etc/cloud/cloud.cfg.d
13+
cat <<EOF >> /etc/cloud/cloud.cfg.d/99-custom-networking.cfg
14+
network: {config: disabled}
15+
EOF
16+
```
17+
18+
3. Build OVA image
19+
```
20+
pvsadm image qcow2ova --image-name <name> --image-dist centos --image-url https://cloud.centos.org/centos/8-stream/ppc64le/images/CentOS-Stream-GenericCloud-8-latest.ppc64le.qcow2 --prep-template image-prep.template
21+
```
22+
Note: Qcow2 CentOS images for ppc64le can be found [here](https://cloud.centos.org/centos/8-stream/ppc64le/images/)
23+
24+
25+
4. Upload image to COS bucket
26+
```
27+
pvsadm image upload -b <bucket-name> -f <file-name> -r <region> --accesskey <access-key-value> --secretkey <secret-key-value>
28+
```
29+
5. Import OVA image to a PowerVS Workspace
30+
```
31+
pvsadm image import -n <service-instance-name> -b <bucket-name> -o <file-name> -r <region> --accesskey <access-key-value> --secretkey <secret-key-value> --pvs-image-name <final-image-name>
32+
```

0 commit comments

Comments
 (0)