# Start the guest VM
set img [lrange $argv 0 0]
if { $img == "" } { set img "/srv/vm/autopkgtest-sid.img" }
-spawn vm $img -nographic -snapshot -virtfs local,id=srv,path=/srv,security_model=none,mount_tag=srv,readonly \
+spawn vm $img -nographic -snapshot -cpu host -smp 3 \
+ -virtfs local,id=srv,path=/srv,security_model=none,mount_tag=srv,readonly \
-virtfs local,id=etcschroot,path=/etc/schroot,security_model=none,mount_tag=etcschroot,readonly
# Login, and get root shell
expect -re $prompt
# install wanted packages; openssh postinst does funny things to the terminal, so only give it pipes
-send "DEBIAN_FRONTEND=noninteractive apt-get install -o Dpkg::Options::=--force-confnew -y git-buildpackage libwww-perl less vim lintian debhelper manpages-dev git dput pristine-tar bash-completion libnss-myhostname lptools python-keyrings.alt wget gnupg2 ubuntu-dev-tools python3-debian qemu-kvm qemu-utils schroot sbuild locales openssh-server </dev/null 2>&1 | cat\r"
+send "DEBIAN_FRONTEND=noninteractive apt-get install -o Dpkg::Options::=--force-confnew -y git-buildpackage libwww-perl less vim lintian build-essential debhelper manpages-dev git dput pristine-tar bash-completion libnss-myhostname lptools python-keyrings.alt wget gnupg2 ubuntu-dev-tools python3-debian qemu-kvm qemu-utils schroot sbuild locales openssh-server </dev/null 2>&1 | cat\r"
expect -re $prompt
# set up user
expect -re $prompt
#
-## set up lxd if available (on Ubuntu)
-send "(apt-get install -y lxd </dev/null && adduser martin lxd && yes '' | lxd init || true) 2>&1 | cat\r"
+## install lxd if available (on Ubuntu)
+send "(apt-get install -y lxd </dev/null && adduser martin lxd) 2>&1 | cat\r"
expect -re $prompt
interact