nutanix VMのディスクをIDEからSCSIに変換してみた。


IDEで作ったNutanix上のVMをscsiに変換してみた。
念のため作業前にVMのsnap shotは取得しておきます。

まずは、Nutanix clusterのCVMに入り対象を確認

# acli
vm.get hoge-vm-01
hoge-vm-01 {
config {
agent_vm: False
allow_live_migrate: True
boot {
device {
disk_addr {
bus: "ide"
index: 1
}
}
uefi_boot: False
}
disk_list {
addr {
bus: "ide"
index: 0
}
cdrom: True
device_uuid: "31334ace-7c53-464d-9492-f5ea86e49ce6"
empty: True
}
disk_list {
addr {
bus: "ide" ←変換対象はこれ
index: 1
}
container_id: 66602
container_uuid: "3772c06c-d082-4300-82d7-bf61bbe31af0"
device_uuid: "ffc51c77-bf6e-435b-8740-a9c002d1128e"
naa_id: "naa.6506b8d305671382c9c7b5660af464f1"
source_vmdisk_uuid: "4237633a-d01e-40e1-b5d5-31771e64ee73"
vmdisk_size: 57982058496
vmdisk_uuid: "f4a8ba40-2610-4470-b6f1-11019bb55585"
}
hwclock_timezone: "UTC"
memory_mb: 4096
name: "hoge-vm-01"
nic_list {
mac_addr: "50:6b:8d:88:9e:a1"
network_name: "VLAN2"
network_type: "kNativeNetwork"
network_uuid: "8da3d3f7-109f-447c-95bf-c82219bc93ad"
type: "kNormalNic"
uuid: "58637f42-1938-4245-adee-77f44e3b5a78"
vlan_mode: "kAccess"
}
num_cores_per_vcpu: 1
num_threads_per_core: 1
num_vcpus: 2
num_vnuma_nodes: 0
}
host_name: "172.16.40.6"
host_uuid: "d44d53c3-ffa5-4abe-9d18-07232d3cbfd9"
logical_timestamp: 58
state: "kOn"
uuid: "a01ec35d-23c9-4543-938c-c16f59807473"
}

対象が分かったらideからscsiに変換します。

vm.disk_create hoge-vm-01 bus=scsi clone_from_vmdisk=vm:hoge-vm-01:ide.1
DiskCreate: complete

確認します。

vm.get hoge-vm-01
hoge-vm-01 {
config {
agent_vm: False
allow_live_migrate: True
boot {
device {
disk_addr {
bus: "ide"
index: 1
}
}
uefi_boot: False
}
disk_list {
addr {
bus: "ide"
index: 0
}
cdrom: True
device_uuid: "31334ace-7c53-464d-9492-f5ea86e49ce6"
empty: True
}
disk_list {
addr {
bus: "ide"
index: 1
}
container_id: 66602
container_uuid: "3772c06c-d082-4300-82d7-bf61bbe31af0"
device_uuid: "ffc51c77-bf6e-435b-8740-a9c002d1128e"
naa_id: "naa.6506b8d305671382c9c7b5660af464f1"
source_vmdisk_uuid: "4237633a-d01e-40e1-b5d5-31771e64ee73"
vmdisk_size: 57982058496
vmdisk_uuid: "f4a8ba40-2610-4470-b6f1-11019bb55585"
}
disk_list {
addr {
bus: "scsi" ←scsiにてclone
index: 0
}
container_id: 66602
container_uuid: "3772c06c-d082-4300-82d7-bf61bbe31af0"
device_uuid: "cce3f4e3-9b67-499e-a9c5-965ab30207d2"
naa_id: "naa.6506b8dd156861c3f39cfde644856f40"
source_vmdisk_uuid: "f4a8ba40-2610-4470-b6f1-11019bb55585"
vmdisk_size: 57982058496
vmdisk_uuid: "cb4fcb59-b217-4eec-b146-0697ae25afb7"
}
hwclock_timezone: "UTC"
memory_mb: 4096
name: "hoge-vm-01"
nic_list {
mac_addr: "50:6b:8d:88:9e:a1"
network_name: "VLAN2"
network_type: "kNativeNetwork"
network_uuid: "8da3d3f7-109f-447c-95bf-c82219bc93ad"
type: "kNormalNic"
uuid: "58637f42-1938-4245-adee-77f44e3b5a78"
vlan_mode: "kAccess"
}
num_cores_per_vcpu: 1
num_threads_per_core: 1
num_vcpus: 2
num_vnuma_nodes: 0
}
logical_timestamp: 59
state: "kOff"
uuid: "a01ec35d-23c9-4543-938c-c16f59807473"
}

変換できてるようです。

元のディスクを削除します。
タブ連打で出てくるのでacliのコマンドモードは便利です。

vm.disk_delete hoge-vm-01 disk_addr=
ide.0 ide.1 scsi.0
vm.disk_delete hoge-vm-01 disk_addr=ide.1
Delete existing disk? (yes/no) yes
DiskDelete: complete

再度確認

vm.get hoge-vm-01
hoge-vm-01 {
config {
agent_vm: False
allow_live_migrate: True
disk_list {
addr {
bus: "ide"
index: 0
}
cdrom: True
device_uuid: "31334ace-7c53-464d-9492-f5ea86e49ce6"
empty: True
}
disk_list {
addr {
bus: "scsi"
index: 0
}
container_id: 66602
container_uuid: "3772c06c-d082-4300-82d7-bf61bbe31af0"
device_uuid: "cce3f4e3-9b67-499e-a9c5-965ab30207d2"
naa_id: "naa.6506b8dd156861c3f39cfde644856f40"
source_vmdisk_uuid: "f4a8ba40-2610-4470-b6f1-11019bb55585"
vmdisk_size: 57982058496
vmdisk_uuid: "cb4fcb59-b217-4eec-b146-0697ae25afb7"
}
hwclock_timezone: "UTC"
memory_mb: 4096
name: "hoge-vm-01"
nic_list {
mac_addr: "50:6b:8d:88:9e:a1"
network_name: "VLAN2"
network_type: "kNativeNetwork"
network_uuid: "8da3d3f7-109f-447c-95bf-c82219bc93ad"
type: "kNormalNic"
uuid: "58637f42-1938-4245-adee-77f44e3b5a78"
vlan_mode: "kAccess"
}
num_cores_per_vcpu: 1
num_threads_per_core: 1
num_vcpus: 2
num_vnuma_nodes: 0
}
logical_timestamp: 60
state: "kOff"
uuid: "a01ec35d-23c9-4543-938c-c16f59807473"

変換完了です。

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です