I want to attach an iSCSI block device to my vagrant virtual machine, it is not a real device, i just want to simulate one using a file.
for example, If i want to add normal disk device, i may use the following:
config.vm.provider "virtualbox" do | p |
unless File.exist?(disk)
p.customize ['createhd', '--filename', disk, '--size', 1 * 1024]
end
p.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', disk]
end
In this code example, I simulate a new hard drive using a file...
The question is, what should be changed to make this acts like an iSCSI device. Actually, I am using vagrant to test my chef recipe for configuring block storage on my servers .
Thanks