按照以下教程https://help.ubuntu.com/community/UEC/Images#DownloadUECImages我能够在我的计算机中执行 Ubuntu 12.04 Cloud Image (amd64) (http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img),因此我可以添加任何内容,然后再将其上传到我的 Openstack Cloud。但是,当我登录时,我收到一条消息,说我的环境指定了无效的区域设置。为了解决这个问题,我运行 locale-gen,获得以下内容:
ubuntu@ovfdemo:~$ sudo locale-gen
sudo: unable to resolve host ovfdemo
Generating locales...
en_US.UTF-8... /usr/sbin/locale-gen: line 243: 1435 Killed localedef $no_archive -i $input -c -f $charset $locale_alias $locale
failed
Generation complete.
ubuntu@ovfdemo:~$ locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
C.UTF-8
POSIX
ubuntu@ovfdemo:~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
同一映像的 i386 版本中不会发生这种情况 (http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-i386-disk1.img)。我该怎么做才能解决这个问题?
答案1
我设法解决了这个问题。这是因为我用于启动映像的 RAM 内存不够。我使用了 qemu -m 标志并使用了 256 之类的值,它就起作用了。