Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libvirt_vm: enablement of SAN based guest with LUN id #1593

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

balamuruhans
Copy link
Member

@balamuruhans balamuruhans commented May 29, 2018

Boot guest with SAN based storage type using LUN id which can be
retrieved from /dev/disk/by-id, this enablement helps to use the
guest for SAN based migration tests. As LUN id would be same when
LUN is shared across multiple host and it is necessary for
migration to succeed.

Suggested-by: Satheesh Rajendran [email protected]
Signed-off-by: Balamuruhan S [email protected]

@balamuruhans balamuruhans force-pushed the san_storage branch 3 times, most recently from 35a34b7 to 464d857 Compare May 29, 2018 10:56
@balamuruhans
Copy link
Member Author

Debug log

2018-05-29 16:24:07,388 libvirt_vm       L1269 DEBUG| make_create_command() setting up command for nic: {'netdst': 'virbr0', 'ip': None, 'nic_name': 'nic1', 'mac': '52:54:00:86:87:88', 'nettype': 'bridge', 'nic_model': 'virtio', 'g_nic_name': None}
2018-05-29 16:24:07,389 libvirt_vm       L0841 DEBUG| vm.make_create_command.add_nic returning:  --network=bridge=virbr0,model=virtio,mac=52:54:00:86:87:88
2018-05-29 16:24:07,389 libvirt_vm       L1962 INFO | Running libvirt command (reformatted):
2018-05-29 16:24:07,389 libvirt_vm       L1964 INFO | /usr/bin/virt-install
2018-05-29 16:24:07,389 libvirt_vm       L1964 INFO |     --connect=qemu:///system
2018-05-29 16:24:07,389 libvirt_vm       L1964 INFO |     --hvm
2018-05-29 16:24:07,389 libvirt_vm       L1964 INFO |     --accelerate
2018-05-29 16:24:07,390 libvirt_vm       L1964 INFO |     --name 'virt-tests-vm1-lifecycle'
2018-05-29 16:24:07,390 libvirt_vm       L1964 INFO |     --machine pseries
2018-05-29 16:24:07,390 libvirt_vm       L1964 INFO |     --memory=32768
2018-05-29 16:24:07,390 libvirt_vm       L1964 INFO |     --vcpu=1,sockets=1,cores=1,threads=1
2018-05-29 16:24:07,390 libvirt_vm       L1964 INFO |     --import
2018-05-29 16:24:07,390 libvirt_vm       L1964 INFO |     --nographics
2018-05-29 16:24:07,390 libvirt_vm       L1964 INFO |     --serial pty
2018-05-29 16:24:07,390 libvirt_vm       L1964 INFO |     --memballoon model=virtio
2018-05-29 16:24:07,391 libvirt_vm       L1964 INFO |     --disk path=/dev/disk/by-id/scsi-360050768028211d8b0000000000000b9,device=lun,bus=scsi,format=raw,cache=none,driver_name=qemu
2018-05-29 16:24:07,391 libvirt_vm       L1964 INFO |     --network=bridge=virbr0,model=virtio,mac=52:54:00:86:87:88
2018-05-29 16:24:07,391 libvirt_vm       L1964 INFO |     --noautoconsole
2018-05-29 16:24:07,393 process          L0554 INFO | Running '/usr/bin/virt-install --connect=qemu:///system --hvm --accelerate --name 'virt-tests-vm1-lifecycle' --machine pseries --memory=32768 --vcpu=1,sockets=1,cores=1,threads=1 --import --nographics --serial pty --memballoon model=virtio --disk path=/dev/disk/by-id/scsi-360050768028211d8b0000000000000b9,device=lun,bus=scsi,format=raw,cache=none,driver_name=qemu --network=bridge=virbr0,model=virtio,mac=52:54:00:86:87:88 --noautoconsole'
2018-05-29 16:24:08,793 process          L0385 DEBUG| [stderr] WARNING  No operating system detected, VM performance may suffer. Specify an OS with --os-variant for optimal results.
2018-05-29 16:24:10,337 process          L0385 DEBUG| [stdout]
2018-05-29 16:24:10,338 process          L0385 DEBUG| [stdout] Starting install...
2018-05-29 16:24:10,339 process          L0385 DEBUG| [stdout] Domain creation completed.
2018-05-29 16:24:10,471 process          L0642 INFO | Command '/usr/bin/virt-install --connect=qemu:///system --hvm --accelerate --name 'virt-tests-vm1-lifecycle' --machine pseries --memory=32768 --vcpu=1,sockets=1,cores=1,threads=1 --import --nographics --serial pty --memballoon model=virtio --disk path=/dev/disk/by-id/scsi-360050768028211d8b0000000000000b9,device=lun,bus=scsi,format=raw,cache=none,driver_name=qemu --network=bridge=virbr0,model=virtio,mac=52:54:00:86:87:88 --noautoconsole' finished with 0 after 3.07548499107s
2018-05-29 16:24:10,528 utils_misc       L0681 DEBUG| waiting for domain virt-tests-vm1-lifecycle to start (0.000008 secs)
2018-05-29 16:24:10,622 unattended_insta L1264 INFO | Waiting for installation to finish. Timeout set to 180 s (3 min)

@@ -268,6 +268,17 @@ image_unbootable_pattern = "Hard Disk.*not a bootable disk"
# export_ip: optional.
# export_options: optional.

# SAN support related params. Please fill the params based on the environment
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@balamuruhans could you check if we can reuse this param image_raw_device, in-additional , so that even qemu vm can get benefited...and basically image_raw_device can be replaced with storage_lun_id and we can give the full path instead, may be sometime we might have to /dev/mapper so lets not hardcode /dev/disk/by-id

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, I will check to reuse the image_raw_device and avoid hardcoding /dev/disk/by-id. Thank you.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvements, made the changes as suggested. I will test it and post the results for the same

Boot guest with SAN based storage type using LUN id which can be
retrieved from /dev/disk/by-id, this enablement helps to use the
guest for SAN based migration tests. As LUN id would be same when
LUN is shared across multiple host and it is necessary for
migration to succeed.

Suggested-by: Satheesh Rajendran <[email protected]>
Signed-off-by: Balamuruhan S <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants