Commit 25d5f66b authored by Julien Muchembled's avatar Julien Muchembled

vm.run: new 'drives' option

parent 6b0ff18d
......@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment