diff --git a/SWSCloudNode/qemu/__init__.py b/SWSCloudNode/qemu/__init__.py index 458c6d4..a7b972c 100644 --- a/SWSCloudNode/qemu/__init__.py +++ b/SWSCloudNode/qemu/__init__.py @@ -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", diff --git a/vm/firstboot.sh b/vm/firstboot.sh new file mode 100644 index 0000000..d98ca93 --- /dev/null +++ b/vm/firstboot.sh @@ -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