代码拉取完成,页面将自动刷新
# Create some files to inject
cat > ~/textfile.txt <<EOF
Welcome to OpenStack Summit Austin!
EOF
cat > ~/texas.txt <<EOF
| | \
| | |
| | |
| | |__
| | __ \______
| |/ \_____ |_________________
| O \___________________/ \
| \\*****; \ \
| \\***********; \ \
____________| \\************;;;;;;;;;;;;;;;;; \ \
/____________| \\***** ***; ; | |
\ \\*** *; ; \ \
| \\*** * ***;________________; | |
\_ \\*** ****;;;;;;;;;;;;;;;;;; | |
|_ \\***********;;;;;;;;;;;;;;;;;; _|_|
| \\*.***;*****;;;;;;;;;;;;;;;;;; _/_/
\ \\ ******;;;;;;;;;;;;;;;;;; _/_/
\ ____ \\ ;;;;;;;;;;;;;;;;;; /
|_/__/ \ \\ / /
\ \\ / /
\ \\ _ /_/
\ \\ / /
\ \\ _ / /
\ | |
\ / /
| / /
\ / /
| \ \
\ | |
\_ | |
\_ | |
\__|/
EOF
# Boot an instance injecting files
nova boot --image cirros --flavor m1.summit --file /home/cirros/textfile.txt=textfile.txt --file /home/cirros/texas.txt=texas.txt myfileinjectioninstance
# List instances, notice status of instance
nova list
# Get VNC console
nova get-vnc-console myfileinjectioninstance novnc
# Open the URL in your browser.
# username: cirros
# password: cubswin:)
# View files
sudo cat textfile.txt
sudo cat texas.txt
# List block devices
sudo blkid
# Mount config drive
sudo mount /dev/sr0 /mnt
# Examine contents of config drive
cd /mnt/openstack/content
ls
# Examine contents of first file
cat 0000
# Examine contents of the second file
cat 0001
# Log out of instance
exit
######!!!From Your SSH Session!!!######
# Delete the instance
nova delete myfileinjectioninstance
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。