找回密码
 注册
查看: 537|回复: 4

glance image-create 上传金山openstack平台镜像方式

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2023-9-15 12:01:14 | 显示全部楼层 |阅读模式
glance image-create --file CentOS-7.9-devops-LVM-2023.qcow2.raw  --progress --min-disk 50 --visibility public --min-ram 1024 --disk-format raw --container-format bare --property os_type=linux --property os_arch=x86_64 --property os_variant=CentOS7.9 --property needconvert=True --property support_hypervisor=kvm --property hw_qemu_guest_agent=yes --property image_defined_live_upgrade=True --property user_defined=false --name CentOS-7.9-devops-LVM-2023.qcow2
  {6 L8 h; q6 \" [" }* p) i2 w' j4 R6 I" q& k, W' w5 {' c8 u
方式还是有些不一样的地方。
  M4 n3 H. E, b( o

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2023-9-15 12:25:27 | 显示全部楼层
glance image-create --file CentOS-7.9-devops-LVM-20230913.qcow2 --progress --min-disk 50 --visibility public --min-ram 1024 --disk-format qcow2 --container-format bare --property os_type=windows --property os_arch=x86_64 --property os_variant=linux7.9 --property needconvert=True --property support_hypervisor=kvm --property hw_qemu_guest_agent=yes --property image_defined_live_upgrade=True --property user_defined=false --name CentOS-7.9-devops-LVM-20230913
! }. `* ^7 A: P. C2 y[=============================>] 100%& Z3 R. i% }& C

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2023-9-15 12:26:35 | 显示全部楼层
ImageNotFound: error opening image acf10e89-5afe-425e-8cd9-ac1009611a6b at snapshot None (HTTP 500)
. H& A. c7 B  R- }9 m. Q
. F/ [( {' }2 t5 K" G6 M4 R) |和这个参数有关系。6 E' W9 _2 H3 k# j" _5 S% `3 I: Z
os_variant=CentOS7.9
1 M7 ~% Z" d3 T5 T改成5 G) r! j, g0 w& n7 Q
os_variant=linux7.9
- R+ a- E, h3 x( x& n6 d
: r) y1 @5 H& N/ @. Y即可。

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2023-9-15 12:30:19 | 显示全部楼层
[root@controller01 src]# glance image-create --file CentOS-7.9-devops-LVM-20230913.qcow2  --progress --min-disk 50 --visibility public --min-ram 1024 --disk-format raw --container-format bare --property os_type=linux --property os_arch=x86_64 --property os_variant=linux7.9 --property needconvert=True --property support_hypervisor=kvm --property hw_qemu_guest_agent=yes --property image_defined_live_upgrade=True --property user_defined=false --name CentOS-7.9-devops-LVM-20230913.qcow2-1
# g! I+ V2 s3 _* _- c9 k5 _[=============================>] 100%
; S+ C% }) Z8 w* d, ~4 q" D+----------------------------+----------------------------------------+8 M; Z4 x4 ^  l0 J  Y' m
| Property                   | Value                                  |
) D: b1 V, Y# `+----------------------------+----------------------------------------+, ?% w1 M! V& c, q7 F/ D: A
| checksum                   | None                                   |
/ M6 C# Y. }0 G. t7 ^, @( h| container_format           | bare                                   |+ a  f+ s0 ?# b1 d% [5 ]
| created_at                 | 2023-09-15T04:36:20Z                   |5 \  Q/ Q7 X3 C# s# P8 D( f
| datastore_name             | SATA                                   |( V, W) p# |/ t
| datastore_uuid             | 0f5095d9-9383-4f63-b835-2b0e0f57b7b6   |+ D! X+ m( D, l/ K; d8 F+ s, G
| disk_format                | raw                                    |" [  I$ f2 }8 @& D% q2 b4 ^3 x+ X+ B
| hw_qemu_guest_agent        | yes                                    |+ ^& \* K' _# B9 |9 L3 U( B+ E  q2 \
| id                         | 5e673d73-aced-472c-a23c-f64585867438   |
& K0 [. T' t" N| image_defined_live_upgrade | True                                   |
: \; M5 w- K- N" c1 a# o8 ^8 \| min_disk                   | 50                                     |
. |" G5 A  z3 n5 t2 a/ t3 S| min_ram                    | 1024                                   |
; G1 p: E6 E4 ^| name                       | CentOS-7.9-devops-LVM-20230913.qcow2-1 |1 r! \  e7 G; R; H! R
| needconvert                | True                                   |
* ?' c: F+ F' B5 [! L2 j% J% S| os_arch                    | x86_64                                 |( T! O# n) b8 k5 R% ?- t2 G. r
| os_type                    | linux                                  |( U2 n* G! V. _! l: A% }' D9 r
| os_variant                 | linux7.9                               |
8 T0 R' M/ S& b% c* A| owner                      | 9b5f8a5bec3c414d9d0bbfce96f34277       |
2 l1 s2 X! I  C# i| protected                  | False                                  |
! Z5 S  V' W- [9 a8 }| size                       | None                                   |2 `7 F  ^; }# o% `, e
| status                     | queued                                 |
# M& ?; R# k* t; H| support_hypervisor         | kvm                                    |
( P8 m. L6 R; N' }* H7 s| tags                       | []                                     |' C) w0 D" m6 e( H5 R0 J& g4 e1 w! q
| updated_at                 | 2023-09-15T04:36:20Z                   |
4 f7 k: H* Z( L* r+ U| user_defined               | false                                  |
' B- n8 q& a9 i$ || user_id                    | 1e1454d784f945a69d29bef4c246a28d       |- ]* _$ R( U7 Y, A
| virtual_size               | None                                   |
  ~: l( o" b- o( f| visibility                 | public                                 |
  N; p' [3 s7 I8 P+----------------------------+----------------------------------------+( q1 k2 ?& @# P, p- R
ImageNotFound: error opening image 5e673d73-aced-472c-a23c-f64585867438 at snapshot None (HTTP 500)
* S3 g7 b+ _$ W6 w' Y* ^1 o+ U[root@controller01 src]# glance image-create --file CentOS-7.9-devops-LVM-20230913.qcow2  --progress --min-disk 50 --visibility public --min-ram 1024 --disk-format qcow2 --container-format bare --property os_type=linux --property os_arch=x86_64 --property os_variant=linux7.9 --property needconvert=True --property support_hypervisor=kvm --property hw_qemu_guest_agent=yes --property image_defined_live_upgrade=True --property user_defined=false --name CentOS-7.9-devops-LVM-20230913.qcow2-1 4 h; Z4 g  Z' A: b/ ?
[=============================>] 100%
- F! S7 j% \  ~1 K+----------------------------+----------------------------------------------------------------------------------+
: r; d3 e: Y6 q' ^! g| Property                   | Value                                                                            |
* w* O% ?  Q; }' v$ z$ z- E: {8 w4 m0 Z+----------------------------+----------------------------------------------------------------------------------+
7 R- I3 S* W* {0 Q" L| checksum                   | 1cf177c88d43f1e1f00d92df372ef597                                                 |8 u6 B/ }+ S7 j. v
| container_format           | bare                                                                             |$ L2 n: x$ u  ?: U* y
| created_at                 | 2023-09-15T04:37:09Z                                                             |
8 _6 i7 j' T3 Q  k| datastore_name             | SATA                                                                             |
, l5 }( r8 p) _/ K$ K5 I| datastore_uuid             | 0f5095d9-9383-4f63-b835-2b0e0f57b7b6                                             |& a9 |5 Z$ L- q/ E# r7 O
| direct_url                 | rbd://d385bef6-6778-43cc-8755-4e1d5ef5485e/SATA/7989459f-e632-4f6b-              |
' c( _- N7 F0 P0 F: x) \|                            | 9ac9-47eaa12af32c/snap                                                           |5 \4 R5 C3 d5 h' e0 C- w0 O5 x
| disk_format                | raw                                                                              |9 X+ A1 A$ O6 m1 P
| hw_qemu_guest_agent        | yes                                                                              |
5 Z3 O2 [2 Z- l( D  x6 M6 d| id                         | 7989459f-e632-4f6b-9ac9-47eaa12af32c                                             |
6 L$ u5 L  g" @9 C) Y5 ]: t| image_defined_live_upgrade | True                                                                             |
/ t& G  Q" Z2 b: g& D| min_disk                   | 50                                                                               |4 M$ ^- z9 d( o( k* @$ E) s/ A
| min_ram                    | 1024                                                                             |! [5 X: P$ d% P% x0 s; w
| name                       | CentOS-7.9-devops-LVM-20230913.qcow2-1                                           |
4 w) _, x, A" m# D| needconvert                | True                                                                             |
7 J' W1 @# u# J5 V- w| os_arch                    | x86_64                                                                           |+ O. o/ U; N$ n3 y: F0 U
| os_type                    | linux                                                                            |
' n8 n1 d. J9 [9 {& m, a9 Y  z| os_variant                 | linux7.9                                                                         |
  n* _, u+ s* q/ L+ ?% l| owner                      | 9b5f8a5bec3c414d9d0bbfce96f34277                                                 |% Z' k' N- {* M! T  L7 u
| protected                  | False                                                                            |6 ~9 I% h3 N# A  Q: l# A1 c
| size                       | 841023488                                                                        |
" X7 g5 x) M8 x| status                     | active                                                                           |6 P% F/ e" b9 R/ Y
| support_hypervisor         | kvm                                                                              |
# w& `$ {% `. r: e  w2 t| tags                       | []                                                                               |
% t! g4 L: [5 z  r% G# k6 C| updated_at                 | 2023-09-15T04:38:01Z                                                             |6 D# H- E& L  X# o
| user_defined               | false                                                                            |  W! ^6 \7 j6 g) r4 S5 Y$ b) M& a
| user_id                    | 1e1454d784f945a69d29bef4c246a28d                                                 |3 l" H+ x3 n, M; a' P5 b
| virtual_size               | None                                                                             |. V# b( K0 \8 V0 g  \
| visibility                 | public                                                                           |: N2 k' {/ S7 X
+----------------------------+----------------------------------------------------------------------------------+
2 ]2 @& w$ S5 X- Q; O" _; d7 p[root@controller01 src]#1 y2 \4 ]! j% h6 K

& B9 E$ M+ `* c) L! E参数还要注意 qcow2格式。
/ h, b1 N- V: h  |/ ?; W: w% y

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2023-9-15 12:30:40 | 显示全部楼层
问题解决。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 02:51 , Processed in 0.020300 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表