Skip to content

Commit bdb565c

Browse files
committed
Changed the default value for VM_IMAGE_DIR to ${HOME}/vms/virsh
1 parent d99ba64 commit bdb565c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ documentation on for cloud-init.
8282

8383
`create-vm` stores files as follows:
8484

85-
* `${VM_IMAGE_DIR}` - Directory used for for VM storage. Defaults to `${HOME}/vms`.
85+
* `${VM_IMAGE_DIR}` - Directory used for for VM storage. Defaults to `${HOME}/vms/virsh`.
8686
* `${VM_IMAGE_DIR}/base/` - Place to store your base Linux cloud images.
8787
* `${VM_IMAGE_DIR}/images/` - `your-vm-name.img` and `your-vm-name-cidata.img` files.
8888
* `${VM_IMAGE_DIR}/init/` - `user-data` and `meta-data`.
@@ -163,7 +163,7 @@ libvirt-qemu:x:64055:libvirt-qemu
163163

164164
That shows that the group `earl`, group ID 1000, has a member `libvirt-qemu`. Since the group `earl` has read and execute permissions on my home directory, `libvirt-qemu` has read and execute permissions on my home directory.
165165

166-
Note: The `libvirtd` daemon will chown some of the files in the directory, including the files in the `~/vms/images` directory, to be owned by `libvirt-qemu` group `kvm`. In order to delete these files without sudo, add yourself to the `kvm` group, e.g.:
166+
Note: The `libvirtd` daemon will chown some of the files in the directory, including the files in the `~/vms/virsh/images` directory, to be owned by `libvirt-qemu` group `kvm`. In order to delete these files without sudo, add yourself to the `kvm` group, e.g.:
167167

168168
```
169169
$ sudo usermod --append --groups kvm earl
@@ -198,15 +198,15 @@ This creates an Ubuntu 22.04 "Jammy Jellyfish" VM with a 40G hard drive.
198198
First download a copy of the Ubuntu 22.04 "Jammy Jellyfish" cloud image:
199199

200200
```
201-
mkdir -p ~/vms/base
202-
cd ~/vms/base
201+
mkdir -p ~/vms/virsh/base
202+
cd ~/vms/virsh/base
203203
wget http://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
204204
```
205205

206206
Then create the VM:
207207
```
208208
create-vm -n node1 \
209-
-i ~/vms/base/jammy-server-cloudimg-amd64.img \
209+
-i ~/vms/virsh/base/jammy-server-cloudimg-amd64.img \
210210
-k ~/.ssh/id_rsa_ansible.pub \
211211
-s 40
212212
```
@@ -274,7 +274,7 @@ This starts the VM creation process and exits. Creation of the VMs continues in
274274

275275
```
276276
for n in `seq 1 8`; do
277-
create-vm -n node$n -i ~/vms/base/jammy-server-cloudimg-amd64.img -k ~/.ssh/id_rsa_ansible.pub
277+
create-vm -n node$n -i ~/vms/virsh/base/jammy-server-cloudimg-amd64.img -k ~/.ssh/id_rsa_ansible.pub
278278
done
279279
```
280280

create-vm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# See the License for the specific language governing permissions and
1717

1818
# Set VM_IMAGE_DIR environment variable to override default storage location for VMs
19-
VM_IMAGE_DIR=${VM_IMAGE_DIR:-"${HOME}/vms"}
19+
VM_IMAGE_DIR=${VM_IMAGE_DIR:-"${HOME}/vms/virsh"}
2020

2121
HOSTNAME=
2222
IMG_FQN=

delete-vm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
VM=$1
2020

2121
# Set VM_IMAGE_DIR environment variable to override default storage location for VMs
22-
VM_IMAGE_DIR=${VM_IMAGE_DIR:-"${HOME}/vms"}
22+
VM_IMAGE_DIR=${VM_IMAGE_DIR:-"${HOME}/vms/virsh"}
2323

2424
VM_IMAGE="${VM_IMAGE_DIR}/images/$VM.img"
2525
CI_IMAGE="${VM_IMAGE_DIR}/images/$VM-cidata.img"

0 commit comments

Comments
 (0)