Connect from a terminal to the virtual serial console configured for domain vm1.
Which command is appropriate?
virsh console connects to the configured virtual serial console. The guest must also have a console device and service configured.
Detailed explanation
virsh tty vm1Incorrect. tty is not the standard virsh console subcommand.
Incorrect. tty is not the standard virsh console subcommand.
virsh login vm1Incorrect. virsh does not use login as the console command.
Incorrect. virsh does not use login as the console command.
virsh console vm1Correct. virsh console vm1 connects to the domain's serial console.
Correct. virsh console vm1 connects to the domain's serial console.
virsh attach vm1Incorrect. attach is used for device operations rather than opening the console.
Incorrect. attach is used for device operations rather than opening the console.
Try it yourself
An example you can run in a temporary verification environment.
virsh help console 2>/dev/null | head -n 8 || trueExpected result
virshがある場合はconsoleのhelp。domainへ接続しないKey points
- virsh console
- Serial console
- Guest configuration
Notes
- Environment: virsh helpのみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.