Skip to content

Commit f51814d

Browse files
Merge pull request #2365 from Nordix/lentzi90/vbmctl-pool
🌱 VBMCTL: Avoid re-using the default storage pool
2 parents 30242db + ee351f6 commit f51814d

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

hack/clean-e2e.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ virsh -c qemu:///system net-undefine baremetal-e2e
2121
rm -rf /tmp/pool_oo/*
2222

2323
# Clean volume pool
24-
virsh pool-destroy default || true
25-
virsh pool-delete default || true
26-
virsh pool-undefine default || true
24+
virsh -c qemu:///system pool-destroy baremetal-e2e || true
25+
virsh -c qemu:///system pool-delete baremetal-e2e || true
26+
virsh -c qemu:///system pool-undefine baremetal-e2e || true

test/e2e/sushy-tools/sushy-emulator.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ SUSHY_EMULATOR_LIBVIRT_URI = u'qemu:///system'
2323
# your VM has a floppy drive.
2424
SUSHY_EMULATOR_IGNORE_BOOT_DEVICE = False
2525

26+
SUSHY_EMULATOR_STORAGE_POOL = 'baremetal-e2e'
27+
2628
# The map of firmware loaders dependant on the boot mode and
2729
# system architecture. Ideally the x86_64 loader will be capable
2830
# of secure boot or not based on the chosen nvram.

test/vbmctl/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@ func CreateVolume(conn *libvirt.Connect, volumeName, poolName, poolPath string,
135135

136136
// CreateLibvirtVM creates a new virtual machine with the given name,
137137
// network name, and MAC address. It first creates a qcow2 file with a size
138-
// of 3GB and defines it in the default storage pool. The function then connects
138+
// of 3GB and defines it in the baremetal-e2e storage pool. The function then connects
139139
// to the libvirt daemon and uses a template to generate the VM's XML configuration.
140140
// If the domain is successfully defined and created, the virtual machine is
141141
// started. Errors during qcow2 file creation, volume creation, libvirt connection,
142142
// template rendering, or domain creation are returned.
143143
func CreateLibvirtVM(conn *libvirt.Connect, name, networkName, macAddress string) error {
144-
poolName := "default"
144+
poolName := "baremetal-e2e"
145145
poolPath := "/tmp/pool_oo"
146146

147147
if err := CreateVolume(conn, name+"-1", poolName, poolPath, 20); err != nil { //nolint: mnd

0 commit comments

Comments
 (0)