fix: use sparse loopback file instead of qcow2
- no nbd module in kata so can't use qemu-nbd
This commit is contained in:
parent
722fb00d52
commit
d34ff41d97
|
@ -7,5 +7,4 @@ addons:
|
||||||
- jq
|
- jq
|
||||||
- kmod
|
- kmod
|
||||||
script:
|
script:
|
||||||
- sudo apt -y install linux-modules-$(uname -r)
|
|
||||||
- ./test.sh
|
- ./test.sh
|
||||||
|
|
|
@ -4,12 +4,9 @@ function test_partitioning()
|
||||||
{
|
{
|
||||||
local img
|
local img
|
||||||
img=$(mktemp -u)
|
img=$(mktemp -u)
|
||||||
qemu-img create -f qcow2 "$img" 16G
|
dd if=/dev/zero of="$img" bs=1M seek=16384 count=0
|
||||||
sudo modprobe nbd
|
sudo setup_drive "$img"
|
||||||
sudo qemu-nbd -c /dev/nbd0 "$img"
|
sudo parted -ms "$img" -- print
|
||||||
sudo setup_drive /dev/nbd0
|
|
||||||
sudo parted -ms /deb/nbd0 -- print
|
|
||||||
sudo qemu-nbd -d /dev/nbd0
|
|
||||||
rm -f "$img"
|
rm -f "$img"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user