Configuring new VM

Check script permissions

Check them:

ls -l ${VMDirBas}/execbin/${VMGenNam}/${VMLILNAM}/sysstart/exc_${VMLILNAM}

Fix them:

sudo chmod ug+x ${VMDirBas}/execbin/${VMGenNam}/${VMLILNAM}/sysstart/exc_${VMLILNAM}

Check them:

ls -l ${VMDirBas}/execbin/${VMGenNam}/${VMLILNAM}/sysstart/exc_${VMLILNAM}
Start machine.
echo VMDirBas=${VMDirBas} VMGenNam=${VMGenNam} VMLILNAM=${VMLILNAM}

Note: Be careful about what those values are. This part of the process is a bit of a transition period, when there may be work on multiple machines. It is easy to try to jump into this spot of the instructions, but to still have VMLILNAM point to the wrong machine. So, the goal here is not just to see whether a value is set, but to carefully check to make sure that the variable contains the desired value.


At this point, you should verify that the machine is running. (However, you'll likely do that as part of the next step. If the next step causes problems, do fall back to performing this step of verifying that the machine is running.)


If you're having troubles starting the machine, then the following may help.

TUN/TAP interface issues

If there are error messages about the TUN/TAP device not getting created, keep looking for error messages. Sometimes Qemu prints out multiple error messages, so just looking at the last error message might not be the most clear and informative message.

File is not executable

(This will probably be moved... This is mentioned by the text that describes creating a subsequent virtual machine. In theory, this could also happen when creating the original virtual machine. Except for the “current status” section, this might actually show up in a ][CyberPillar][ section that is outside of just this guide.)

This could happen if the script file is not recognized as a Unix script file. That can be caused by the presense of control characters, such as what may be found in a DOS text file.

Current status:

Current status: It was thought that this happens due to an error that occurred while creating the script file that got posted to the website. However, that error was believed to be corrected, and then this problem cropped up again. Further efforts may be needed to identify and eliminate the cause of this problem.

Fixing it

Fixing this will require using some software. There are multiple choices.


One of the easiest ways to detect and fix this issue is to use nano. When the file is opened, the nano program will mention that the file was converted from DOS format. This message doesn't seem to have fixed the problem, but it does clearly identify that the problem exists. When saving the file, the program will confirm the filename and the file format. At this part of the process, press Meta-D (which is done by pressing Esc and then d, or by pressing Ctrl-[ and then d).


Another way is to use tr.

tr -d '\r' < ${VMDirBas}/execbin/${VMGenNam}/${VMLILNAM}/sysstart/exc_${VMLILNAM} | sudo -n tee -a ${VMDirBas}/execbin/${VMGenNam}/${VMLILNAM}/sysstart/exc_${VMLILNAM}_unix

The biggest upside to using the tr program is that tr is typically installed (because tr is considered to be part of classic Unix). However, there are some downsides. One is that this creates a new file, and so some adjustment may be needed to adjust permissions.

ls -Fltr ${VMDirBas}/execbin/${VMGenNam}/${VMLILNAM}/sysstart/exc_${VMLILNAM}*

(Use chown and/or chmod as needed.)

chmod ug+x ${VMDirBas}/execbin/${VMGenNam}/${VMLILNAM}/sysstart/exc_${VMLILNAM}_unix
echo y | mv -i ${VMDirBas}/execbin/${VMGenNam}/${VMLILNAM}/sysstart/exc_${VMLILNAM}_unix ${VMDirBas}/execbin/${VMGenNam}/${VMLILNAM}/sysstart/exc_${VMLILNAM}

(Why use both mv's -i and the combination of echo with redirection, instead of just leave off -i? Simply for demonstration purposes, to make a clear point of acknowledgement that a file is being intentionally overwritten. There's no shame in typing a shorter command that has fewer unnecessary components.)

There are other ways: CyberBiz FAQ: Converting from DOS to Unix format.

Using vi
Unix classic vi

Note: This has not been thoroughly tested, and is just based on some online reading. This also doesn't cover some aspects, like exiting the program.

Press Esc (or Ctrl-[) twice.

Press :%s/

Press Ctrl-V

Press Ctrl-M

Type //g followed by pressing Enter

Some people like using some options that are designed as part of Vim.

Resources: TechnoSophos, Vim File Format. StackOverflow question about Vim doesn't seem to reference Vim in the question's text, but the URL does mention Vim and the question has the vim tag (and the “dos2unix” flag). Multiple of the answers seem to be focused on using Vim.

You may also wish to view the output of the machine. This step should not be required to be able to control the machine: you could just wait for the machine to start a server for a protocol that provides “remote access” control, such as SSH. However, viewing the output might help you to determine when you can start to make such a connection. It may also be useful if there are problems.

More steps

(Remaining steps have been moved to a sub-section, which allows those instructions to be more easily referenced from multiple locations.)