找回密码
 注册
查看: 566|回复: 0

从openstack上导出系统,到kvm环境启动虚机过程

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2023-1-15 10:00:00 | 显示全部楼层 |阅读模式
找到对应的卷:
) f) b3 F% _+ D* k[root@compute05 ~]# rbd ls -p hdd-volumes |grep 45c2ff86-644d-4a7e-a9a8-e2d2b882cc2b, ~% X9 q0 R  ~, V9 J
volume-45c2ff86-644d-4a7e-a9a8-e2d2b882cc2b/ d; J: t5 s* f. t. ]6 W% o: t$ {% D
# J7 S6 z, O7 `' L8 L
export       export-diff  8 t7 ]  q- i8 {/ u0 o" S/ a$ ~( F
[root@compute05 ~]# rbd export hdd-volumes/volume-45c2ff86-644d-4a7e-a9a8-e2d2b882cc2b windows2019.raw
. @& m  l  s0 D' y# u7 OExporting image: 100% complete...done.
& t) [& o0 p1 w; v2 Y* f6 U( I[root@compute05 ~]# ls
) o+ B! M. i1 o$ S8 X, C. b# E6 I5 K" R% H
  windows2019.raw
1 ]+ k# A9 b' [) l2 E8 u5 A0 ?[root@compute05 ~]# scp windows2019.raw 192.168.10.43:/kvm7 R  y' M) c3 G2 T1 ^
The authenticity of host '192.168.10.43 (192.168.10.43)' can't be established.
" O5 \* P# }  {& p- s; n+ l1 wECDSA key fingerprint is SHA256:cv23P6291ltGHfoUgYqs3vLkLyWOJySxy81kFdOIRHw.
3 k6 H9 i" o$ ]0 x  o% ^ECDSA key fingerprint is MD5:b0:51:06:9f:a4:80:0e:a9:c1:15:25:c8:45:33:b7:4b.  K% z/ B; e0 |- u* e. c
Are you sure you want to continue connecting (yes/no)? yes$ y! }9 N! c8 F9 O! J
Warning: Permanently added '192.168.10.43' (ECDSA) to the list of known hosts., C6 X% x# \& _: l. N$ l

" `# ]7 `* D4 BAuthorized users only. All activities may be monitored and reported.) E3 K' ^% {! I1 _& l
root@192.168.10.43's password: * [+ o" Z4 W5 G+ `. b/ I# P. M
windows2019.raw                                                 100%   50GB 109.9MB/s   07:46   
, Y$ j8 i: x+ V: I6 }. {6 H8 D5 B7 Z$ G
启动虚机:
+ A  }' E5 c' \7 `2 M2 K5 kvirt-install --name vpnserver-windows2019 --ram 16384 --vcpus=6 --disk path=/kvm2/windows2019.raw,bus=ide,format=raw --vnc --vncport=5916 --vnclisten=0.0.0.0 --network=bridge:br0  --force --import  --autostart --noautoconsole  5 {. U+ i& W, G9 G. G! E
编辑虚机:% K; P7 e, v7 Z( ^# \  H$ J
[root@xa-radb-03 ~]# virsh edit vpnserver-windows2019 & M6 g# f  Q  D% u8 y
Domain vpnserver-windows2019 XML configuration edited./ D2 Y1 S* b8 g0 B
% a1 x. i7 r$ ^; t$ `* p
如果要修改mac地址:# J% r6 ?) S7 n+ W( U# {5 D9 |- N( M2 @
找到mac 项,改成需要的mac地址,重启虚机即可
/ Z# h- o4 ^" n% m$ O7 i- c9 C2 F3 r/ [" _( y4 Q9 I( |
[root@xa-radb-03 ~]# virsh destroy vpnserver-windows2019
9 O& M: }. ?+ A" ZDomain vpnserver-windows2019 destroyed$ g$ ?3 E, f) Y) y+ v: T; A
* i# E5 }- T7 E4 |
[root@xa-radb-03 ~]# virsh start vpnserver-windows2019
. b6 h: }* f3 u9 G* z7 h. Z  @Domain vpnserver-windows2019 started
$ d, J) ?) t, m; `  }/ N. d# e5 w5 v! F7 y* z! ~
[root@xa-radb-03 ~]# virsh domiflist vpnserver-windows2019
: n0 {( D! F$ w1 I& O3 B! ] Interface   Type     Source   Model   MAC6 X- a( i0 o6 c" Q$ L
----------------------------------------------------------/ {" D. K7 p9 k  S+ S$ }7 s2 `, A
vnet18      bridge   br0      e1000   60:f6:77:4b:ea:f1
9 r# L8 L! V$ |2 Q; ]
; M0 t+ K# b" X8 Z8 T7 w! l
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 03:06 , Processed in 0.056325 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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