【问题标题】:How can I copy a Google Compute Engine snapshot to Google Cloud Storage?如何将 Google Compute Engine 快照复制到 Google Cloud Storage?
【发布时间】:2014-07-10 07:53:52
【问题描述】:

我有一个应用程序预装了应用服务器。

我只想将其作为图像复制到 GCS。

我试过'gcimagebundle'说'找不到平台,你可以在python_factory.py文件中配置平台'。

有什么方法可以将我的快照复制到 GCS?

更多信息:

sudo gcimagebundle   -d /dev/sda -o /tmp/ --log_file=/tmp/abc.log
***************************************************************************
*                                                                         *
*             !!!!  WARNING: YOU ARE INSIDE LVE !!!!                      *
*IF YOU RESTART ANY SERVICES STABILITY OF YOUR SYSTEM WILL BE COMPROMIZED *
*        CHANGE YOUR USER'S GROUP TO wheel to safely use SU/SUDO          *
*                             MORE INFO:                                  *
*      http://docs.cloudlinux.com/index.html?lve_pam_module.html          *
*                                                                         *
***************************************************************************
Starting logging in /tmp/abc.log
Platform is not supported. Platform rules can be added to platform_factory.py.

我使用的操作系统是 CentOS 6

  • n1-standard-1(1 个 vCPU,3.8 GB 内存)
  • us-central1-b
  • centos-6-v20140415

【问题讨论】:

  • 你能发布你从 gcimagebundle 得到的确切错误吗?
  • 您好 jterrace - 我已经用我得到的错误和实例的配置更新了问题
  • 我正在使用 centos-6-v20140415 制作图像,但从未见过此错误。您是否使用特殊用户来运行命令?您是否为您的应用启用了 LVE?
  • 是的,我已经安装了 cPanel,有 LVE 并使用它,我正在使用 sudo -s 在超级用户模式下运行,然后在 GCE 中给出了这个命令,它没有工作
  • 您能发布 1) 日志文件 (/tmp/abc.log) 中的内容吗? 2)查看gcimagebundle和platform_factory代码,解析/etc/redhat-release文件确定osname。您是否也可以发布该文件中的内容。它应该从类似于“centos”欢呼的东西开始

标签: google-cloud-storage google-compute-engine google-cloud-platform gcloud


【解决方案1】:

Compute Engine 中最近添加了一项功能,可让您直接从永久性磁盘创建映像。请参阅https://developers.google.com/compute/docs/images#creating_an_image_from_a_root_persistent_disk 的文档

如果您只有快照,则必须先从快照创建一个永久性磁盘,然后使用“gcloud compute images create”命令将该磁盘作为源磁盘

【讨论】:

    猜你喜欢
    • 2018-08-15
    • 1970-01-01
    • 1970-01-01
    • 2016-11-09
    • 1970-01-01
    • 1970-01-01
    • 2012-01-02
    • 2021-05-28
    • 1970-01-01
    相关资源
    最近更新 更多