diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-04-08 16:03:24 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-04-08 16:03:24 +0300 |
commit | e8538b833d31533802ecb48958bb22c4656fa862 (patch) | |
tree | df95f4f9938fcb2dfc3fc14b137763894529577f /vm-libvirt.sh | |
parent | 83e55313b82f01ab5c0232acd71a3a1b4cd7ae36 (diff) | |
download | ick-contractor-e8538b833d31533802ecb48958bb22c4656fa862.tar.gz |
Change: require giving a workspace image for worker
Diffstat (limited to 'vm-libvirt.sh')
-rwxr-xr-x | vm-libvirt.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/vm-libvirt.sh b/vm-libvirt.sh index 2c2f25f..ea1ad27 100755 --- a/vm-libvirt.sh +++ b/vm-libvirt.sh @@ -43,9 +43,9 @@ raw_uncompressed_size() # Check parameters. -if [ "$#" -lt 2 ] +if [ "$#" -lt 3 ] then - die "Usage: $0 NAME IMAGE [virt-install-options]" + die "Usage: $0 NAME IMAGE WORKSPACEIMAGE [virt-install-options]" fi verbose "Command line args OK" @@ -53,7 +53,8 @@ verbose "Command line args OK" # Command line parameters: name of VM and image file. name="$1" image="$2" -verbose "creating VM $name from image $image" +workspace="$2" +verbose "creating VM $name from image $image, using $workspace as workspace" shift 2 @@ -77,6 +78,7 @@ virt-install --connect qemu:///system \ --import \ --os-variant=debian9 \ --disk="path=$image,cache=none" \ + --disk="path=$workspace,cache=none" \ --network="network=default" \ --graphics=spice \ --noautoconsole \ |