support QEMU

This commit is contained in:
Vyacheslav Anzhiganov 2016-05-21 20:15:52 +00:00
parent 12d21d645c
commit 8904660822
2 changed files with 17 additions and 2 deletions

View file

@ -201,9 +201,9 @@ class QEMU:
"--rootsize=%s" % storage,
"--swapsize=%s" % swap,
"--templates=/tmp/libvirt/%s/templates/libvirt" % vm_id,
# "--user=administrator",
"--user=ubuntu",
# "--name=administrator",
# "--pass=%s" % values['password'],
"--pass=%s" % password,
"--rootpass=%s" % password,
"--ssh-user-key=/tmp/libvirt/%s/authorized_keys" % vm_id,
"--addpkg=linux-image-generic",

15
vm/firstboot.sh Normal file
View file

@ -0,0 +1,15 @@
#firstrun.sh
# This script will run the first time the virtual machine boots
# It is ran as root.
# Expire the user account
passwd -e administrator
# Install openssh-server
apt-get update
apt-get install -qqy --force-yes openssh-server
locale-gen en_US.UTF-8
locale-gen ru_RU.UTF-8
locale-gen