Commit 25d5f66b by Julien Muchembled

vm.run: new 'drives' option

1 parent 6b0ff18d
Pipeline #6263 for 25d5f66b passed in 0 seconds
......@@ -730,6 +730,9 @@ vm
dist
VM image to use inside the `vm` folder.
drives
Extra drives. Each line is passed with -drive
commands
List of <command> options, each one being a shell script to execute via
SSH. They are processed in sequence. This is usually only required if you
......
......@@ -122,12 +122,15 @@ class BaseRecipe(EnvironMixin):
except KeyError:
if mem is None:
raise
return ['qemu-system-' + ARCH, '-enable-kvm', '-drive', drive,
args = ['qemu-system-' + ARCH, '-enable-kvm', '-drive', drive,
'-smp', self.options.get('smp', '1'), '-m', str(mem),
'-net', 'nic,model=virtio', '-net', net,
# https://daniel-lange.com/archives/152-hello-buster.html
'-object', 'rng-random,filename=/dev/urandom,id=rng0',
'-device', 'virtio-rng-pci,rng=rng0']
for drive in self.options.get('drives', '').splitlines():
args += '-drive', drive
return args
@property
def ssh_key(self):
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!