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

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2023-1-15 10:00:00 | 显示全部楼层 |阅读模式
找到对应的卷:) H% h, g7 R- ]
[root@compute05 ~]# rbd ls -p hdd-volumes |grep 45c2ff86-644d-4a7e-a9a8-e2d2b882cc2b
1 ]  j1 O' n' evolume-45c2ff86-644d-4a7e-a9a8-e2d2b882cc2b  g$ M. @1 z7 A7 A, b

9 p5 l3 Z4 _: ^! s$ a: |export       export-diff  0 O# S0 ^2 U) j2 O. V
[root@compute05 ~]# rbd export hdd-volumes/volume-45c2ff86-644d-4a7e-a9a8-e2d2b882cc2b windows2019.raw2 K! x  ~, b. Z1 s0 l/ J
Exporting image: 100% complete...done.
4 A- V8 m  h! G) J[root@compute05 ~]# ls
& E4 B" {" E& s: J/ P7 d
; J% F0 i+ o" e, s. P. ^; l2 [2 I  windows2019.raw
9 M1 u; W1 J4 `, ?) V[root@compute05 ~]# scp windows2019.raw 192.168.10.43:/kvm
( i+ P6 X* T# ~0 `. aThe authenticity of host '192.168.10.43 (192.168.10.43)' can't be established.
, M! ^  S5 l" N' h* C  @6 S. H6 AECDSA key fingerprint is SHA256:cv23P6291ltGHfoUgYqs3vLkLyWOJySxy81kFdOIRHw.
8 ~7 U1 C9 j5 \, H4 D7 {4 S2 W6 sECDSA key fingerprint is MD5:b0:51:06:9f:a4:80:0e:a9:c1:15:25:c8:45:33:b7:4b.3 G& l" a% }* \# O
Are you sure you want to continue connecting (yes/no)? yes
& B% j/ d3 ~/ S+ ~. \Warning: Permanently added '192.168.10.43' (ECDSA) to the list of known hosts.
' ^% Y% k% O1 k  v# @9 Y7 [+ f) ]. Q% x2 F4 K* y9 S
Authorized users only. All activities may be monitored and reported.' d( w( P& T' T$ x% p
root@192.168.10.43's password:   Z, c: u$ t/ g: F: H) y
windows2019.raw                                                 100%   50GB 109.9MB/s   07:46   ( q" s: ]5 i) Z1 R

) [) Q" J, v: Z6 Q! B& }2 m启动虚机:
5 Y4 e4 ~* r; E$ m$ k. Avirt-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  
) t/ }- V5 J( r6 J编辑虚机:
) g+ A; n& o) d' b( q9 V& h3 C" Q[root@xa-radb-03 ~]# virsh edit vpnserver-windows2019 " K, _3 O# ^) {  P7 L
Domain vpnserver-windows2019 XML configuration edited.. w: l' G: w  h

* U( ~7 b: N# g5 p% H6 V+ R2 o如果要修改mac地址:
* H" Z# C; s/ r( Z+ p) v找到mac 项,改成需要的mac地址,重启虚机即可/ b, f9 g2 r  f/ I
9 g! ?* c4 h1 Y, o5 p& h: O
[root@xa-radb-03 ~]# virsh destroy vpnserver-windows2019
. n: d5 ~( ]* j& O# F" vDomain vpnserver-windows2019 destroyed
) m/ T8 W1 p* x( L
) X4 t* Y# Y4 {. U[root@xa-radb-03 ~]# virsh start vpnserver-windows2019 ) a# ^6 V" d  E$ g% T
Domain vpnserver-windows2019 started
" H+ C$ {) {" N1 n' m0 v/ n2 V- g) _6 H( z+ N5 B6 s; o
[root@xa-radb-03 ~]# virsh domiflist vpnserver-windows2019 % X; \- I  z6 t9 k
Interface   Type     Source   Model   MAC
- a7 M) z: b1 S2 p6 t8 t7 x----------------------------------------------------------
# X% F( U+ z* Y$ ?+ |1 R# ~ vnet18      bridge   br0      e1000   60:f6:77:4b:ea:f1* t* C7 y7 D) j2 ]

- `6 g* b+ A$ e
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 01:49 , Processed in 0.019710 second(s), 21 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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