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.
virsh login vm1Incorrect. virsh does not use login as the console command.
virsh console vm1Correct. virsh console vm1 connects to the domain's serial console.
virsh attach vm1Incorrect. 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のみ
- Use a disposable VM or container when validating lifecycle commands.
- Exact command output can vary slightly by distribution and runtime version.
Foundation review
Identify the layer
The guest must expose and service the console device; a console connection is separate from SSH networking.
Check the side effect
Confirm the guest console device and getty configuration before opening an interactive console.